Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

update-node-deps

/update-node-deps

Audytuje i aktualizuje zależności Node.js, automatycznie stosując łatki, pyta o wersje minor i potwierdza każdą wersję major osobno.

Repozytorium
bag-of-skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
27.09.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
6
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
2
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Audytuje i aktualizuje zależności Node.js, automatycznie stosując łatki, pyta o wersje minor i potwierdza każdą wersję major osobno.

Oryginalny opis (EN)

Audit and update Node.js/JavaScript project dependencies using native package-manager commands (npm, pnpm, yarn, bun). Auto-applies patch updates silently, asks before minor, and confirms each major individually. Cross-checks changelogs via Context7 and security advisories before each batch. Use when the user asks to update dependencies, bump packages, check outdated packages, or audit security in a JS/TS project.

Jak działa

  1. Step 1: Detect the package manager
  2. Step 2: Load the PM reference
  3. Step 3: Detect workspaces / monorepo
  4. Step 4: Check git cleanliness
  5. Step 5: List outdated packages
  6. Step 6: Run the security audit
  7. Step 7: Categorize by semver
  8. Step 8: Fetch changelogs (minor + major only)
  9. Step 9: Apply updates in tiers
  10. Step 10: Verify
Sekcje z nagłówków SKILL.md, w oryginale · 164 linii, 1 035 słów
Podgląd SKILL.md
---
name: update-node-deps
description: Audit and update Node.js/JavaScript project dependencies using native package-manager commands (npm, pnpm, yarn, bun). Auto-applies patch updates silently, asks before minor, and confirms each major individually. Cross-checks changelogs via Context7 and security advisories before each batch. Use when the user asks to update dependencies, bump packages, check outdated packages, or audit security in a JS/TS project.
model: sonnet
---

# Update Node.js Dependencies

Audit and update Node.js project dependencies safely, one semver tier at a time. Use native package-manager commands only — no `npm-check-updates` or other third-party wrappers.

## Step 1: Detect the package manager

Determine the PM in this order (stop at first match):

1. `packageManager` field in `package.json` (corepack convention: `"pnpm@9.x"`, `"yarn@4.x"`, etc.).
2. Lockfile presence:
   - `pnpm-lock.yaml` → **pnpm**
   - `yarn.lock` → **yarn** (detect classic vs berry via `.yarnrc.yml` presence or `yarn --version`)
   - `bun.lockb` or `bun.lock` → **bun**
   - `package-lock.json` → **npm**
3. If multiple lockfiles exist, ask the user which one is authoritative.
4. If no lockfile and no `packageManager` field, default to **npm** and note it.

## Step 2: Load the PM reference

Read the matching reference file for exact native commands — do not hardcode them in this workflow:

- **npm** → [references/npm.md](references/npm.md)
- **pnpm** → [references/pnpm.md](references/pnpm.md)
- **yarn** (classic or berry) → [references/yarn.md](references/yarn.md)
- **bun** → [references/bun.md](references/bun.md)

## Step 3: Detect workspaces / monorepo

Check for: `workspaces` array in root `package.json`, `pnpm-workspace.yaml`, `turbo.json`, `nx.json`, or `lerna.json`.

If detected, ask the user whether to:
- Target the root `package.json` only
- Target a single workspace (list discovered workspace paths)
- Iterate all workspaces sequentially

## Step 4: Check git cleanliness

Run `git status --porcelain -- package.json '*lock*'`. If either `package.json` or the lockfile is dirty, warn the user — a dirty baseline makes tier rollback ambiguous. Ask whether to continue, stash, or abort.

## Step 5: List outdated packages

Use the PM's native outdated command (from the reference file) with JSON output. Parse into rows:

```
{ name, current, wanted, latest, dependencyType }
```

Exclude packages using `workspace:` / `catalog:` / `link:` / `file:` / `git+` protocols — these are local or pinned on purpose.

## Step 6: Run the security audit

Run the PM's native audit command (from the reference file) in JSON mode. Record advisories keyed by package name, with severity (critical / high / moderate / low) and the fixed-in version.

## Step 7: Categorize by semver

For each outdated package, classify the jump from `current` to `latest`:

- **Patch**: `1.2.3` → `1.2.5` (same major.minor).
- **Minor**: `1.2.3` → `1.3.0` (same major).
- **Major**: `1.2.3` → `2.0.0` (major bump).

Pre-1.0 rule (enforce strictly — pre-1.0 libraries break often):
- `0.2.3` → `0.2.9` = **patch**
- `0.2.3` → `0.3.0` = **major** (not minor — treat minor-in-zeromajor as breaking)
- `0.2.3` → `1.0.0` = **major**

## Step 8: Fetch changelogs (minor + major only)

Patch changelogs are noise — skip them. For each minor and major update, fetch release notes in this order:

1. **Context7 MCP**:
   - `mcp__context7__resolve-library-id` with the package name
   - `mcp__context7__query-docs` with the resolved ID and `query="changelog"` (retry with `query="releases"` or `query="breaking changes"` if empty)
