browserify / resolve

Implements the node.js require.resolve() algorithm
MIT License
776 stars 184 forks source link

Add .npmignore #286

Closed JamieMagee closed 2 years ago

JamieMagee commented 2 years ago

The current contents of the resolve package on npm are:

.
├── appveyor.yml
├── async.js
├── bin
├── .editorconfig
├── .eslintrc
├── example
├── .github
├── index.js
├── lib
├── LICENSE
├── package.json
├── readme.markdown
├── SECURITY.md
├── sync.js
└── test

After applying this .npmignore the contents will be:

.
├── async.js
├── bin
├── index.js
├── lib
├── LICENSE
├── package.json
├── readme.markdown
├── SECURITY.md
└── sync.js

Closes #271

ljharb commented 2 years ago

First, the npmignore file in this repo is autogenerated, which is why .npmignore is gitignored. This particular change will be wiped out with every publish anyways.

Second, this is quite intentional. Those files must be included, and will forever be.

Tests should be published with every package, so that npm explore foo && npm install && npm test always works. Duplicate of #281. Duplicate of #279. Duplicate of https://github.com/browserify/resolve/pull/239. Duplicate of https://github.com/browserify/resolve/issues/235. Duplicate of https://github.com/browserify/resolve/issues/58. Duplicate of https://github.com/browserify/resolve/pull/44. See https://github.com/browserify/resolve/pull/105#issuecomment-266653976.

Please do not file PRs on a project when it's unclear if the change is desired (github creates a permanent, undeletable PR ref on the repo for every PR created, so creating an unwanted PR creates pollution that can never be removed); and in this case, it should be quite clear that the change is not desired.