Skip to content

Commit

Permalink
npm-packlist@1.4.4
Browse files Browse the repository at this point in the history
Never include /.git in the package.  It creates packages that, once
installed, can not be easily removed.

Prevent .DS_Store files from being picked up if they are files rather
than folders.  (Note that a .DS_Store file in a specifically included
dir _will_ still be included.)

Don't bother walking node_modules in the root if no packages are
bundled.  (Saves thousands of lstat calls on npm publish in normal
cases.)

Sort package file lists in the tarball to optimize for gzip compression.
  • Loading branch information
isaacs committed Jun 30, 2019
1 parent f101d44 commit ec62362
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 33 deletions.
42 changes: 33 additions & 9 deletions node_modules/npm-packlist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 16 additions & 15 deletions node_modules/npm-packlist/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"npm-install-checks": "~3.0.0",
"npm-lifecycle": "^2.1.0",
"npm-package-arg": "^6.1.0",
"npm-packlist": "^1.4.1",
"npm-packlist": "^1.4.4",
"npm-pick-manifest": "^2.2.3",
"npm-registry-fetch": "^3.9.0",
"npm-user-validate": "~1.0.0",
Expand Down
2 changes: 1 addition & 1 deletion test/tap/pack-files-and-ignores.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ test('default-ignored files can be explicitly included', function (t) {
})
)
withFixture(t, fixture, function (done) {
t.ok(fileExists('.git'), '.git included')
t.notOk(fileExists('.git'), '.git should never be included')
t.ok(fileExists('.svn'), '.svn included')
t.ok(fileExists('CVS'), 'CVS included')
t.ok(fileExists('.hg'), '.hg included')
Expand Down
8 changes: 4 additions & 4 deletions test/tap/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ test('npm publish --json', (t) => {
name: 'publish-organized',
version: '1.2.5',
files: [
{path: 'package.json'},
{path: 'index.js'}
{path: 'index.js'},
{path: 'package.json'}
],
entryCount: 2
}, 'JSON output reflects package contents')
Expand Down Expand Up @@ -154,8 +154,8 @@ test('npm publish --dry-run --json', (t) => {
name: 'publish-organized',
version: '1.2.5',
files: [
{path: 'package.json'},
{path: 'index.js'}
{path: 'index.js'},
{path: 'package.json'}
],
entryCount: 2
}, 'JSON output reflects package contents')
Expand Down

0 comments on commit ec62362

Please sign in to comment.