Usage
Parameters
Specific packages to update. When omitted, updates all dependencies.Formats:
package-name- Update to latest matching semver rangepackage-name@version- Update to specific version
Options
Enable verbose output.
Display help information.
Examples
Update all dependencies
Update specific packages
Update to specific version
No updates available
Verbose output
Update Behavior
Without package arguments
- Re-resolves all dependencies from the npm registry
- Updates to latest versions within semver ranges in
package.json - Refreshes
ant.lockblockfile - Installs updated packages
With package arguments
- Updates specified packages to latest or specified version
- Modifies version in
package.json - Updates lockfile
- Installs all dependencies
Semver Ranges
Respects semver ranges inpackage.json:
Cache Usage
Utilizes cached packages when available for faster updates:Lockfile Refresh
Theant update command always regenerates the lockfile, which is useful when:
- Registry metadata has changed
- Fixing corrupted lockfiles
- Ensuring latest resolutions within constraints
Related
- ant install - Install from lockfile
- ant add - Add new packages