Skip to content

Commit c7ac9df

Browse files
committed
build: ensure compiler is properly picked up as runtime dep of compiler-cli
Currently when linking the `@angular/compiler-cli` package, the peer dependency to `compiler` is not resolved and we are trying to make the compiler dependency available via `data`. This is unidiomatic and brittle. This commit fixes this.
1 parent b438971 commit c7ac9df

File tree

5 files changed

+198
-77
lines changed

5 files changed

+198
-77
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# @generated
22
# Input hashes for repository rule npm_translate_lock(name = "npm2", pnpm_lock = "@//:pnpm-lock.yaml").
33
# This file should be checked into version control along with the pnpm-lock.yaml file.
4-
.npmrc=-1406867100
4+
.npmrc=-151232324
55
adev/shared-docs/pipeline/api-gen/package.json=939673974
66
package.json=1801177040
7-
packages/compiler-cli/package.json=-1344632265
7+
packages/compiler-cli/package.json=-1765181548
88
packages/compiler/package.json=1190056499
9-
pnpm-lock.yaml=522942070
9+
pnpm-lock.yaml=-6025827
1010
pnpm-workspace.yaml=-1822660674
1111
tools/bazel/rules_angular_store/package.json=-239561259
1212
yarn.lock=2018509044

.npmrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ hoist=false
99
# Avoid pnpm auto-installing peer dependencies. We want to be explicit about our versions used
1010
# for peer dependencies, avoiding potential mismatches. In addition, it ensures we can continue
1111
# to rely on peer dependency placeholders substituted via Bazel.
12-
auto-install-peers=false
12+
# TODO(devversion): Temporarily during migration this is flipped as we can't have `workspace:*` deps
13+
# in the `package.json` also processed by Yarn.
14+
auto-install-peers=true

packages/compiler-cli/BUILD.bazel

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,6 @@ pkg_npm(
149149
npm_package(
150150
name = "pkg",
151151
srcs = [":npm_package"],
152-
data = [
153-
# Needed because compiler is a dev dependency (to satisfy the peer dependency)
154-
# and `rules_js` only makes transitive production dependencies available.
155-
":node_modules/@angular/compiler",
156-
],
157152
replace_prefixes = {
158153
"npm_package/": "",
159154
},

packages/compiler-cli/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@
6060
"optional": true
6161
}
6262
},
63-
"devDependencies": {
64-
"@angular/compiler": "workspace:*"
65-
},
6663
"repository": {
6764
"type": "git",
6865
"url": "https://github.com/angular/angular.git",

0 commit comments

Comments
 (0)