Skip to content

Commit 896b4af

Browse files
dyclaude
andcommitted
publish:all: skip versions already on the registry
npm publish --workspaces fails on unchanged packages (flac/mp3@1.1.1 are already published). Replace it with an inline loop that checks each workspace + root against the registry via `npm view` and publishes only new versions — sub-packages first, root last. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent ade3564 commit 896b4af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"scripts": {
3131
"test": "node test.js",
3232
"test:all": "npm test --workspaces && npm test",
33-
"publish:all": "npm publish --workspaces && npm publish",
33+
"publish:all": "for d in packages/* .; do id=$(node -p \"require('./$d/package.json').name+'@'+require('./$d/package.json').version\"); npm view \"$id\" version >/dev/null 2>&1 && echo \"skip $id\" || (cd \"$d\" && npm publish); done",
3434
"build": "npm run build --workspaces --if-present"
3535
},
3636
"repository": {

0 commit comments

Comments
 (0)