File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ jobs:
264264
265265 - name : Generate DEPENDENCIES.json
266266 if : github.event_name != 'push'
267- run : npm ls --json --all --omit=dev > DEPENDENCIES.json 2>/dev/null || true
267+ run : mkdir -p generated && npm ls --json --all --omit=dev > generated/ DEPENDENCIES.json 2>/dev/null || true
268268
269269 - name : Push version bump via PR
270270 if : github.event_name != 'push'
@@ -276,10 +276,10 @@ jobs:
276276 BRANCH="release/v${VERSION}"
277277
278278 # Check if there are version bump changes to push
279- if git diff --quiet HEAD -- package.json package-lock.json CHANGELOG.md DEPENDENCIES.json; then
279+ if git diff --quiet HEAD -- package.json package-lock.json CHANGELOG.md generated/ DEPENDENCIES.json; then
280280 echo "No version bump commit to push — skipping PR"
281281 else
282- git add package.json package-lock.json CHANGELOG.md DEPENDENCIES.json
282+ git add package.json package-lock.json CHANGELOG.md generated/ DEPENDENCIES.json
283283 git commit -m "chore: release v${VERSION}"
284284 git push origin "HEAD:refs/heads/${BRANCH}"
285285 gh pr create \
Original file line number Diff line number Diff line change @@ -6,5 +6,7 @@ coverage/
66grammars /* .wasm
77.claude /session-edits.log
88.claude /codegraph-checked.log
9+ generated /DEPENDENCIES.md
10+ generated /DEPENDENCIES.json
911artifacts /
1012pkg /
Original file line number Diff line number Diff line change 11const { execSync } = require ( 'child_process' ) ;
22const fs = require ( 'fs' ) ;
3+ const path = require ( 'path' ) ;
4+
5+ const outFile = path . join ( 'generated' , 'DEPENDENCIES.md' ) ;
6+ fs . mkdirSync ( path . dirname ( outFile ) , { recursive : true } ) ;
37
48try {
59 const tree = execSync ( 'npm ls --all --omit=dev' , { encoding : 'utf8' } ) ;
6- fs . writeFileSync (
7- 'DEPENDENCIES.md' ,
8- '# Dependencies\n\n```\n' + tree + '```\n' ,
9- ) ;
10+ fs . writeFileSync ( outFile , '# Dependencies\n\n```\n' + tree + '```\n' ) ;
1011} catch ( err ) {
1112 // npm ls exits non-zero on ELSPROBLEMS (version mismatches in optional deps).
1213 // If stdout still has content, write it; otherwise skip silently.
1314 if ( err . stdout ) {
1415 fs . writeFileSync (
15- 'DEPENDENCIES.md' ,
16+ outFile ,
1617 '# Dependencies\n\n```\n' + err . stdout + '```\n' ,
1718 ) ;
1819 } else {
You can’t perform that action at this time.
0 commit comments