Skip to content

Commit afe107e

Browse files
committed
fix: use pnpm jsr instead of global jsr CLI and fix snapshot npm publish to exclude edge-worker
1 parent 14d20d7 commit afe107e

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
"build": "nx run-many --target=build --all",
88
"version": "pnpm changeset version && ./scripts/update-jsr-json-version.sh",
99
"validate:publish:npm": "pnpm nx run-many -t build --exclude=demo,website,example-flows && pnpm publish --dry-run --provenance --recursive --filter=!./pkgs/edge-worker",
10-
"validate:publish:jsr": "cd ./pkgs/edge-worker && jsr publish --dry-run --allow-slow-types",
10+
"validate:publish:jsr": "cd ./pkgs/edge-worker && pnpm jsr publish --dry-run --allow-slow-types",
1111
"validate:publish": "pnpm run validate:publish:npm && pnpm run validate:publish:jsr",
1212
"publish:npm": "pnpm nx run-many -t build --exclude=demo,website,example-flows && pnpm publish --provenance --recursive --filter=!./pkgs/edge-worker",
13-
"publish:jsr": "cd ./pkgs/edge-worker && jsr publish --allow-slow-types",
13+
"publish:jsr": "cd ./pkgs/edge-worker && pnpm jsr publish --allow-slow-types",
1414
"changeset:tag": "pnpm changeset tag && git push --follow-tags",
1515
"release": "git status && pnpm run validate:publish && pnpm run publish:npm && pnpm run publish:jsr && pnpm run changeset:tag"
1616
},

scripts/snapshot-release.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,9 @@ NPM_SUCCESS=false
326326
JSR_SUCCESS=true # Default true (only set false if JSR package exists and fails)
327327
JSR_PUBLISHED_VERSION="" # Track JSR version if published
328328

329-
# Publish to npm (token is read from NPM_TOKEN env var via .npmrc)
330-
# GITHUB_ACTIONS=true skips changeset's npm profile check which fails with automation tokens
329+
# Publish to npm (exclude edge-worker which goes to JSR only)
331330
echo -e "${BOLD}Publishing to npm...${NC}"
332-
if GITHUB_ACTIONS=true pnpm exec changeset publish --tag snapshot ; then
331+
if pnpm publish --recursive --tag snapshot --no-git-checks --filter='!./pkgs/edge-worker' ; then
333332
echo -e "${GREEN}✓ npm packages published${NC}"
334333
NPM_SUCCESS=true
335334
else
@@ -343,7 +342,6 @@ if [[ -f pkgs/edge-worker/jsr.json ]]; then
343342
echo ""
344343
echo -e "${BOLD}Publishing to JSR...${NC}"
345344
JSR_PUBLISH_CMD="pnpm jsr publish --allow-slow-types --allow-dirty"
346-
# Pass token explicitly if set (pnpm jsr may not inherit JSR_TOKEN properly)
347345
if [[ -n "${JSR_TOKEN:-}" ]]; then
348346
JSR_PUBLISH_CMD="$JSR_PUBLISH_CMD --token $JSR_TOKEN"
349347
fi

0 commit comments

Comments
 (0)