Skip to content

fix(analytics): npm publish no longer triggers a registry publish - #5

Merged
danielmlr merged 1 commit into
mainfrom
fix/publish-lifecycle
Sep 25, 2026
Merged

danielmlr merged 1 commit into
mainfrom
fix/publish-lifecycle

Conversation

@danielmlr

Copy link
Copy Markdown
Member

Found in the dry run before the first npm publish.

emdash-plugin init generates "publish": "emdash-plugin publish". npm and pnpm run a script named publish automatically after every publish, so npm publish would also have pushed the plugin to the EmDash registry. pnpm publish --dry-run did exactly that and stopped at "Not logged in. Run: emdash-plugin login".

  • publish → registry:publish, login → registry:login (the registry publish stays a deliberate step).
  • prepublishOnly: pnpm run build, so a publish always ships a fresh dist/.
  • AGENTS.md: never name a script publish, version or prepare, and why.

Checked: the dry run now builds and stops at npm without touching the registry; pnpm pack gives 11 files, 40 KB (dist, manifest, README, LICENSE), peer emdash: >=0.39.0.

No changeset: the package is unreleased.

`emdash-plugin init` generated a script named `publish`. npm and pnpm
run a script with that name after every publish, so the first
`npm publish` would also have started `emdash-plugin publish` against
the EmDash registry; a dry run did exactly that and stopped at "Not
logged in". The registry commands are now `registry:publish` and
`registry:login`, and `prepublishOnly` builds first so a stale dist
cannot be published. AGENTS.md says why.
@danielmlr
danielmlr merged commit dd052fb into main Sep 25, 2026
2 checks passed
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.

1 participant