tim-kos / node-retry

Abstraction for exponential and custom retry strategies for failed operations.
Other
1.22k stars 80 forks source link

Add a whitelist to avoid publishing unwanted files in the registry #72

Closed fraxken closed 4 years ago

fraxken commented 4 years ago

Add the "files" field in the package.json to avoid publishing unwanted files in the registry. Files like

More information on the whitelist field here: https://docs.npmjs.com/files/package.json#files

codecov[bot] commented 4 years ago

Codecov Report

Merging #72 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master     #72   +/-   ##
======================================
  Coverage    90.2%   90.2%           
======================================
  Files           2       2           
  Lines         143     143           
======================================
  Hits          129     129           
  Misses         14      14

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 88548b9...515f1ce. Read the comment docs.

tim-kos commented 4 years ago

Thank you!

wizo06 commented 4 years ago

@tim-kos This needs to be fixed. index.js is not included in "files": [...] and therefore will not be included in the npm registry when you publish the next version.

This is what happens when index.js is missing

Error: Cannot find module '.../node_modules/retry/index'. Please verify that the package.json has a valid "main" entry
wizo06 commented 4 years ago

Another solution is to correct the typo from "main": "index" to "main": "index.js".