8000 Revert "build: upgrade angular build, integration/bazel and @angular/… · angular/angular@86ab9f9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 86ab9f9

Browse files
committed
Revert "build: upgrade angular build, integration/bazel and @angular/bazel package to rule_nodejs 2.2.0 (#37727)" (#39097)
This reverts commit db56cf1. PR Close #39097
1 parent 42f9679 commit 86ab9f9

File tree

63 files changed

+536
-833
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+536
-833
lines changed

.bazelrc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ test --test_output=errors
7474
# Trick bazel into treating BUILD files under integration/bazel as being regular files
7575
# This lets us glob() up all the files inside this integration test to make them inputs to tests
7676
# (Note, we cannot use common --deleted_packages because the bazel version command doesn't support it)
77-
build --deleted_packages=integration/bazel,integration/bazel/src,integration/bazel/src/hello-world,integration/bazel/test,integration/bazel/tools,integration/bazel/test/e2e
78-
query --deleted_packages=integration/bazel,integration/bazel/src,integration/bazel/src/hello-world,integration/bazel/test,integration/bazel/tools,integration/bazel/test/e2e
77+
build --deleted_packages=integration/bazel,integration/bazel/src,integration/bazel/src/hello-world,integration/bazel/test,integration/bazel/test/e2e
78+
query --deleted_packages=integration/bazel,integration/bazel/src,integration/bazel/src/hello-world,integration/bazel/test,integration/bazel/test/e2e
7979

8080
################################
8181
# Temporary Settings for Ivy #

.circleci/config.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -858,16 +858,9 @@ workflows:
858858
- build-npm-packages
859859
- build-ivy-npm-packages
860860
- legacy-unit-tests-saucelabs
861-
# Temporarily disabled components-repo-unit-tests to update rules_nodejs to 2.0.0. Breaking changes in
862-
# rules_nodejs create a dependency sandwich between angular/angular & angular/components that are very
863-
# difficult and time consuming to resolve and involve patching @angular/bazel in components repo such
864-
# as https://github.com/angular/components/commit/9e7ba251207df77164d73d66620e619bcbc4d2ad. It is simpler to
865-
# 1) land angular/angular upgrade to rule_nodejs 2.0.0 which has breaking changes
866-
# 2) land angular/components upgrade to rules_nodejs 2.0.0 using the @angular/bazel builds snapshot
867-
# 3) update angular/angular to the landed components commit and re-enable these tests
868-
# - components-repo-unit-tests:
869-
# requires:
870-
# - build-npm-packages
861+
- components-repo-unit-tests:
862+
requires:
863+
- build-npm-packages
871864
- test_zonejs:
872865
requires:
873866
- setup

BUILD.bazel

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,3 @@ filegroup(
4747
"@npm//:node_modules/angular-mocks-1.6/angular-mocks.js",
4848
],
4949
)
50-
51-
# Detect if the build is running under --stamp
52-
config_setting(
53-
name = "stamp",
54-
values = {"stamp": "true"},
55-
)

WORKSPACE

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
88
# Fetch rules_nodejs so we can install our npm dependencies
99
http_archive(
1010
name = "build_bazel_rules_nodejs",
11-
sha256 = "4952ef879704ab4ad6729a29007e7094aef213ea79e9f2e94cbe1c9a753e63ef",
12-
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/2.2.0/rules_nodejs-2.2.0.tar.gz"],
11+
sha256 = "84abf7ac4234a70924628baa9a73a5a5cbad944c4358cf9abdb4aab29c9a5b77",
12+
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.7.0/rules_nodejs-1.7.0.tar.gz"],
1313
)
1414

1515
# Check the rules_nodejs version and download npm dependencies
1616
# Note: bazel (version 2 and after) will check the .bazelversion file so we don't need to
1717
# assert on that.
1818
load("@build_bazel_rules_nodejs//:index.bzl", "check_rules_nodejs_version", "node_repositories", "yarn_install")
1919

20-
check_rules_nodejs_version(minimum_version_string = "2.2.0")
20+
check_rules_nodejs_version(minimum_version_string = "1.7.0")
2121

