Closed filipesilva closed 6 years ago
Merging #205 into master will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #205 +/- ##
=======================================
Coverage 94.53% 94.53%
=======================================
Files 25 25
Lines 713 713
=======================================
Hits 674 674
Misses 39 39
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 f153db5...88f36c3. Read the comment docs.
Nice catch, thanks.
Since something similar happened in the past, what do you think about adopting a whitelist approach instead? IIRC package.json allows a files listing that can be used for this purpose.
That seems reasonable as well. In that case .npm-ignore
would be deleted and files would look like this:
"files": [
"lib",
"loader.js",
"CHANGELOG.md",
"README.md"
],
This represents a problem with the /lib/__tests__
ignore rule though. To ignore it, a new ./lib/.npmignore
will need to be added with just /lib/__tests__
, because of this:
You can also provide a .npmignore file in the root of your package or in subdirectories, which will keep files from being included. At the root of your package it will not override the "files" field, but in subdirectories it will.
WDYT?
I'm thinking maybe we can move the tests outside of lib altogether, but I can do that in a separate patchset.
The following looks good to me (dirs first then files, in alphabetical order):
"files": [
"lib",
"CHANGELOG.md",
"LICENSE",
"loader.js",
"README.md"
],
I just tested that and it tars at 25K with the proper files (assuming you use .npmignore
inside lib/
.)
@amireh added the files array as you listed, and moved .npmignore
with only the tests entry.
Looks good to me, gonna pull it down to double-check.
@filipesilva thanks, will publish a new revision shortly!
Coolio, thanks for the quick turnaround!
Version 4.0.1 is now up on npm with this change
Currently
.cache-loader
is being published, with some local data from tests: https://unpkg.com/happypack@4.0.0/.cache-loader/