Skip to content

Commit f425b95

Browse files
Update aspect dependencies (#1873)
* build: update to latest aspect_bazel_lib, aspect_rules_js, aspect_rules_jasmine and aspect_rules_esbuild * ci: enable `ASPECT_RULES_JS_FROZEN_PNPM_LOCK` to ensure outdated pnpm file is flagged In the migration period, until we decide to switch to `pnpm` fully, a pnpm lock file needs to be kept in sync. By default, `rules_js` will try to sync it automatically, but rather we would want to flag it as an error on CI if the pnpm file is outdated- so that not all users need to pay the cost of having to run `pnpm import` from time to time. --------- Co-authored-by: Greg Magolan <[email protected]>
1 parent 8751840 commit f425b95

26 files changed

+11745
-71
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Input hashes for repository rule npm_translate_lock(name = "npm_integration_workspace", pnpm_lock = "//integration/workspace:pnpm-lock.yaml").
2+
# This file should be checked into version control along with the pnpm-lock.yaml file.
3+
.npmrc=974837034
4+
integration/workspace/pnpm-lock.yaml=-1835679858
5+
integration/workspace/yarn.lock=324353828
6+
integration/workspace/package.json=-1993643597
7+
integration/workspace/pnpm-workspace.yaml=1163575902
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml").
2+
# This file should be checked into version control along with the pnpm-lock.yaml file.
3+
.npmrc=974837034
4+
pnpm-lock.yaml=-1475648007
5+
yarn.lock=-146594567
6+
package.json=-487157359
7+
pnpm-workspace.yaml=1711114604
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Input hashes for repository rule npm_translate_lock(name = "npm_integration_project", pnpm_lock = "//integration/project:pnpm-lock.yaml").
2+
# This file should be checked into version control along with the pnpm-lock.yaml file.
3+
.npmrc=974837034
4+
integration/project/pnpm-lock.yaml=56141838
5+
integration/project/yarn.lock=-1656341479
6+
integration/project/package.json=195538968
7+
integration/project/pnpm-workspace.yaml=1163575902
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Input hashes for repository rule npm_translate_lock(name = "npm_integration_pre_apf_project", pnpm_lock = "//integration/pre_apf_project:pnpm-lock.yaml").
2+
# This file should be checked into version control along with the pnpm-lock.yaml file.
3+
.npmrc=974837034
4+
integration/pre_apf_project/pnpm-lock.yaml=2141171294
5+
integration/pre_apf_project/yarn.lock=-941201574
6+
integration/pre_apf_project/package.json=666737612
7+
integration/pre_apf_project/pnpm-workspace.yaml=1163575902

.bazelignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,9 @@ node_modules/
22
dist/
33
integration/pre_apf_project/node_modules/
44
integration/project/node_modules/
5+
integration/project/libs/post/node_modules
56
integration/project/dist/
67
integration/workspace/node_modules/
8+
9+
override_rename_ts_plugin/node_modules
10+
server/node_modules

.circleci/config.yml

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ jobs:
77
dependency_type:
88
# Whether the test should build using the commit dependency versions or the latest builds.
99
type: enum
10-
enum: ["package.json", "builds-repo"]
10+
enum: ['package.json', 'builds-repo']
1111
docker:
1212
- image: cimg/node:16.13.0@sha256:05245e5a0f7aa7c45d61c21ba47c13082bdc07efe555a6786087261b28adaa2b
13+
environment:
14+
# TODO: Remove when pnpm is exclusively used.
15+
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1'
1316
steps:
1417
- checkout
1518
- node/install-packages:
@@ -28,22 +31,21 @@ jobs:
2831
- run: scripts/build.sh << parameters.dependency_type >>
2932
- run: scripts/test.sh
3033
workflows:
31-
build-and-test:
32-
jobs:
33-
- build-and-test:
34-
name: build-and-test
35-
dependency_type: "package.json"
36-
buid-and-test-against-builds:
37-
jobs:
38-
- build-and-test:
39-
name: build-and-test-builds-repo
40-
dependency_type: "builds-repo"
41-
triggers:
42-
- schedule:
43-
filters:
44-
branches:
45-
only:
46-
- main
47-
# Runs monitoring jobs at 10:00AM every day.
48-
cron: '0 10 * * *'
49-
34+
build-and-test:
35+
jobs:
36+
- build-and-test:
37+
name: build-and-test
38+
dependency_type: 'package.json'
39+
buid-and-test-against-builds:
40+
jobs:
41+
- build-and-test:
42+
name: build-and-test-builds-repo
43+
dependency_type: 'builds-repo'
44+
triggers:
45+
- schedule:
46+
filters:
47+
branches:
48+
only:
49+
- main
50+
# Runs monitoring jobs at 10:00AM every day.
51+
cron: '0 10 * * *'

WORKSPACE

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
22

33
http_archive(
44
name = "aspect_rules_js",
5-
sha256 = "f93c6d2c4437a9fdc2c711912b6b9b3f3806c2dd2c9c0ec0240f26d3f2ea3030",
6-
strip_prefix = "rules_js-1.8.1",
7-
url = "https://github.com/aspect-build/rules_js/archive/refs/tags/v1.8.1.tar.gz",
5+
sha256 = "1aa0ab76d1f9520bb8993e2d84f82da2a9c87da1e6e8d121dbb4c857a292c2cd",
6+
strip_prefix = "rules_js-1.20.1",
7+
url = "https://github.com/aspect-build/rules_js/releases/download/v1.20.1/rules_js-v1.20.1.tar.gz",
88
)
99

1010
load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
@@ -13,20 +13,20 @@ rules_js_dependencies()
1313

1414
http_archive(
1515
name = "aspect_rules_ts",
16-
sha256 = "5b501313118b06093497b6429f124b973f99d1eb5a27a1cc372e5d6836360e9d",
17-
strip_prefix = "rules_ts-1.0.2",
18-
url = "https://github.com/aspect-build/rules_ts/archive/refs/tags/v1.0.2.tar.gz",
16+
sha256 = "02480b6a1cd12516edf364e678412e9da10445fe3f1070c014ac75e922c969ea",
17+
strip_prefix = "rules_ts-1.3.1",
18+
url = "https://github.com/aspect-build/rules_ts/releases/download/v1.3.1/rules_ts-v1.3.1.tar.gz",
1919
)
2020

2121
load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")
2222

23-
rules_ts_dependencies(ts_version_from = "//:package.json",)
23+
rules_ts_dependencies(ts_version_from = "//:package.json")
2424

2525
http_archive(
2626
name = "aspect_rules_jasmine",
27-
sha256 = "28bd02acbcd78dd4fbe0ee133b21b11977acd70329a83fc987ff8c0a6ffae9e2",
28-
strip_prefix = "rules_jasmine-0.2.3",
29-
url = "https://github.com/aspect-build/rules_jasmine/archive/refs/tags/v0.2.3.tar.gz",
27+
sha256 = "b3b2ff30ed222db653092d8280e0b62a4d54c5e65c598df09a0a1d7aae78fc8f",
28+
strip_prefix = "rules_jasmine-0.3.1",
29+
url = "https://github.com/aspect-build/rules_jasmine/releases/download/v0.3.1/rules_jasmine-v0.3.1.tar.gz",
3030
)
3131

3232
load("@aspect_rules_jasmine//jasmine:dependencies.bzl", "rules_jasmine_dependencies")
@@ -35,9 +35,9 @@ rules_jasmine_dependencies()
3535

3636
http_archive(
3737
name = "aspect_rules_esbuild",
38-
sha256 = "f9b5bf16251e3e4e127337ef968e6a398c9a4f353f1730e6c7ff6c9a8981e858",
39-
strip_prefix = "rules_esbuild-0.13.4",
40-
url = "https://github.com/aspect-build/rules_esbuild/archive/refs/tags/v0.13.4.tar.gz",
38+
sha256 = "c78d38d6ec2e7497dde4f8d67f49c71614daf11e2bbe276e23f5b09a89801677",
39+
strip_prefix = "rules_esbuild-0.14.1",
40+
url = "https://github.com/aspect-build/rules_esbuild/releases/download/v0.14.1/rules_esbuild-v0.14.1.tar.gz",
4141
)
4242

4343
load("@aspect_rules_esbuild//esbuild:dependencies.bzl", "rules_esbuild_dependencies")
@@ -70,14 +70,13 @@ load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")
7070

7171
npm_translate_lock(
7272
name = "npm",
73-
yarn_lock = "//:yarn.lock",
74-
package_json = "//:package.json",
75-
npmrc = "//:.npmrc",
7673
data = [
74+
"//:package.json",
7775
"//:pnpm-workspace.yaml",
7876
# PLACE_HOLDER_FOR_angular/angular_packages/language-service/build.sh
7977
],
80-
verify_node_modules_ignored = "//:.bazelignore",
78+
npmrc = "//:.npmrc",
79+
pnpm_lock = "//:pnpm-lock.yaml",
8180
public_hoist_packages = {
8281
# Hoist transitive closure of npm deps needed for vsce; this set was determined manually by
8382
# running `bazel build //:vsix` and burning down missing packages. We do this so that we
@@ -93,6 +92,8 @@ npm_translate_lock(
9392
9493
9594
},
95+
verify_node_modules_ignored = "//:.bazelignore",
96+
yarn_lock = "//:yarn.lock",
9697
# PLACE_HOLDER_FOR_packages/language-service/build.sh_IN_angular_REPO
9798
)
9899

@@ -102,10 +103,14 @@ npm_repositories()
102103

103104
npm_translate_lock(
104105
name = "npm_integration_workspace",
105-
yarn_lock = "//integration/workspace:yarn.lock",
106-
package_json = "//integration/workspace:package.json",
106+
data = [
107+
"//integration/workspace:package.json",
108+
"//integration/workspace:pnpm-workspace.yaml",
109+
],
107110
npmrc = "//:.npmrc",
111+
pnpm_lock = "//integration/workspace:pnpm-lock.yaml",
108112
verify_node_modules_ignored = "//:.bazelignore",
113+
yarn_lock = "//integration/workspace:yarn.lock",
109114
)
110115

111116
load("@npm_integration_workspace//:repositories.bzl", npm_integration_workspace_repositories = "npm_repositories")
@@ -114,10 +119,14 @@ npm_integration_workspace_repositories()
114119

115120
npm_translate_lock(
116121
name = "npm_integration_pre_apf_project",
117-
yarn_lock = "//integration/pre_apf_project:yarn.lock",
118-
package_json = "//integration/pre_apf_project:package.json",
122+
data = [
123+
"//integration/pre_apf_project:package.json",
124+
"//integration/pre_apf_project:pnpm-workspace.yaml",
125+
],
119126
npmrc = "//:.npmrc",
127+
pnpm_lock = "//integration/pre_apf_project:pnpm-lock.yaml",
120128
verify_node_modules_ignored = "//:.bazelignore",
129+
yarn_lock = "//integration/pre_apf_project:yarn.lock",
121130
)
122131

123132
load("@npm_integration_pre_apf_project//:repositories.bzl", npm_integration_pre_apf_project_repositories = "npm_repositories")
@@ -126,10 +135,14 @@ npm_integration_pre_apf_project_repositories()
126135

127136
npm_translate_lock(
128137
name = "npm_integration_project",
129-
yarn_lock = "//integration/project:yarn.lock",
130-
package_json = "//integration/project:package.json",
138+
data = [
139+
"//integration/project:package.json",
140+
"//integration/project:pnpm-workspace.yaml",
141+
],
131142
npmrc = "//:.npmrc",
143+
pnpm_lock = "//integration/project:pnpm-lock.yaml",
132144
verify_node_modules_ignored = "//:.bazelignore",
145+
yarn_lock = "//integration/project:yarn.lock",
133146
)
134147

135148
load("@npm_integration_project//:repositories.bzl", npm_integration_project_repositories = "npm_repositories")

client/src/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ ts_project(
77
declaration = True,
88
source_map = True,
99
tsconfig = "//client:tsconfig",
10+
visibility = [
11+
"//client:__subpackages__",
12+
],
1013
deps = [
1114
"//:node_modules/@types/node",
1215
"//:node_modules/@types/vscode",
1316
"//:node_modules/typescript",
1417
"//:node_modules/vscode-languageclient",
1518
"//common",
1619
],
17-
visibility = [
18-
"//client:__subpackages__",
19-
],
2020
)

client/src/tests/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ ts_project(
1717
source_map = True,
1818
tsconfig = ":tsconfig",
1919
deps = [
20-
"//client/src",
21-
"//:node_modules/@types/vscode",
2220
"//:node_modules/@types/jasmine",
21+
"//:node_modules/@types/vscode",
2322
"//:node_modules/vscode-languageserver-textdocument",
23+
"//client/src",
2424
],
2525
)
2626

2727
jasmine_test(
2828
name = "test",
29-
data = [":tests"],
3029
args = ["*_spec.js"],
3130
chdir = package_name(),
31+
data = [":tests"],
3232
tags = ["unit_test"],
3333
)

common/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ ts_config(
66
visibility = [
77
"//client:__subpackages__",
88
"//common:__subpackages__",
9-
"//server:__subpackages__",
109
"//integration:__subpackages__",
10+
"//server:__subpackages__",
1111
],
1212
deps = ["//:tsconfig"],
1313
)
@@ -22,8 +22,8 @@ ts_project(
2222
visibility = [
2323
"//client:__subpackages__",
2424
"//common:__subpackages__",
25-
"//server:__subpackages__",
2625
"//integration:__subpackages__",
26+
"//server:__subpackages__",
2727
],
2828
deps = [
2929
"//:node_modules/@types/node",

common/tests/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ ts_project(
1717
source_map = True,
1818
tsconfig = ":tsconfig",
1919
deps = [
20-
"//common",
2120
"//:node_modules/@types/jasmine",
21+
"//common",
2222
],
2323
)
2424

2525
jasmine_test(
2626
name = "test",
27-
data = [":tests"],
2827
args = ["*_spec.js"],
2928
chdir = package_name(),
29+
data = [":tests"],
3030
tags = ["unit_test"],
3131
)

integration/BUILD.bazel

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,26 @@ load("@aspect_rules_ts//ts:defs.bzl", "ts_config", "ts_project")
33
ts_config(
44
name = "tsconfig",
55
src = "tsconfig.json",
6+
visibility = ["//integration:__subpackages__"],
67
deps = [
78
"//:tsconfig",
89
"//server:tsconfig",
910
],
10-
visibility = ["//integration:__subpackages__"]
1111
)
1212

1313
ts_project(
1414
name = "integration",
1515
# NB: there is an import cycle between integration/lsp/*.ts and integration/test_constants.ts so
1616
# they cannot be broken up into separate ts_project targets
1717
srcs = glob([
18-
"*.ts",
18+
"*.ts",
1919
]) + ["//integration/lsp:srcs"],
2020
declaration = True,
2121
source_map = True,
2222
tsconfig = ":tsconfig",
23+
visibility = [
24+
"//integration:__subpackages__",
25+
],
2326
deps = [
2427
"//:node_modules/@types/jasmine",
2528
"//:node_modules/@types/node",
@@ -28,7 +31,4 @@ ts_project(
2831
"//:node_modules/vscode-uri",
2932
"//common",
3033
],
31-
visibility = [
32-
"//integration:__subpackages__",
33-
],
3434
)

integration/e2e/BUILD.bazel

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ ts_project(
77
declaration = True,
88
source_map = True,
99
tsconfig = "//integration:tsconfig",
10+
visibility = [
11+
"//integration:__subpackages__",
12+
],
1013
deps = [
1114
"//:node_modules/@types/jasmine",
1215
"//:node_modules/@types/node",
1316
"//:node_modules/@types/vscode",
1417
"//:node_modules/vscode-test",
1518
"//integration",
1619
],
17-
visibility = [
18-
"//integration:__subpackages__",
19-
],
2020
)
2121

2222
js_test(
@@ -35,5 +35,9 @@ js_test(
3535
# due to file system protection. It is tagged local so it runs outside of
3636
# the sandbox. It would need some redesign to allow for sandbox execution.
3737
# Tagged manual so that `bazel test //...` doesn't run it automatically.
38-
tags = ["e2e", "local", "manual"],
38+
tags = [
39+
"e2e",
40+
"local",
41+
"manual",
42+
],
3943
)

0 commit comments

Comments
 (0)