2222
# Setup the Node.js toolchain
2323
node_repositories(
@@ -39,18 +39,23 @@ yarn_install(
3939
yarn_lock = "//:yarn.lock",
4040
)
4141

42+
# Install all bazel dependencies of the @npm npm packages
43+
load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")
44+
45+
install_bazel_dependencies()
46+
4247
# Load angular dependencies
4348
load("//packages/bazel:package.bzl", "rules_angular_dev_dependencies")
4449

4550
rules_angular_dev_dependencies()
4651

4752
# Load protractor dependencies
48-
load("@npm//@bazel/protractor:package.bzl", "npm_bazel_protractor_dependencies")
53+
load("@npm_bazel_protractor//:package.bzl", "npm_bazel_protractor_dependencies")
4954

5055
npm_bazel_protractor_dependencies()
5156

5257
# Load karma dependencies
53-
load("@npm//@bazel/karma:package.bzl", "npm_bazel_karma_dependencies")
58+
load("@npm_bazel_karma//:package.bzl", "npm_bazel_karma_dependencies")
5459

5560
npm_bazel_karma_dependencies()
5661

@@ -63,6 +68,11 @@ load("//dev-infra/browsers:browser_repositories.bzl", "browser_repositories")
6368

6469
browser_repositories()
6570

71+
# Setup the rules_typescript tooolchain
72+
load("@npm_bazel_typescript//:index.bzl", "ts_setup_workspace")
73+
74+
ts_setup_workspace()
75+
6676
# Setup the rules_sass toolchain
6777
load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
6878

dev-infra/BUILD.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
load("@build_bazel_rules_nodejs//:index.bzl", "pkg_npm")
2-
load("@npm//@bazel/typescript:index.bzl", "ts_library")
2+
load("@npm_bazel_typescript//:index.bzl", "ts_library")
33

44
ts_library(
55
name = "cli",
@@ -49,15 +49,15 @@ pkg_npm(
4949
# substitutions to replace these in the published version of dev-infra.
5050
"//dev-infra/": "@npm_angular_dev_infra_private//",
5151
"//packages/benchpress": "@npm//@angular/benchpress",
52-
"//packages/bazel": "@npm//@angular/bazel",
52+
"//packages/bazel/": "@npm_angular_bazel//",
5353
"//packages/zone.js/bundles:zone.umd.js": "@npm//:node_modules/zone.js/dist/zone.js",
5454
"//packages/core": "@npm//@angular/core",
5555
"//packages/platform-browser": "@npm//@angular/platform-browser",
5656

5757
# This substitution is particularly verbose because we need to make sure
5858
# that only things available via Angular Bazel are imported from
5959
# tools/defaults.bzl.
60-
"load\(\"//tools:defaults.bzl\", \"ng_module\"\)": "load(\"@npm//@angular/bazel:index.bzl\", \"ng_module\")",
60+
"load\(\"//tools:defaults.bzl\", \"ng_module\"\)": "load(\"@npm_angular_bazel//:index.bzl\", \"ng_module\")",
6161
},
6262
visibility = ["//visibility:public"],
6363
deps = [

dev-infra/benchmark/component_benchmark/benchmark_test.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@npm//@bazel/protractor:index.bzl", "protractor_web_test_suite")
1+
load("@npm_bazel_protractor//:index.bzl", "protractor_web_test_suite")
22

33
"""
44
Macro that can be used to define a benchmark test. This differentiates from

dev-infra/benchmark/component_benchmark/component_benchmark.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
load("//dev-infra/benchmark/ng_rollup_bundle:ng_rollup_bundle.bzl", "ng_rollup_bundle")
22
load("//tools:defaults.bzl", "ng_module")
3-
load("@npm//@bazel/typescript:index.bzl", "ts_devserver", "ts_library")
3+
load("@npm_bazel_typescript//:index.bzl", "ts_devserver", "ts_library")
44
load(":benchmark_test.bzl", "benchmark_test")
55

66
def copy_default_file(origin, destination):

dev-infra/benchmark/driver-utilities/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package(default_visibility = ["//visibility:public"])
22

3-
load("@npm//@bazel/typescript:index.bzl", "ts_library")
3+
load("@npm_bazel_typescript//:index.bzl", "ts_library")
44

55
ts_library(
66
name = "driver-utilities",

dev-infra/benchmark/ng_rollup_bundle/ng_rollup_bundle.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# found in the LICENSE file at https://angular.io/license
55

66
load("@build_bazel_rules_nodejs//:index.bzl", "npm_package_bin")
7-
load("@npm//@bazel/terser:index.bzl", "terser_minified")
8-
load("@npm//@bazel/rollup:index.bzl", "rollup_bundle")
7+
load("@npm_bazel_terser//:index.bzl", "terser_minified")
8+
load("@npm_bazel_rollup//:index.bzl", "rollup_bundle")
99
load("//dev-infra/bazel:expand_template.bzl", "expand_template")
1010

1111
def ng_rollup_bundle(

dev-infra/caretaker/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
load("@npm//@bazel/typescript:index.bzl", "ts_library")
1+
load("@npm_bazel_typescript//:index.bzl", "ts_library")
22

33
ts_library(
44
name = "caretaker",

0 commit comments

Comments
 (0)
0