Skip to content

Commit

Permalink
build: update bazel setup to latest dev-infra package and rules_nodej…
Browse files Browse the repository at this point in the history
…s v4.2.0 (#43431)

Updates the Bazel setup to the latest shared dev-infra package. Also the
rules_nodejs version is updated to v4.2.0. We have landed various
changes that prepare us for the APF v13 implementation. e.g.

* Ability to control the linker mappings for the `ng_package` rule. This
will become important for using a transition that could accidentally
cause linker mappings that would otheriwse conflict.
* Use of latest version of rollup & terser in the Bazel rules the
  dev-infra package exposes. This is necessary for ES2020 support.

PR Close #43431
  • Loading branch information
devversion authored and dylhunn committed Oct 1, 2021
1 parent 9eba260 commit 831ede8
Show file tree
Hide file tree
Showing 8 changed files with 489 additions and 377 deletions.
2 changes: 1 addition & 1 deletion .ng-dev/merge.ts
@@ -1,4 +1,4 @@
import {MergeConfig} from '@angular/dev-infra-private/ng-dev/pr/merge/config';
import {MergeConfig} from '@angular/dev-infra-private/ng-dev/pr/config';

/**
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
Expand Down
4 changes: 2 additions & 2 deletions .ng-dev/release.ts
Expand Up @@ -22,11 +22,11 @@ export const release: ReleaseConfig = {
'@angular/service-worker',
'@angular/upgrade',
],
buildPackages: async (stampForRelease: boolean|undefined) => {
buildPackages: async () => {
// The buildTargetPackages function is loaded at runtime as the loading the script causes an
// invocation of bazel.
const {buildTargetPackages} = require(join(__dirname, '../scripts/build/package-builder'));
return buildTargetPackages('dist/release-output', false, 'Release', stampForRelease);
return buildTargetPackages('dist/release-output', false, 'Release', /* isRelease */ true);
},
releaseNotes: {
hiddenScopes: ['aio', 'dev-infra', 'docs-infra', 'zone.js'],
Expand Down
4 changes: 2 additions & 2 deletions WORKSPACE
Expand Up @@ -8,8 +8,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch rules_nodejs so we can install our npm dependencies
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "8a7c981217239085f78acc9898a1f7ba99af887c1996ceb3b4504655383a2c3c",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.0.0/rules_nodejs-4.0.0.tar.gz"],
sha256 = "3635797a96c7bfcd0d265dacd722a07335e64d6ded9834af8d3f1b7ba5a25bba",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.3.0/rules_nodejs-4.3.0.tar.gz"],
)

# Check the rules_nodejs version and download npm dependencies
Expand Down
4 changes: 2 additions & 2 deletions integration/bazel/WORKSPACE
Expand Up @@ -5,8 +5,8 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch rules_nodejs so we can install our npm dependencies
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "8a7c981217239085f78acc9898a1f7ba99af887c1996ceb3b4504655383a2c3c",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.0.0/rules_nodejs-4.0.0.tar.gz"],
sha256 = "3635797a96c7bfcd0d265dacd722a07335e64d6ded9834af8d3f1b7ba5a25bba",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/4.3.0/rules_nodejs-4.3.0.tar.gz"],
)

# Fetch sass rules for compiling sass files
Expand Down
10 changes: 5 additions & 5 deletions integration/bazel/package.json
Expand Up @@ -23,11 +23,11 @@
"@angular/compiler": "file:../../dist/packages-dist/compiler",
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
"@bazel/bazelisk": "file:../../node_modules/@bazel/bazelisk",
"@bazel/protractor": "4.0.0",
"@bazel/rollup": "4.0.0",
"@bazel/concatjs": "4.0.0",
"@bazel/terser": "4.0.0",
"@bazel/typescript": "4.0.0",
"@bazel/protractor": "4.3.0",
"@bazel/rollup": "4.3.0",
"@bazel/concatjs": "4.3.0",
"@bazel/terser": "4.3.0",
"@bazel/typescript": "4.3.0",
"@types/jasmine": "2.8.8",
"@types/node": "^12.11.1",
"jasmine": "^3.5.0",
Expand Down

0 comments on commit 831ede8

Please sign in to comment.