Skip to content

chore(#1184): publishConfig.tag next — a bare npm publish can never move latest - #1185

Merged
admarble merged 2 commits into
mainfrom
chore/1184-publish-tag-next
Sep 27, 2026
Merged

admarble merged 2 commits into
mainfrom
chore/1184-publish-tag-next

Conversation

@admarble

@admarble admarble commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1184

A bare npm publish of this package now lands on the next dist-tag. latest moves only through the deliberate /release --soaked promotion (npm dist-tag add … latest). A bare publish moved latest straight past the soak on both 2.17.0 and 2.18.0, even though the handoff line carried --tag next. An instruction isn't a guard; package config is.

Change

  • package.json: "publishConfig": { "tag": "next" }.
  • /release Step 9, all three copies: notes the new default. The handoff line keeps --tag next, which is explicit, harmless, and pinned by release-skill-soak.test.ts.
  • CHANGELOG [Unreleased] → ### Changed.

Why the test runs real npm

npm's --dry-run notice prints config.get('tag'), which never sees publishConfig. It said "with tag latest" even with the change in place. The real publish uses the flattened defaultTag, which does see it (npm 10.9.8, lib/commands/publish.js; CLI flags are filtered out first, so an explicit --tag still wins). So scripts/release-publish-tag.integration.test.ts runs the real npm publish --ignore-scripts against a throwaway HTTP server on 127.0.0.1, with a temporary userconfig and token and every inherited npm_config_* stripped, then asserts the dist-tags in the PUT body. Nothing reaches the real registry.

  • AC-1: node -p "require('./package.json').publishConfig.tag" → next
  • AC-2: npx vitest run scripts/release-publish-tag.integration.test.ts → 2 passed (bare → ["next"], --tag beta → ["beta"])
  • AC-3: grep -n "publishConfig" matches all three release/SKILL.md copies; npm run lint:skill-sync → 44 synced; release-skill-soak.test.ts → 4 passed
  • AC-4: npx vitest run --project canary → 4 passed

Mutation-verified: AC-2 — deleted publishConfig from package.json; scripts/release-publish-tag.integration.test.ts "1184: a bare npm publish tags next, not latest" failed (received ["latest"]; 1 failed | 1 passed); restored.

🤖 Generated with Claude Code

@admarble
admarble merged commit f1516fd into main Sep 27, 2026
10 checks passed
@admarble
admarble deleted the chore/1184-publish-tag-next branch September 27, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore(release): set publishConfig.tag to next so a bare npm publish can never move latest

1 participant