Skip to content

Conversation

ckiee
Copy link
Contributor

@ckiee ckiee commented Jun 28, 2025

npm, pnpm and Yarn all don't run prepublishOnly when preparing a Git dependency[1]

There is no commit history indicating why it was prepublishOnly nor was it ever changed to this from something else.

[1] https://github.com/pnpm/pnpm/blob/337a110dbc4c569d523a1faf58b540be8f857297/exec/prepare-package/src/index.ts#L13

…endency

npm, pnpm and Yarn all don't run `prepublishOnly` when preparing a Git dependency[1]

There is no commit history indicating why it was `prepublishOnly` nor was it ever changed to this from something else.

[1] https://github.com/pnpm/pnpm/blob/337a110dbc4c569d523a1faf58b540be8f857297/exec/prepare-package/src/index.ts#L13
@MacFJA
Copy link
Owner

MacFJA commented Jun 29, 2025

The prepublish event is marked as deprecated in the NPM documentation (Since at least version 6

PNPM support the prepublishOnly event


I will have to take a look at it, but the last time I did a npm publish, the prepublishOnly was triggered

@ckiee
Copy link
Contributor Author

ckiee commented Jun 30, 2025

Oh maybe prepare is more suitable then. The caveat is I was doing pnpm i github:ckiee/svelte-persistent-store#priv-distract-o-window to use a branch with all my PRs aggregated in my project, and it needs to run the rollup build script then since the output isn't committed naturally.

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.

2 participants