Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Run JavaScript snippets from your Markdown files.
chimi
parses Markdown files and runs the JavaScript snippets to check if everything is alright.
$ yarn add chimi --dev
$ npm i chimi --save-dev
# global works too
$ yarn global add chimi
$ npm i -g chimi
Run JavaScript snippets from your markdown files
Usage
$ chimi -f <file> -c <config-file>
Options
--file, -f File or glob matching multiple files (default: "README.md")
--config, -c Use configuration from this file (default: ".chimirc")
--help, -h Show help
--version, -v, -V Show version
Examples
$ chimi -f README.md
$ chimi -f doc/*.md
$ chimi -c chimi.config.js
To let chimi
find the snippets you have to indicate the snippet language using either js
or javascript
like so:
```js
```javascript
You can configure chimi
using a configuration file, it might be a JSON or JavaScript file and also an object as the chimi
property in the package.json
:
{
"dependencies": {
"trae": "trae",
"lodash": "_",
"./config": "config",
"es6-promise: ""
},
"file": "readme.md",
"timeout": 5000
}
NOTE: the .chimirc
file has to be a valid JSON.
NOTE: if it is a JavaScript file, an object has to be exported.
dependencies
: object
A list of dependencies to be require
d on each snippet. Each key represents the path name and the value is the variable name, if the value is an empty string the require
statement will be not assigned to a variable.
The depenencies in the example will generate these require
s:
let trae = require('trae')
let _ = require('lodash')
let config = require('./config')
require('es6-promise')
These dependencies will be added to your snippet before running it so you don't have to do it on every snippet.
file
: string
Default: README.md
.
The path to the file/s you want to parse. It can also be a glob. Be sure to specify only .md
files.
timeout
: number
Default: 5000
.
The time, in miliseconds, to wait for the snippet execution before considering it a failure.
.chimi.js(on)?|.chimirc
).--help
.jsdom
?FAQs
Validate the JavaScript code of your Markdown files
The npm package chimi receives a total of 20 weekly downloads. As such, chimi popularity was classified as not popular.
We found that chimi demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.