Skip to content

Commit 7bdab8f

Browse files
authored
chore(skills): Use yarn-update-dependency (#20635)
Updates the `fix-security-vulnerability` skill to make use of our internal util.
1 parent 6e940f8 commit 7bdab8f

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

  • .agents/skills/fix-security-vulnerability

.agents/skills/fix-security-vulnerability/SKILL.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ git pull origin develop
9292
git checkout -b fix/dependabot-alert-<alert-number>
9393
```
9494

95-
Then apply the fix commands from Step 5 of the single-alert workflow (edit `package.json`, `yarn install`, `yarn dedupe-deps:fix`, verify) — but **skip the "Do NOT commit" instruction**, since user approval was already obtained in Step 2b. After applying:
95+
Then apply the fix commands from Step 5 of the single-alert workflow (`npx yarn-update-dependency@latest <package>`, `yarn dedupe-deps:fix`, verify) — but **skip the "Do NOT commit" instruction**, since user approval was already obtained in Step 2b. After applying:
9696

9797
```bash
9898
# 3. Stage and commit the changes
@@ -263,8 +263,8 @@ Present findings and **wait for user approval** before making changes:
263263
<One of: Safe to bump / Version-specific test - do not bump / Bump parent package>
264264
265265
### Proposed Fix
266-
1. Update <file>: "<package>": "<new-version>"
267-
2. yarn install && yarn dedupe-deps:fix
266+
1. npx yarn-update-dependency@latest <package>
267+
2. yarn dedupe-deps:fix
268268
3. Verify with: yarn why <package>
269269
270270
Proceed?
@@ -273,15 +273,14 @@ Proceed?
273273
### Step 5: Apply Fix (After Approval)
274274
275275
```bash
276-
# 1. Edit package.json
277-
# 2. Update lockfile
278-
yarn install
279-
# 3. Deduplicate
276+
# 1. Upgrade the package (updates package.json + lockfile)
277+
npx yarn-update-dependency@latest <package>
278+
# 2. Deduplicate
280279
yarn dedupe-deps:fix
281-
# 4. Verify
280+
# 3. Verify
282281
yarn dedupe-deps:check
283282
yarn why <package>
284-
# 5. Show changes
283+
# 4. Show changes
285284
git diff
286285
```
287286
@@ -325,6 +324,7 @@ gh api --method PATCH repos/getsentry/sentry-javascript/dependabot/alerts/<numbe
325324
326325
| Command | Purpose |
327326
| ------------------------------------------------------------------------------------------------------------ | ---------------------------- |
327+
| `npx yarn-update-dependency@latest <pkg>` | Upgrade package across repo |
328328
| `yarn why <pkg>` | Show dependency tree |
329329
| `yarn dedupe-deps:fix` | Fix duplicates in yarn.lock |
330330
| `yarn dedupe-deps:check` | Verify no duplicate issues |

0 commit comments

Comments
 (0)