-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add/improve npm ignore configs (#328)
Summary: I noticed that a bunch of test files were being bundled with npm packages. We encounter also the risk to bundle log and .tgz (npm packged module) files when running npm publish. This diff attends to this problem by improving/adding an `.npmignore` config to each sub-module. I've also updated the CHANGELOG.md file and even fixed-up some other things (like adding a missing section for one of our modules). Pull Request resolved: #328 Test Plan: Script to generate list of npm package files: ``` function packlist() { pushd "packages/$1" yarn pack > /dev/null; npx npm-packlist | sort popd > /dev/null } echo "" > packlist.log packlist babel-plugin-fbt >> packlist.log packlist babel-plugin-fbt-runtime >> packlist.log packlist babel-plugin-standalone >> packlist.log packlist default-collection-transform >> packlist.log packlist fb-babel-plugin-utils >> packlist.log packlist fb-tiger-hash >> packlist.log packlist fbt >> packlist.log packlist gulp-rewrite-flowtyped-modules >> packlist.log packlist gulp-strip-docblock-pragmas >> packlist.log packlist react-native-fbt >> packlist.log pastry < packlist.log ``` Comparison of the exported files: https://fburl.com/diffing/2gj65k9b ---- ``` yarn clean-test ``` Reviewed By: pkqinys Differential Revision: D33652464 Pulled By: kayhadrin fbshipit-source-id: ac65707a25a523f7d8d82b7923b288ad229281dd
- Loading branch information
1 parent
4469556
commit fcf2390
Showing
12 changed files
with
116 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
# Since .gitignore is not considered when .npmignore is present | ||
node_modules | ||
|
||
__tests__ | ||
.yarnrc | ||
**.log | ||
**.tgz | ||
**/__fixtures__ | ||
**/__mocks__ | ||
**/__tests__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Since .gitignore is not considered when .npmignore is present | ||
node_modules | ||
|
||
.yarnrc | ||
**.log | ||
**.tgz | ||
**/__fixtures__ | ||
**/__mocks__ | ||
**/__tests__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Since .gitignore is not considered when .npmignore is present | ||
node_modules | ||
|
||
.yarnrc | ||
**.log | ||
**.tgz | ||
**/__fixtures__ | ||
**/__mocks__ | ||
**/__tests__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
src/__tests__ | ||
# Since .gitignore is not considered when .npmignore is present | ||
node_modules | ||
|
||
.yarnrc | ||
**.log | ||
**.tgz | ||
**/__fixtures__ | ||
**/__mocks__ | ||
**/__tests__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Since .gitignore is not considered when .npmignore is present | ||
node_modules | ||
|
||
.yarnrc | ||
**.log | ||
**.tgz | ||
**/__fixtures__ | ||
**/__mocks__ | ||
**/__tests__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
src/__tests__ | ||
# Since .gitignore is not considered when .npmignore is present | ||
node_modules | ||
|
||
.yarnrc | ||
*.log | ||
**.log | ||
**.tgz | ||
**/__fixtures__ | ||
**/__mocks__ | ||
**/__tests__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
src/__tests__ | ||
# Since .gitignore is not considered when .npmignore is present | ||
node_modules | ||
|
||
.yarnrc | ||
*.log | ||
**.log | ||
**.tgz | ||
**/__fixtures__ | ||
**/__mocks__ | ||
**/__tests__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Since .gitignore is not considered when .npmignore is present | ||
node_modules | ||
|
||
.yarnrc | ||
**.log | ||
**.tgz | ||
**/__fixtures__ | ||
**/__mocks__ | ||
**/__tests__ |