Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pnpm publish always publishes the created tarball #4593

Closed
RafidMuhymin opened this issue Apr 20, 2022 · 5 comments
Closed

pnpm publish always publishes the created tarball #4593

RafidMuhymin opened this issue Apr 20, 2022 · 5 comments

Comments

@RafidMuhymin
Copy link

pnpm version: 6.32.8

Code to reproduce the issue: pnpm publish

Expected behavior: pnpm publish shouldn't publish the created tarball

Actual behavior: pnpm publish is publishing the created tarball

Additional information:

  • node -v prints: 17.6.0
  • Windows, macOS, or Linux?: Linux
@fireairforce
Copy link
Member

can u please provide a more detailed demo ?

@RafidMuhymin
Copy link
Author

Thanks for your response @fireairforce ! The package I'm trying to publish is astro-imagetools and its code is at https://github.com/RafidMuhymin/astro-imagetools/tree/main/packages/astro-imagetools/. Whenever I'm publishing a new version using pnpm publish, the created tarball is also getting published.

For example, check this links https://unpkg.com/astro-imagetools@0.5.3/astro-imagetools-0.5.3.tgz https://unpkg.com/astro-imagetools@0.5.4/astro-imagetools-0.5.4.tgz and https://unpkg.com/astro-imagetools@0.5.5/astro-imagetools-0.5.5.tgz.

The command is acting like it's equivalent to pnpm pack && npm publish

@zkochan
Copy link
Member

zkochan commented Apr 21, 2022

The root cause of this issue might be the same as the cause of this one: #4348

@zkochan
Copy link
Member

zkochan commented Apr 21, 2022

pnpm packs the tarball and then it runs npm CLI to publish the tarball:

const { status } = runNpm(opts.npmPath, ['publish', '--ignore-scripts', path.basename(tarballName), ...args], {
cwd: tarballDir,
})

Maybe this doesn't work in the latest npm? Although I could not reproduce the issue while looking into #4348

@zkochan
Copy link
Member

zkochan commented May 7, 2022

I believe this is fixed by #4627

@zkochan zkochan closed this as completed May 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants