Skip to content

Commit

Permalink
build: exclude pnpm and dependenciesMeta fields from published NP…
Browse files Browse the repository at this point in the history
…M 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)
  • Loading branch information
alan-agius4 committed Jan 16, 2025
1 parent 5261b5a commit 069818b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/package_json_release_filter.jq
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Get the fields from root package.json that should override the project
# package.json, i.e., every field except the following
| ($root
| del(.bin, .description, .dependencies, .name, .main, .peerDependencies, .optionalDependencies, .typings, .version, .private, .workspaces, .resolutions, .scripts, .["ng-update"])
| del(.bin, .description, .dependencies, .name, .main, .peerDependencies, .optionalDependencies, .typings, .version, .private, .workspaces, .resolutions, .scripts, .["ng-update"], .pnpm, .dependenciesMeta)
) as $root_overrides

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

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

0 comments on commit 069818b

Please sign in to comment.