Skip to content

Commit 34de89a

Browse files
josephperrottalxhub
authored andcommitted
fix(bazel): update integration test to use [email protected] (#40710)
Update the integraiton tests for bazel to the latest rules_nodejs version. PR Close #40710
1 parent a6c1c91 commit 34de89a

File tree

10 files changed

+109
-169
lines changed

10 files changed

+109
-169
lines changed

integration/bazel/.bazelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ build --symlink_prefix=/
2525

2626
# Turn on managed directories feature in Bazel
2727
# This allows us to avoid installing a second copy of node_modules
28-
common --experimental_allow_incremental_repository_updates
28+
# common --experimental_allow_incremental_repository_updates

integration/bazel/.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.0
1+
4.0.0

integration/bazel/WORKSPACE

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
55
# Fetch rules_nodejs so we can install our npm dependencies
66
http_archive(
77
name = "build_bazel_rules_nodejs",
8-
sha256 = "9d93d4e1340c43dbf6b2fd66b683d89630a6310bf8be3bf40ec96685dcacc26c",
9-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.3.3/rules_nodejs-2.3.3.tar.gz"],
8+
sha256 = "dd4dc46066e2ce034cba0c81aa3e862b27e8e8d95871f567359f7a534cccb666",
9+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/3.1.0/rules_nodejs-3.1.0.tar.gz"],
1010
)
1111

1212
# Fetch sass rules for compiling sass files
1313
http_archive(
1414
name = "io_bazel_rules_sass",
15-
sha256 = "77e241148f26d5dbb98f96fe0029d8f221c6cb75edbb83e781e08ac7f5322c5f",
16-
strip_prefix = "rules_sass-1.24.0",
15+
sha256 = "596ab3616d370135e0ecc710e103422e0aa3719f1c970303a0886b70c81ee819",
16+
strip_prefix = "rules_sass-1.32.2",
1717
urls = [
18-
"https://github.com/bazelbuild/rules_sass/archive/1.24.0.zip",
19-
"https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.24.0.zip",
18+
"https://github.com/bazelbuild/rules_sass/archive/1.32.2.zip",
19+
"https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.32.2.zip",
2020
],
2121
)
2222

@@ -34,6 +34,7 @@ node_repositories(
3434
# Install our npm dependencies into @npm
3535
yarn_install(
3636
name = "npm",
37+
frozen_lockfile = False,
3738
package_json = "//:package.json",
3839
# Turn off symlink_node_modules here as it causes flakiness with missing
3940
# files in node_modules.
@@ -48,11 +49,6 @@ load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies")
4849

4950
npm_bazel_protractor_dependencies()
5051

51-
# Load karma dependencies
52-
load("@npm//@bazel/karma:package.bzl", "npm_bazel_karma_dependencies")
53-
54-
npm_bazel_karma_dependencies()
55-
5652
# Setup the rules_webtesting toolchain
5753
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
5854

@@ -66,6 +62,6 @@ browser_repositories(
6662
)
6763

6864
# Setup the rules_sass toolchain
69-
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
65+
load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories")
7066

7167
sass_repositories()

integration/bazel/package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
"@angular/compiler": "file:../../dist/packages-dist/compiler",
2424
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
2525
"@bazel/bazelisk": "file:../../node_modules/@bazel/bazelisk",
26-
"@bazel/karma": "2.3.3",
27-
"@bazel/protractor": "2.3.3",
28-
"@bazel/rollup": "2.3.3",
29-
"@bazel/terser": "2.3.3",
30-
"@bazel/typescript": "2.3.3",
26+
"@bazel/protractor": "3.1.0",
27+
"@bazel/rollup": "3.1.0",
28+
"@bazel/concatjs": "3.1.0",
29+
"@bazel/terser": "3.1.0",
30+
"@bazel/typescript": "3.1.0",
3131
"@types/jasmine": "2.8.8",
32+
"@types/node": "^12.11.1",
33+
"jasmine": "^3.5.0",
3234
"http-server": "0.12.0",
3335
"karma": "4.4.1",
3436
"karma-chrome-launcher": "3.1.0",

integration/bazel/src/BUILD.bazel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ load("@npm//http-server:index.bzl", "http_server")
55
load("@npm//@angular/bazel:index.bzl", "ng_module")
66
load("@npm//@bazel/rollup:index.bzl", "rollup_bundle")
77
load("@npm//@bazel/terser:index.bzl", "terser_minified")
8-
load("@npm//@bazel/typescript:index.bzl", "ts_devserver")
8+
load("@npm//@bazel/concatjs:index.bzl", "concatjs_devserver")
99

1010
# Allow targets under sub-packages to reference the tsconfig.json file
1111
exports_files(["tsconfig.json"])
@@ -35,7 +35,7 @@ filegroup(
3535
],
3636
)
3737

38-
ts_devserver(
38+
concatjs_devserver(
3939
name = "devserver",
4040
entry_module = "bazel_integration_test/src/main",
4141
scripts = [

integration/bazel/src/hello-world/BUILD.bazel

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
package(default_visibility = ["//visibility:public"])
22

3-
load("@npm//@bazel/karma:index.bzl", "karma_web_test_suite")
4-
load("@npm//@bazel/typescript:index.bzl", "ts_library")
5-
load("@io_bazel_rules_sass//sass:sass.bzl", "sass_binary")
3+
load("@npm//@bazel/concatjs:index.bzl", "karma_web_test_suite")
4+
load("@io_bazel_rules_sass//:defs.bzl", "sass_binary")
65
load("@npm//@angular/bazel:index.bzl", "ng_package")
76
load("//tools:ng_ts_library.bzl", "ng_ts_library")
87

@@ -31,7 +30,7 @@ ng_package(
3130
deps = [":hello-world"],
3231
)
3332

34-
ts_library(
33+
ng_ts_library(
3534
name = "test_lib",
3635
testonly = 1,
3736
srcs = glob(["*.spec.ts"]),

0 commit comments

Comments
 (0)