2. **GitHub releases via `gh`**:
   - Find repo URL: `npm view <pkg> repository.url --json 2>/dev/null`
   - `gh release view v<version> -R <owner>/<repo>` (try with and without the `v` prefix)
   - Or `gh release list -R <owner>/<repo> --limit 10` to inspect multiple hops
3. **WebFetch fallback**:
   - `https://github.com/<owner>/<repo>/releases` or `https://www.npmjs.com/package/<pkg>`

Summarize each into one line: `"Adds X. Deprecates Y. **Breaking:** Z."` — keep breaking-change callouts prominent.

## Step 9: Apply updates in tiers

Apply in strict order: **patch → minor → major**. After each tier, run verification (Step 10) before proceeding to the next tier. If verification fails, offer rollback and stop.

### Tier 1 — Patches (auto-apply)

Apply all patch updates and all security-fix updates (regardless of semver range) as one batch. Use the PM's batch patch-update command from the reference. Do not prompt. Report count after.

### Tier 2 — Minor (approval gate)

Present the full minor batch as a markdown table:

```
| Package | Current → Latest | Fixes advisory? | Changelog summary |
```

Ask the user: approve the batch, deselect specific packages, or skip tier entirely. Apply approved packages; report.

### Tier 3 — Major (per-package confirmation)

Iterate majors one at a time. For each:
- Show `current → latest`
- Show changelog summary with **breaking changes flagged**
- Link codemod / migration guide if found in the changelog
- Note any type-definition changes (`@types/*` jumps often come with API shifts)

Ask per-package: **apply / skip / defer-to-later**. Apply each approved major individually, run install, then immediately run verification (Step 10). If verification fails for a specific major, offer rollback of just that package and continue to the next major.

## Step 10: Verify

Run after each tier (and after each individual major):

1. Install must have exited 0.
2. If `tsconfig.json` exists: run `npx tsc --noEmit` (or the `typecheck` script if defined in `package.json`).
3. If `scripts.build` exists in `package.json`: run it via the PM.
4. If `scripts.test` exists: offer to run it (don't force — tests can be slow).

On failure:
- Report the exact error (first 50 lines).
- Offer rollback: `git checkout -- package.json <lockfile>` then re-run the PM's install.
- Do not proceed to the next tier.

## Step 11: Final report

Emit a concise markdown report:

```markdown
# Node.js Dependencies Update Report

**Package manager:** pnpm (detected via pnpm-lock.yaml)
**Scope:** root (or workspace path)

## Applied
- patch: 12 packages (2 fixed advisories)
- minor: 5 packages (1 fixed advisory)
- major: 2 packages

## Skipped / deferred
- `react@19.0.0` — deferred, needs app-wide migration review
- `eslint@9.0.0` — skipped, flat-config migration blocker

## Security advisories
- Resolved: 3 (HIGH: 1, MODERATE: 2)
- Remaining: 1 (LOW — no fix available upstream)

## Verification
- install: ok
- typecheck: ok
- build: ok
- tests: not run (user declined)
```

## Guardrails

- **Never use `--force` or `--legacy-peer-deps`** without explicit user approval. Peer-dep errors are signal, not noise.
- **Never bypass git hooks. Never commit or push.** The user reviews and commits themselves.
- **Skip `overrides` / `resolutions`** entries in `package.json` — they exist to pin problem versions; mention them in the report instead.
- **Preserve `workspace:` / `catalog:` / `link:` / `file:` protocols** — do not rewrite to literal versions.
- **Respect `engines.node`**: if a major update's changelog says it requires a newer Node than `engines.node`, flag and skip.
- **One PM at a time**: do not mix (e.g., do not `npm install` in a pnpm project).
Pliki w paczce (6)
  • README.md 2 KB
  • SKILL.md 7 KB
  • references/bun.md 2 KB
  • references/npm.md 2 KB
  • references/pnpm.md 2 KB
  • references/yarn.md 3 KB

Wersje

W bazie nie ma innych skilli o nazwie update-node-deps.

Migawka bazy z 13.11.2026 · wersja paczki b29c2dc50f60 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100update-golang-deps
    Sprawdza i aktualizuje zależności Go narzędziami go oraz govulncheck, łatki stosuje automatycznie, a wersje minor i major zatwierdza osobno.
  • 100node-deps-bumper
    Aktualizuje zależności projektu: podbija pakiety npm, pnpm, yarn lub bun, sprawdza przestarzałe wersje i uruchamia taze.
  • 100update
    Zbiorczo aktualizuje zależności npm, pnpm, yarn i bun, pomijając frameworki i narzędzia z własnym poleceniem upgrade.
  • 100dependency-update
    Utrzymuje zależności w stylu Dependabota w workspace pnpm: aktualizuje pakiety do bezpiecznych wersji, oznacza zmiany łamiące, podbija Node i pnpm oraz recenzuje PR-y Dependabota.
  • 100deps
    Sprawdza tylko do odczytu nieaktualne lub podatne zależności i kolejkuje jedną partię aktualizacji naraz, raportując wstrzymane pakiety.
  • 100update-deps
    Bezpiecznie podnosi zależności Elixira z Mix i Hex: poprawki i wersje minor, migracje wersji major z researchem changelogów oraz weryfikacja po aktualizacji.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.