npm-package-updates
Guides through npm package updates including minor/patch updates and major version updates. Use when user wants to update npm dependencies, handle breaking changes, manage package versions, or run npm outdated/update commands.
What this skill does
# npm Package Updates
This skill guides you through the process of updating npm packages in this project, including minor/patch updates and major version updates.
**Execution model:** Begin Part 1 immediately — do not ask for confirmation or approval before starting. Complete all of Part 1 autonomously (prerequisites through commit). Only pause for user input at the explicit checkpoint in Part 2 Step 4, before applying any major version updates.
## Prerequisites
### Check Environment
Determine if ddev is running:
```bash
ddev describe 2>/dev/null
```
- If the command succeeds (exit code 0), prefix every npm command with `ddev gesso`. Example: `npm update --save` becomes `ddev gesso npm update --save`
- If the command fails, run `nvm use` to ensure the correct Node version
### Install packages
Run `npm ci` to ensure installed packages match package-lock.json
## Part 1: Minor and Patch Version Updates
Minor and patch updates follow semantic versioning and should not introduce breaking changes.
### Steps:
1. **Update packages:**
```bash
npm update --save
```
This updates packages to their latest minor and patch versions within the semver range specified in package.json.
2. **Fix any issues:**
- Address any linting errors and warnings (stylelint, eslint)
- Address any Sass deprecation warnings if relevant
- Fix any formatting issues (prettier)
- Resolve TypeScript errors if relevant
- Update deprecated code patterns
3. **Test the updates:**
Run all three test suites to ensure everything still works:
```bash
npm run build # Build application or theme
npm run test # Run linting and TypeScript checks
npm run build-storybook # Build Storybook
```
4. **Commit the changes:**
```bash
git add package.json package-lock.json [other modified files]
git commit -m "Minor and patch version updates"
```
## Part 2: Major Version Updates
Major version updates may introduce breaking changes and require careful review. Unlike Part 1, Part 2 has an explicit pause at Step 4: present the research summary to the user and wait for their approval before installing anything.
### Steps:
1. **Identify packages with major updates:**
```bash
npm outdated
```
Look for packages where the "Latest" version has a different major version than "Current".
2. **Prioritize and filter updates:**
- Skip packages that have dedicated update branches
- Skip Node.js version updates if not ready for that version
- Prioritize dev dependencies over production dependencies
- Start with smaller, less critical packages first
3. **Research ALL major updates in parallel using subagents:**
Launch one subagent per package simultaneously — do not research packages sequentially. Each subagent works independently, so all research completes in roughly the time it takes to research one package.
For each package with a major update available, spawn an Agent tool call using:
- `subagent_type`: `npm-package-updates:research-package-subagent`
- `prompt`: the package inputs in this format:
```
Package name: <package-name>
Current version: <current-version>
Latest version: <latest-version>
```
Send all Agent calls in a single message so they run concurrently. Wait for all subagents to return before proceeding to step 4.
Collect each subagent's structured findings report and consolidate them into a single summary for the user.
4. **Present summary to user and await decision:**
- Present all major update summaries in a clear format
- Include source links for documentation
- Ask the user which updates they want to proceed with
- **DO NOT proceed with any major updates until user explicitly approves**
5. **For each approved major update:**
c. **Update the package:**
```bash
# For dev dependencies
npm install <package-name>@latest --save-dev
# For production dependencies
npm install <package-name>@latest --save
```
d. **Test the update:**
Run the full test suite:
```bash
npm run build
npm run test
npm run build-storybook
```
d. **Handle failures:**
- If tests fail, review the error messages
- Check if additional code changes are needed
- Rerun tests after fixes
- If unable to resolve, roll back and inform user
e. **Commit the update:**
```bash
git add package.json package-lock.json [other modified files]
git commit -m "Update <package-name> to v<version>"
```
## Testing Requirements
All updates must pass these tests before committing:
1. **Next.js Build** (`npm run build`)
- Compiles successfully
- No build errors
- Linting passes
- Type checking passes
2. **Test Suite** (`npm run test`)
- ESLint: No warnings or errors
- Stylelint: No CSS linting errors
- TypeScript: No type errors
3. **Storybook Build** (`npm run build-storybook`)
- Builds successfully
- All stories compile
## Commit Message Format
- Minor/patch updates: `"Minor and patch version updates"`
- Major updates: `"Update <package-name> to v<version>"`
- Include only the changes relevant to that commit
## Example: Major Update Workflow
For updating `@inquirer/prompts` from v7 to v8:
1. Check npm outdated → Found v8.0.1 available
2. Research breaking changes → Found 5 breaking changes
3. Check codebase usage → Used in `lib/create-component.mjs`
4. Verify no impact → None of the breaking changes affect our usage
5. Update: `npm install @inquirer/prompts@latest --save-dev`
6. Test: Run build, test, build-storybook
7. Commit: `"Update @inquirer/prompts to v8.0.1"`
## Notes
- Always test thoroughly before committing
- Pre-commit hooks will automatically run tests
- If pre-commit modifies files, verify changes and amend if safe
- Keep commits focused on specific updates for easier review and rollback
- Document any code changes required by updates in commit messages if significant
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.