silverwind
bab3205b35
* update note (silverwind) * add note regarding undici (silverwind) * update deps (silverwind) * add bun to ci (silverwind) * use native fetch everywhere (silverwind) * bump actions (silverwind) * add comment (silverwind) * only import fetch-enhanced when needed (silverwind) * only import node-fetch when needed (silverwind) * rename bin dir to dist (silverwind) * Revert "always use the built-in fetch - fixes #70" (silverwind) * always use the built-in fetch - fixes #70 (silverwind) |
||
---|---|---|
.github/workflows | ||
fixtures | ||
snapshots | ||
.editorconfig | ||
.eslintrc.yaml | ||
.gitattributes | ||
.gitignore | ||
.ignore | ||
.npmrc | ||
Makefile | ||
package-lock.json | ||
package.json | ||
README.md | ||
screenshot.png | ||
updates.config.js | ||
updates.js | ||
updates.test.js | ||
vitest.config.js |
updates
updates
is a CLI tool which checks for npm and poetry dependency updates of the current project and optionally updates package.json
/pyproject.toml
. It is highly configurable and is typically able to complete in less than a second.
Usage
bun
and node
are supported and tested. For bun, replace npx
with bunx
and npm
with bun
.
# check for updates
npx updates
# update package.json and install new dependencies
npx updates -u && npm i
Options
See --help
. Options that take multiple arguments can take them either via comma-separated value or by specifying the option multiple times.
If an option has a optional pkg
argument but none is given, the option will be applied to all packages instead.
All pkg
options support glob matching via picomatch or regex (on CLI, wrap the regex in slashes, e.g. '/^foo/'
).
Notes
The module uses global fetch
under the hood. In Node.js HTTP proxies from environment are not supported, but it's still possible to enable updates
to use them by installing the undici
dependency into your project.
Config File
The config file is used to configure certain options of the module. CLI arguments have precedence over options in the config file, except for include
and exclude
options which are merged.
export default {
exclude: [
"semver",
"@vitejs/*",
/^react(-dom)?$/,
],
};
Config File Locations
The config file can be placed in these locations, relative to package.json
:
updates.config.js
updates.config.mjs
.config/updates.js
.config/updates.mjs
Config File Options
include
Array[String|Regexp]: Array of dependencies to includeexclude
Array[String|Regexp]: Array of dependencies to excludetypes
Array[String]: Array of dependency typesregistry
String: URL to npm registry
© silverwind, distributed under BSD licence