ai-assist-npm-update

Update outdated npm dependencies across multiple package.json files.

87|12|Updated Sep 17, 2024
One-click install
npx skills add https://github.com/jparkerweb/ai-assist-skills --skill ai-assist-npm-update
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-assist-npm-update
Source: https://github.com/jparkerweb/ai-assist-skills/tree/main/skills/ai-assist-npm-update
Command: npx skills add https://github.com/jparkerweb/ai-assist-skills --skill ai-assist-npm-update

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Bulk-update outdated npm dependencies across multiple package.json files in a project tree. It finds every package.json under the current working directory (excluding node_modules), reads npm outdated, upgrades each outdated dependency to its wanted version, then runs npm install to refresh lockfiles.

Core Features & Use Cases

  • Bulk upgrades: updates all relevant dependencies across many projects in one pass.
  • Safe in-range upgrades: upgrades to wanted versions to stay within existing version ranges.
  • Monorepo support: works across multi-project repositories with shared dependencies.

Quick Start

Run the bundled npm-update script to detect outdated dependencies, bump them to the wanted versions, and run npm install across all detected projects.

Frequently Asked Questions about ai-assist-npm-update

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bulk update npm dependencies across multiple package.json files in a monorepo?

To bulk update npm dependencies across a monorepo, this Skill scans your project tree for package.json files, detects outdated packages using npm outdated, and upgrades each to its wanted version before running npm install.

Can I safely upgrade npm dependencies to stay within their existing version ranges?

Yes, safe in-range upgrades are supported. The Skill reads npm outdated output and rewrites dependency version specifiers to the wanted version using the caret prefix, ensuring upgrades stay within compatible ranges.

How does updating package.json files preserve my existing formatting and indentation?

When updating package.json files, the Skill detects and preserves your existing indentation style, writes back the file with the new dependency version specifiers, and then runs npm install to refresh your lockfiles.

Does this npm dependency update tool support a dry run mode?

Yes, the npm dependency update tool supports a dry run mode. By passing the --dry-run flag, you can preview the detected outdated packages and planned version bumps across your project tree without modifying any files.

What is the best way to update outdated nodejs dependencies across many projects at once?

The best way to update outdated nodejs dependencies across many projects is using a bulk-update tool that traverses your project tree, excludes node_modules, and applies consistent version upgrades to every detected package.json file.

Can I customize the root directory scope when running a bulk npm package update?

Yes, you can customize the root directory scope by passing the --root flag. This allows you to target a specific subdirectory within your project tree rather than running the npm package update from the current working directory.