npm-check-updates
- Version 19.2.0
- Published
- 5.83 MB
- No dependencies
- Apache-2.0 license
Install
npm i npm-check-updatesyarn add npm-check-updatespnpm add npm-check-updatesOverview
Find newer versions of dependencies than what your package.json allows
Index
Functions
Interfaces
RunOptions
- cache
- cacheClear
- cacheExpiration
- cacheFile
- color
- concurrency
- configFileName
- configFilePath
- cooldown
- cwd
- deep
- dep
- deprecated
- doctor
- doctorInstall
- doctorTest
- enginesNode
- errorLevel
- filter
- filterResults
- filterVersion
- format
- global
- groupFunction
- install
- interactive
- jsonAll
- jsonDeps
- jsonUpgraded
- loglevel
- mergeConfig
- minimal
- packageData
- packageFile
- packageManager
- peer
- pre
- prefix
- registry
- registryType
- reject
- rejectVersion
- removeRange
- retry
- root
- silent
- stdin
- target
- timeout
- upgrade
- verbose
- workspace
- workspaces
Type Aliases
Functions
function defineConfig
defineConfig: (config: RcOptions) => RcOptions;TypeScript helper for .npmrc config file. Similar to vite and eslint's defineConfig helper
function run
run: ( runOptions?: RunOptions, { cli }?: { cli?: boolean }) => Promise<PackageFile | Index<VersionSpec> | void>;Main entry point.
Returns
Promise< PackageFile Default returns upgraded package file. | Index --jsonUpgraded returns only upgraded dependencies. | void --global upgrade returns void. >
function run_2
run_2: ( runOptions?: RunOptions, { cli }?: { cli?: boolean }) => Promise<PackageFile | Index<VersionSpec> | void>;Main entry point.
Returns
Promise< PackageFile Default returns upgraded package file. | Index --jsonUpgraded returns only upgraded dependencies. | void --global upgrade returns void. >
Interfaces
interface RunOptions
interface RunOptions {}Options that can be given on the CLI or passed to the ncu module to control all behavior.
property cache
cache?: boolean;Cache versions to a local cache file. Default
--cacheFileis ~/.ncu-cache.json and default--cacheExpirationis 10 minutes.
property cacheClear
cacheClear?: boolean;Clear the default cache, or the cache file specified by
--cacheFile.
property cacheExpiration
cacheExpiration?: number;Cache expiration in minutes. Only works with
--cache.10
property cacheFile
cacheFile?: string;Filepath for the cache file. Only works with
--cache."~/.ncu-cache.json"
property color
color?: boolean;Force color in terminal.
property concurrency
concurrency?: number;Max number of concurrent HTTP requests to registry.
8
property configFileName
configFileName?: string;Config file name. (default: .ncurc.{json,yml,js,cjs})
property configFilePath
configFilePath?: string;Directory of .ncurc config file. (default: directory of
packageFile)
property cooldown
cooldown?: number | CooldownFunction;Sets a minimum age (in days) for package versions to be considered for upgrade, reducing the risk of installing newly published, potentially compromised packages. Run "ncu --help --cooldown" for details.
property cwd
cwd?: string;Working directory in which npm will be executed.
property deep
deep?: boolean;Run recursively in current working directory. Alias of (
--packageFile '**\/package.json').
property dep
dep?: string | readonly string[];Check one or more sections of dependencies only: dev, optional, peer, prod, or packageManager (comma-delimited).
["prod","dev","optional","packageManager"]
property deprecated
deprecated?: boolean;Include deprecated packages. Use
--no-deprecatedto exclude deprecated packages (20–25% slower).true
property doctor
doctor?: boolean;Iteratively installs upgrades and runs tests to identify breaking upgrades. Requires
-uto execute. Run "ncu --help --doctor" for details.
property doctorInstall
doctorInstall?: string;Specifies the install script to use in doctor mode. (default:
npm installor the equivalent for your package manager)
property doctorTest
doctorTest?: string;Specifies the test script to use in doctor mode. (default:
npm test)
property enginesNode
enginesNode?: boolean;Include only packages that satisfy engines.node as specified in the package file.
property errorLevel
errorLevel?: number;Set the error level. 1: exits with error code 0 if no errors occur. 2: exits with error code 0 if no packages need updating (useful for continuous integration).
1
property filter
filter?: string | RegExp | readonly (string | RegExp)[] | FilterFunction;Include only package names matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function. Run "ncu --help --filter" for details.
property filterResults
filterResults?: FilterResultsFunction;Filters results based on a user provided predicate function after fetching new versions. Run "ncu --help --filterResults" for details.
property filterVersion
filterVersion?: string | RegExp | readonly (string | RegExp)[] | FilterFunction;Filter on package version using comma-or-space-delimited list, /regex/, or predicate function. Run "ncu --help --filterVersion" for details.
property format
format?: readonly string[];Modify the output formatting or show additional information. Specify one or more comma-delimited values: dep, group, ownerChanged, repo, time, lines, installedVersion. Run "ncu --help --format" for details.
property global
global?: boolean;Check global packages instead of in the current project.
property groupFunction
groupFunction?: GroupFunction;Customize how packages are divided into groups when using
--format group. Run "ncu --help --groupFunction" for details.
property install
install?: 'always' | 'never' | 'prompt';Control the auto-install behavior: always, never, prompt. Run "ncu --help --install" for details.
"prompt"
property interactive
interactive?: boolean;Enable interactive prompts for each dependency; implies
-uunless one of the json options are set.
property jsonAll
jsonAll?: boolean;Output new package file instead of human-readable message.
property jsonDeps
jsonDeps?: boolean;Like
jsonAllbut only listsdependencies,devDependencies,optionalDependencies, etc of the new package data.
property jsonUpgraded
jsonUpgraded?: boolean;Output upgraded dependencies in json.
property loglevel
loglevel?: string;Amount to log: silent, error, minimal, warn, info, verbose, silly.
"warn"
property mergeConfig
mergeConfig?: boolean;Merges nested configs with the root config file for
--deepor--packageFileoptions. (default: false)
property minimal
minimal?: boolean;Do not upgrade newer versions that are already satisfied by the version range according to semver.
property packageData
packageData?: string | PackageFile;Package file data (you can also use stdin).
property packageFile
packageFile?: string;Package file(s) location. (default: ./package.json)
property packageManager
packageManager?: 'npm' | 'yarn' | 'pnpm' | 'deno' | 'bun' | 'staticRegistry';npm, yarn, pnpm, deno, bun, staticRegistry (default: npm). Run "ncu --help --packageManager" for details.
property peer
peer?: boolean;Check peer dependencies of installed packages and filter updates to compatible versions. Run "ncu --help --peer" for details.
property pre
pre?: boolean;Include prerelease versions, e.g. -alpha.0, -beta.5, -rc.2. Automatically set to 1 when
--targetis newest or greatest, or when the current version is a prerelease. (default: 0)
property prefix
prefix?: string;Current working directory of npm.
property registry
registry?: string;Specify the registry to use when looking up package versions.
property registryType
registryType?: 'npm' | 'json';Specify whether --registry refers to a full npm registry or a simple JSON file or url: npm, json. (default: npm) Run "ncu --help --registryType" for details.
property reject
reject?: string | RegExp | readonly (string | RegExp)[] | FilterFunction;Exclude packages matching the given string, wildcard, glob, comma-or-space-delimited list, /regex/, or predicate function. Run "ncu --help --reject" for details.
property rejectVersion
rejectVersion?: string | RegExp | readonly (string | RegExp)[] | FilterFunction;Exclude package.json versions using comma-or-space-delimited list, /regex/, or predicate function. Run "ncu --help --rejectVersion" for details.
property removeRange
removeRange?: boolean;Remove version ranges from the final package version.
property retry
retry?: number;Number of times to retry failed requests for package info.
3
property root
root?: boolean;Runs updates on the root project in addition to specified workspaces. Only allowed with
--workspaceor--workspaces.true
property silent
silent?: boolean;Don't output anything. Alias for
--loglevelsilent.
property stdin
stdin?: string;Read package.json from stdin.
property target
target?: | 'latest' | 'newest' | 'greatest' | 'minor' | 'patch' | 'semver' | `@${string}` | TargetFunction;Determines the version to upgrade to: latest, newest, greatest, minor, patch, semver,
@[tag], or [function]. (default: latest) Run "ncu --help --target" for details.
property timeout
timeout?: number;Global timeout in milliseconds. (default: no global timeout and 30 seconds per npm-registry-fetch)
property upgrade
upgrade?: boolean;Overwrite package file with upgraded versions instead of just outputting to console.
property verbose
verbose?: boolean;Log additional information for debugging. Alias for
--loglevelverbose.
property workspace
workspace?: readonly string[];Run on one or more specified workspaces. Add
--no-rootto exclude the root project.
property workspaces
workspaces?: boolean;Run on all workspaces. Add
--no-rootto exclude the root project.
Type Aliases
type RcOptions
type RcOptions = Omit<RunOptions, Nonsensical> & { $schema?: string; format?: string | string[];};Expected options that might be found in an .ncurc file. Since the config is external, this cannot be guaranteed
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (84)
- @trivago/prettier-plugin-sort-imports
- @types/bun
- @types/chai
- @types/chai-as-promised
- @types/chai-string
- @types/cli-table
- @types/hosted-git-info
- @types/ini
- @types/js-yaml
- @types/jsonlines
- @types/lodash
- @types/mocha
- @types/node
- @types/npm-registry-fetch
- @types/parse-github-url
- @types/picomatch
- @types/progress
- @types/prompts
- @types/semver
- @types/semver-utils
- @types/sinon
- @types/update-notifier
- @typescript-eslint/eslint-plugin
- @typescript-eslint/parser
- camelcase
- chai
- chai-as-promised
- chai-string
- chalk
- cli-table3
- commander
- cross-env
- dequal
- eslint
- eslint-config-prettier
- eslint-config-raine
- eslint-config-standard
- eslint-plugin-import
- eslint-plugin-jsdoc
- eslint-plugin-n
- eslint-plugin-promise
- fast-glob
- fast-memoize
- find-up
- fp-and-or
- hosted-git-info
- ini
- js-yaml
- jsonc-parser
- jsonlines
- lockfile-lint
- lodash
- markdownlint-cli
- mocha
- npm-registry-fetch
- npm-run-all
- p-map
- parse-github-url
- picomatch
- prettier
- progress
- prompts-ncu
- rc-config-loader
- rfdc
- rimraf
- rollup-plugin-node-externals
- semver
- semver-utils
- should
- sinon
- source-map-support
- spawn-please
- strip-ansi
- ts-node
- typescript
- typescript-json-schema
- untildify
- update-notifier
- verdaccio
- vite
- vite-bundle-analyzer
- vite-node
- vite-plugin-dts
- yarn
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/npm-check-updates.
- Markdown[](https://www.jsdocs.io/package/npm-check-updates)
- HTML<a href="https://www.jsdocs.io/package/npm-check-updates"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3840 ms. - Missing or incorrect documentation? Open an issue for this package.
