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

[Fixes #203] Exclude test folder from npm registry #205

Merged

Conversation

SethDavenport
Copy link
Contributor

@SethDavenport SethDavenport commented Feb 11, 2019

Why?

The code under test isn't needed at runtime. Since it also relies on a version of JQuery that has CVEs it also trips retirejs security checks. See discussion in #203.

What?

I added test/ to .npmingore

How I Tested

Running npm publish --dry-run prior to this change:

 ~/c/p/madge   master  npm publish --dry-run                                                                                                Mon 11 Feb 17:17:56 2019
npm notice
npm notice 📦  madge@3.4.3
npm notice === Tarball Contents ===
npm notice 1.6kB  package.json
npm notice 222B   .editorconfig
npm notice 100B   .eslintrc
npm notice 137B   .travis.yml
npm notice 9.2kB  CHANGELOG.md
npm notice 1.1kB  LICENSE
npm notice 10.6kB README.md
npm notice 5.5kB  bin/cli.js
npm notice 3.0kB  lib/api.js
npm notice 1.4kB  lib/cyclic.js
npm notice 3.8kB  lib/graph.js
npm notice 59B    lib/log.js
npm notice 3.3kB  lib/output.js
npm notice 5.9kB  lib/tree.js
npm notice 2.1kB  test/amd.js
npm notice 127B   test/amd/amdes6.js
npm notice 53B    test/amd/circular/a.js
npm notice 45B    test/amd/circular/b.js
npm notice 45B    test/amd/circular/c.js
npm notice 37B    test/amd/circular/d.js
npm notice 45B    test/amd/circular/e.js
npm notice 45B    test/amd/circular/f.js
npm notice 45B    test/amd/circular/g.js
npm notice 45B    test/amd/circular/h.js
npm notice 52B    test/amd/circular/main.js
npm notice 68B    test/amd/circularAlias/config.js
npm notice 36B    test/amd/circularAlias/dos.js
npm notice 38B    test/amd/circularAlias/x86.js
npm notice 55B    test/amd/circularRelative/a.js
npm notice 56B    test/amd/circularRelative/foo/b.js
npm notice 43B    test/amd/nested/a.js
npm notice 42B    test/amd/nested/b.js
npm notice 93B    test/amd/nested/main.js
npm notice 49B    test/amd/ok/a.js
npm notice 0      test/amd/ok/d.js
npm notice 49B    test/amd/ok/e.js
npm notice 49B    test/amd/ok/sub/b.js
npm notice 45B    test/amd/ok/sub/c.js
npm notice 79B    test/amd/plugin.js
npm notice 50B    test/amd/requirejs/a.js
npm notice 391B   test/amd/requirejs/config.js
npm notice 0      test/amd/requirejs/vendor/baz.js
npm notice 0      test/amd/requirejs/vendor/jquery-2.0.3.js
npm notice 0      test/amd/requirejs/vendor/jquery.bar-1.0.js
npm notice 0      test/amd/requirejs/vendor/jquery.foo-1.0.js
npm notice 0      test/amd/requirejs/vendor/quux.js
npm notice 6.6kB  test/api.js
npm notice 1.7kB  test/cjs.js
npm notice 33B    test/cjs/a.js
npm notice 15B    test/cjs/b.js
npm notice 74B    test/cjs/both.js
npm notice 0      test/cjs/c.js
npm notice 67B    test/cjs/chained.js
npm notice 71B    test/cjs/circular/a.js
npm notice 23B    test/cjs/circular/b.js
npm notice 0      test/cjs/circular/c.js
npm notice 23B    test/cjs/circular/d.js
npm notice 22B    test/cjs/circular/foo.js
npm notice 2B     test/cjs/circular/foo.json
npm notice 45B    test/cjs/core.js
npm notice 19B    test/cjs/error.js
npm notice 52B    test/cjs/missing.js
npm notice 21B    test/cjs/multibase/1/a.js
npm notice 21B    test/cjs/multibase/2/b.js
npm notice 293B   test/cjs/nested.js
npm notice 0      test/cjs/node_modules/a.js
npm notice 0      test/cjs/node_modules/b.js
npm notice 0      test/cjs/node_modules/c.js
npm notice 0      test/cjs/node_modules/doom.js
npm notice 0      test/cjs/node_modules/events2.js
npm notice 0      test/cjs/node_modules/y.js
npm notice 50B    test/cjs/normal/a.js
npm notice 21B    test/cjs/normal/d.js
npm notice 46B    test/cjs/normal/sub/b.js
npm notice 47B    test/cjs/normal/sub/c.js
npm notice 52B    test/cjs/npm.js
npm notice 282B   test/cjs/strings.js
npm notice 259B   test/cjs/word.js
npm notice 1.4kB  test/es6.js
npm notice 29B    test/es6/absolute.js
npm notice 63B    test/es6/absolute/a.js
npm notice 21B    test/es6/absolute/b.js
npm notice 25B    test/es6/circular/a.js
npm notice 25B    test/es6/circular/b.js
npm notice 25B    test/es6/circular/c.js
npm notice 19B    test/es6/error.js
npm notice 68B    test/es6/re-export/a.js
npm notice 29B    test/es6/re-export/b-default.js
npm notice 28B    test/es6/re-export/b-named.js
npm notice 20B    test/es6/re-export/b-star.js
npm notice 104B   test/es6/re-export/c.js
npm notice 0      test/es6/webpack/src/sub/abs.js
npm notice 27B    test/es6/webpack/src/sub/index.js
npm notice 29B    test/es6/webpack/src/sub/rel.js
npm notice 124B   test/es6/webpack/webpack.config.js
npm notice 357B   test/es7.js
npm notice 55B    test/es7/async.js
npm notice 0      test/es7/other.js
npm notice 585B   test/flow.js
npm notice 89B    test/flow/cjs/calc.js
npm notice 286B   test/flow/cjs/math.js
npm notice 61B    test/flow/es/calc.js
npm notice 468B   test/flow/es/math.js
npm notice 365B   test/jsx.js
npm notice 193B   test/jsx/basic.jsx
npm notice 23B    test/jsx/other.jsx
npm notice 979B   test/output.sh
npm notice 1.1kB  test/typescript.js
npm notice 215B   test/typescript/custom-paths/import.ts
npm notice 19B    test/typescript/custom-paths/subfolder/index.ts
npm notice 108B   test/typescript/custom-paths/subfolder/require.tsx
npm notice 94B    test/typescript/custom-paths/subfolder2/export.ts
npm notice 73B    test/typescript/export-x.tsx
npm notice 94B    test/typescript/export.ts
npm notice 185B   test/typescript/import.ts
npm notice 166B   test/typescript/require-x.tsx
npm notice 121B   test/typescript/require.ts
npm notice === Tarball Details ===
npm notice name:          madge
npm notice version:       3.4.3
npm notice package size:  22.0 kB
npm notice unpacked size: 67.0 kB
npm notice shasum:        66bbde7b94dc6bedbc32e073f9f320d067832fb1
npm notice integrity:     sha512-oeB3VrWyEA8Ju[...]MMylB2q7OnwhQ==
npm notice total files:   117
npm notice
+ madge@3.4.3

Running npm publish --dry-run after this change:

 ~/c/p/madge   chore(exclude-test-folder-from-npm)  npm publish --dry-run                                                          3266ms  Mon 11 Feb 17:18:30 2019
npm notice
npm notice 📦  madge@3.4.3
npm notice === Tarball Contents ===
npm notice 1.6kB  package.json
npm notice 222B   .editorconfig
npm notice 100B   .eslintrc
npm notice 137B   .travis.yml
npm notice 9.2kB  CHANGELOG.md
npm notice 1.1kB  LICENSE
npm notice 10.6kB README.md
npm notice 5.5kB  bin/cli.js
npm notice 3.0kB  lib/api.js
npm notice 1.4kB  lib/cyclic.js
npm notice 3.8kB  lib/graph.js
npm notice 59B    lib/log.js
npm notice 3.3kB  lib/output.js
npm notice 5.9kB  lib/tree.js
npm notice === Tarball Details ===
npm notice name:          madge
npm notice version:       3.4.3
npm notice package size:  14.7 kB
npm notice unpacked size: 45.8 kB
npm notice shasum:        e57177dfe400dc1f9154652623d921d675520af9
npm notice integrity:     sha512-m5km9W+EYr+P0[...]nlH7QhRsCp7Vg==
npm notice total files:   14
npm notice
+ madge@3.4.3

@SethDavenport SethDavenport changed the title Exclude test folder from npm registry [Fixes #203] Exclude test folder from npm registry Feb 11, 2019
@SethDavenport SethDavenport mentioned this pull request Feb 11, 2019
@pahen pahen merged commit cb02e7b into pahen:master Feb 12, 2019
@pahen
Copy link
Owner

pahen commented Feb 12, 2019

Cool, thanks. I’ll publish to NPM once I’m back from vacation.

@pahen
Copy link
Owner

pahen commented Feb 12, 2019

Published to NPM now :)

nmeylan pushed a commit to nmeylan/madge that referenced this pull request Jan 7, 2020
…lder-from-npm)

[Fixes pahen#203] Exclude test folder from npm registry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants