acrns v1.0.2
Acorns acrns
Simple, zero-dependency acorn sized (~3kB) package.json dependency updater with the power of bun
Keep your saplings fed with the acrns acorns CLI.
# In your shell
# Print the latest dependencies 👀
npx acrns
pnpm dlx acrns
yarn dlx acrns
bunx acrns
# or write them to package.json 📝
npx acrns -w
pnpm dlx acrns -w
yarn dlx acrns -w
bunx acrns -w
# or save a couple keystrokes ⌨️
bunx an -w
# or if you install globally 🌐
npm i -g acrns
acrns
# or if it is a package.json dependency and `./node_modules/.bin` is in your $PATH 😵💫
npm i -D acrns # or without -D
acrns// or as a script in your package json 📦
{
"scripts": {
"some-name-check": "bunx acrns",
"some-name-update": "bunx acrns -w"
}
}📄 About
Usage
acrns is a CLI tool made to quickly update your package.json dependencies to their latest versions.
- Updates package versions to the
latesttag - Retains version specifiers such as
~^ - (Planned) specify the
dist-tagtargets you wish to update to with--tagi.e.acrns -w --tag="canary,next"
Limitations
acrns only updates package.json dependencies to their latest version, as specified by their latest tag on the NPM registry (or the tags and fallbacks you specify).
For now, the tool was designed explicitly for this purpose. If this does not suit your use case, I'd highly recommend some other tools which can handle updating to scopes you desire, such as major / minor / patch etc.
🔧 Options
Options (denoted by {opt}) can be specified by passing:
- Most options:
-{opt}or--{opt}-{opt} -{opt}or--{opt} --{opt}-{opt}{opt}or--{opt}{opt}
-iand-x:These options must be delimited in the args on their own, for example:
-i=package1 -{otheropts}or--i=package1-x=package1 -{otheropts}or--x=package1Also, they can have quotes
'"or none at all:-i=package1or-i='package1'or-i="package1"-x=package1or-x='package1'or-x="package1"Finally, they use
,(no space!) to delimit which package names to pass:-i=package1,package2,package3-x=package1,package2,package3
Usage
### -d, -v: Show more detailed messaging
acrns -d
acrns -v
### -F: Disable color formatting
acrns -F
### -h: Show help message.
acrns -h
### -i: Specify comma `,` delimited list of dependencies to include. Each string is matched against the entire dependency's name. Can include `'` or `"` around the list if you want.
acrns -i=solid # Would include 'solid-js', '@solidjs/meta', 'eslint-plugin-solid' etc.
acrns -i=solid,unocss # Would include 'solid-js', '@solid...', 'unocss', '@unocss/reset', etc.
# Different command formatting, if desired:
acrns -i="solid,unocss"
acrns -i='solid,unocss'
### -w: Write found updates to `package.json`. By default, `acrns` does not do anything to it.
acrns -w
### -x: Specify comma `,` delimited list of dependencies to exclude. Each string is matched against the entire depenency's name. Can include `'` or `"` around the list if you want.
acrns -x=eslint # Would exclude 'eslint', '@typescript-eslint/...', 'prettier-eslint` etc.
acrns -x=eslint,@fortawesome # Would exclude 'eslint', '@typescript-eslint/...', '@fortawesome/fontawesome-...' etc.
# Different command formatting, if desired:
acrns -x="eslint"
acrns -x='eslint,@fortawesome'✨ Alternatives
acrns was inspired by these other excellent package update managers:
Please check them out! Especially if acrns doesn't fit your use case! 😁