You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
There's two problems while using the "create a tarball of your package as-is" method of npm publish.
Publishing a package that has extra files or uncommitted changes. To be fair, this one is my own fault. However, using git push as a deploy mechanism is a welcomed habit that many have. Exposing this would keep the workflows of git users uniform, so it is indeed a "nice to have" in addition to the fact that it prevents you from publishing anything you didn't intend to.
The second is in the handling of cross-platform newlines (npm publish from Windows handles CRLF incorrectly #2097). Since this is an existing problem solved rather well by git, allowing git push would eliminate the long-standing issue for all git users.
The text was updated successfully, but these errors were encountered:
Exposing this would keep the workflows of git users uniform, so it is indeed a "nice to have" in addition to the fact that it prevents you from publishing anything you didn't intend to.
I don't understand how these concerns are related – when running npm pack (which is done prior to pushing anything to the registry in npm publish), both .gitignore and .npmignore are used to filter the contents of the packed tarball. Also, the semantics of npm pack are pretty different from something like git archive or git export, and more often than not, packagers want to include things like bundledDependencies that aren't tracked by git. Introducing a separate path for publishing these files is introduces complexity, which is especially irksome given how brittle installing via git is.
I appreciate the creativity of the suggestion, but we're not going to add this to npm. The workflow is meant to put packages on the registry, and there's enough going on with the registry that allowing git as a publishing mechanism to it is not going to get traction in the foreseeable future.
There's two problems while using the "create a tarball of your package as-is" method of
npm publish
.git push
as a deploy mechanism is a welcomed habit that many have. Exposing this would keep the workflows of git users uniform, so it is indeed a "nice to have" in addition to the fact that it prevents you from publishing anything you didn't intend to.git push
would eliminate the long-standing issue for all git users.The text was updated successfully, but these errors were encountered: