Skip to content

Commit 069818b

Browse files
committed
build: exclude pnpm and dependenciesMeta fields from published NPM packages
Currently, the `pnpm` and `dependenciesMeta` fields from the root `package.json` are inadvertently copied to the `package.json` of published packages. For example, see: https://github.com/angular/angular-devkit-schematics-builds/blob/dc4d5e0d523e3449963fa8e6efa32aee3e194e0f/package.json#L42-L52 (cherry picked from commit c37b59e)
1 parent 5261b5a commit 069818b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: tools/package_json_release_filter.jq

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# Get the fields from root package.json that should override the project
1717
# package.json, i.e., every field except the following
1818
| ($root
19-
| del(.bin, .description, .dependencies, .name, .main, .peerDependencies, .optionalDependencies, .typings, .version, .private, .workspaces, .resolutions, .scripts, .["ng-update"])
19+
| del(.bin, .description, .dependencies, .name, .main, .peerDependencies, .optionalDependencies, .typings, .version, .private, .workspaces, .resolutions, .scripts, .["ng-update"], .pnpm, .dependenciesMeta)
2020
) as $root_overrides
2121

2222
# Use the project package.json as a base and override other fields from root
@@ -29,4 +29,4 @@
2929
| del(.devDependencies)
3030

3131
# Add engines; versions substituted via pkg_npm
32-
+ {"engines": {"node": "0.0.0-ENGINES-NODE", "npm": "0.0.0-ENGINES-NPM", "yarn": "0.0.0-ENGINES-YARN"}}
32+
+ {"engines": {"node": "0.0.0-ENGINES-NODE", "npm": "0.0.0-ENGINES-NPM", "yarn": "0.0.0-ENGINES-YARN"}}

0 commit comments

Comments
 (0)