Skip to content

Commit

Permalink
Remove explicit README and LICENSE from files array
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Nov 15, 2022
1 parent 4e9aa65 commit bff7fe1
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 15 deletions.
10 changes: 10 additions & 0 deletions .changeset/tall-turtles-think.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'modular-scripts': patch
'modular-template-app': patch
'modular-template-esm-view': patch
'modular-template-node-env-app': patch
'modular-template-package': patch
'modular-template-view': patch
---

Remove explicit package.json and license entry in files array
2 changes: 0 additions & 2 deletions packages/modular-scripts/src/__tests__/build.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ describe('WHEN building with preserve modules', () => {
"dist-cjs",
"dist-es",
"dist-types",
"README.md",
"LICENSE",
],
"main": "dist-cjs/index.js",
"modular": Object {
Expand Down
6 changes: 0 additions & 6 deletions packages/modular-scripts/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ describe('modular-scripts', () => {
"dist-cjs",
"dist-es",
"dist-types",
"README.md",
"LICENSE",
],
"main": "dist-cjs/index.js",
"modular": Object {
Expand Down Expand Up @@ -363,8 +361,6 @@ describe('modular-scripts', () => {
"dist-cjs",
"dist-es",
"dist-types",
"README.md",
"LICENSE",
],
"main": "dist-cjs/index.js",
"modular": Object {
Expand Down Expand Up @@ -446,8 +442,6 @@ describe('modular-scripts', () => {
"dist-cjs",
"dist-es",
"dist-types",
"README.md",
"LICENSE",
],
"main": "dist-cjs/nested-sample-package.cjs.js",
"modular": Object {
Expand Down
6 changes: 4 additions & 2 deletions packages/modular-scripts/src/build/buildPackage/makeBundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,13 +307,15 @@ export async function makeBundle(
...packageJson.dependencies,
...localImports,
},
/**
* Certain files are always included, regardless of settings.
* https://docs.npmjs.com/cli/v9/configuring-npm/package-json#files
*/
files: distinct([
...(packageJson.files || []),
'dist-cjs',
'dist-es',
'dist-types',
'README.md',
'LICENSE',
]),
};
}
1 change: 0 additions & 1 deletion packages/modular-template-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
},
"license": "Apache-2.0",
"files": [
"README.md",
"public",
"src"
]
Expand Down
1 change: 0 additions & 1 deletion packages/modular-template-esm-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
},
"license": "Apache-2.0",
"files": [
"README.md",
"src"
]
}
1 change: 0 additions & 1 deletion packages/modular-template-node-env-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
},
"license": "Apache-2.0",
"files": [
"README.md",
"public",
"src"
]
Expand Down
1 change: 0 additions & 1 deletion packages/modular-template-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
},
"license": "Apache-2.0",
"files": [
"README.md",
"src"
]
}
1 change: 0 additions & 1 deletion packages/modular-template-view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"templateType": "view"
},
"files": [
"README.md",
"src"
]
}

0 comments on commit bff7fe1

Please sign in to comment.