Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0a450ca

Browse files
build: define typescript version via string in module.bazel file
Within our module.bazel file when describing the version of typescript to use for rules_ts, we use ts_version instead of ts_version_from to prevent our package.json file from being part of the set of files used to calculate the sha for the lock file. Any unrelated change to the version of the typescript file would end up causing our lockfile to be out of date. This amount of churn has proven to be too much for our current setup. We instead now test to validate the versions defined in the package.json and MODULE.bazel files match.
1 parent f5e6894 commit 0a450ca

File tree

6 files changed

+16
-18
lines changed

6 files changed

+16
-18
lines changed

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,7 @@ jobs:
7171
- name: Install node modules
7272
run: pnpm install --frozen-lockfile
7373
- name: Run module and package tests
74-
run: pnpm bazel test //modules/... //packages/...
75-
env:
76-
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
74+
run: pnpm bazel test -- //... -//tests/legacy-cli/...
7775

7876
e2e:
7977
needs: test

‎.github/workflows/pr.yml‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ jobs:
101101
- name: Install node modules
102102
run: pnpm install --frozen-lockfile
103103
- name: Run module and package tests
104-
run: pnpm bazel test //modules/... //packages/...
105-
env:
106-
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
104+
run: pnpm bazel test -- //... -//tests/legacy-cli/...
107105

108106
e2e:
109107
needs: build

‎BUILD.bazel‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
load("@aspect_rules_ts//ts:defs.bzl", rules_js_tsconfig = "ts_config")
22
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
3+
load("@devinfra//bazel/validation:defs.bzl", "validate_ts_version_matching")
34
load("@npm//:defs.bzl", "npm_link_all_packages")
45
load("//tools:defaults.bzl", "copy_to_bin")
56

@@ -102,3 +103,8 @@ config_setting(
102103
":enable_snapshot_repo_deps": "true",
103104
},
104105
)
106+
107+
validate_ts_version_matching(
108+
module_lock_file = "MODULE.bazel.lock",
109+
package_json = "package.json",
110+
)

‎MODULE.bazel‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ git_override(
3939
bazel_dep(name = "devinfra")
4040
git_override(
4141
module_name = "devinfra",
42-
commit = "fc71b572acb06a4830ef5566edb05500f822b7ad",
42+
commit = "7e2eefa1375195fa7616f78a76f538a188852067",
4343
remote = "https://github.com/angular/dev-infra.git",
4444
)
4545

@@ -176,7 +176,7 @@ rules_ts_ext.deps(
176176
name = "angular_cli_npm_typescript",
177177
# Obtained by: curl --silent https://registry.npmjs.org/typescript/5.9.2 | jq -r '.dist.integrity'
178178
ts_integrity = "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==",
179-
ts_version_from = "//:package.json",
179+
ts_version = "5.9.2",
180180
)
181181
use_repo(rules_ts_ext, **{"npm_typescript": "angular_cli_npm_typescript"})
182182

‎MODULE.bazel.lock‎

Lines changed: 3 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tools/test/expected_package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
}
3636
},
3737
"engines": {
38-
"node": "^16.14.0 || >=18.10.0",
39-
"npm": "^6.11.0 || ^7.5.6 || >=8.0.0",
40-
"yarn": ">= 1.13.0"
38+
"node": "0.0.0-ENGINES-NODE",
39+
"npm": "0.0.0-ENGINES-NPM",
40+
"yarn": "0.0.0-ENGINES-YARN"
4141
}
4242
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /