svelte-persistent-store icon indicating copy to clipboard operation
svelte-persistent-store copied to clipboard

package.json: Switch to prepublish non-only to allow usage as Git dependency

Open ckiee opened this issue 6 months ago • 2 comments

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

ckiee avatar Jun 28 '25 14:06 ckiee

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

MacFJA avatar Jun 29 '25 20:06 MacFJA

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.

ckiee avatar Jun 30 '25 00:06 ckiee