Skip to content

Commit

Permalink
build: update dev-infra packages and account for build-tooling split …
Browse files Browse the repository at this point in the history
…from `ng-dev`

The dev-infra build tooling is now decoupled from `ng-dev`. This will
make it easier to update `ng-dev` without necessarily needing to upgrade
the whole build system, Bazel etc. This is useful when e.g. new release
tool features have been added and should also be ported to active LTS
branches.
  • Loading branch information
devversion authored and alan-agius4 committed Jul 27, 2022
1 parent 9b75c7c commit 087ab46
Show file tree
Hide file tree
Showing 18 changed files with 63 additions and 56 deletions.
4 changes: 2 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ build:remote --jobs=150

# Setup the toolchain and platform for the remote build execution. The platform
# is provided by the shared dev-infra package and targets k8 remote containers.
build:remote --crosstool_top=@npm//@angular/dev-infra-private/bazel/remote-execution/cpp:cc_toolchain_suite
build:remote --extra_toolchains=@npm//@angular/dev-infra-private/bazel/remote-execution/cpp:cc_toolchain
build:remote --crosstool_top=@npm//@angular/build-tooling/bazel/remote-execution/cpp:cc_toolchain_suite
build:remote --extra_toolchains=@npm//@angular/build-tooling/bazel/remote-execution/cpp:cc_toolchain
build:remote --extra_execution_platforms=//tools:rbe_platform_with_network_access
build:remote --host_platform=//tools:rbe_platform_with_network_access
build:remote --platforms=//tools:rbe_platform_with_network_access
Expand Down
2 changes: 1 addition & 1 deletion .ng-dev/caretaker.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CaretakerConfig } from '@angular/dev-infra-private/ng-dev';
import { CaretakerConfig } from '@angular/ng-dev';

/** The configuration for `ng-dev caretaker` commands. */
export const caretaker: CaretakerConfig = {
Expand Down
2 changes: 1 addition & 1 deletion .ng-dev/commit-message.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CommitMessageConfig } from '@angular/dev-infra-private/ng-dev';
import { CommitMessageConfig } from '@angular/ng-dev';
import packages from '../lib/packages.js';

/**
Expand Down
2 changes: 1 addition & 1 deletion .ng-dev/format.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FormatConfig } from '@angular/dev-infra-private/ng-dev';
import { FormatConfig } from '@angular/ng-dev';

/**
* Configuration for the `ng-dev format` command.
Expand Down
2 changes: 1 addition & 1 deletion .ng-dev/github.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GithubConfig } from '@angular/dev-infra-private/ng-dev';
import { GithubConfig } from '@angular/ng-dev';

/**
* Github configuration for the ng-dev command. This repository is
Expand Down
2 changes: 1 addition & 1 deletion .ng-dev/pull-request.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PullRequestConfig } from '@angular/dev-infra-private/ng-dev';
import { PullRequestConfig } from '@angular/ng-dev';

/**
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
Expand Down
2 changes: 1 addition & 1 deletion .ng-dev/release.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import '../lib/bootstrap-local.js';

import { ReleaseConfig } from '@angular/dev-infra-private/ng-dev';
import { ReleaseConfig } from '@angular/ng-dev';
import packages from '../lib/packages.js';
import buildPackages from '../scripts/build.js';

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build:bazel": "node ./bin/devkit-admin build-bazel",
"build-tsc": "tsc -p tsconfig.json",
"lint": "eslint --cache --max-warnings=0 \"**/*.ts\"",
"ng-dev": "cross-env TS_NODE_PROJECT=$PWD/.ng-dev/tsconfig.json TS_NODE_TRANSPILE_ONLY=1 node --no-warnings --loader ts-node/esm node_modules/@angular/dev-infra-private/ng-dev/bundles/cli.mjs",
"ng-dev": "cross-env TS_NODE_PROJECT=$PWD/.ng-dev/tsconfig.json TS_NODE_TRANSPILE_ONLY=1 node --no-warnings --loader ts-node/esm node_modules/@angular/ng-dev/bundles/cli.mjs",
"templates": "node ./bin/devkit-admin templates",
"validate": "node ./bin/devkit-admin validate",
"postinstall": "yarn webdriver-update && yarn husky install",
Expand Down Expand Up @@ -66,15 +66,16 @@
"devDependencies": {
"@ampproject/remapping": "2.2.0",
"@angular/animations": "14.1.0",
"@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#1addc303bef0b6acc0dca0961e9e642629f3a5cd",
"@angular/cdk": "14.1.0",
"@angular/common": "14.1.0",
"@angular/compiler": "14.1.0",
"@angular/compiler-cli": "14.1.0",
"@angular/core": "14.1.0",
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#b2da73b3dddddd6a253ee8ea48ef387b20f5aedf",
"@angular/forms": "14.1.0",
"@angular/localize": "14.1.0",
"@angular/material": "14.1.0",
"@angular/ng-dev": "https://github.com/angular/dev-infra-private-ng-dev-builds.git#865c7687cdca2bd512040330e1677eecaa26e46a",
"@angular/platform-browser": "14.1.0",
"@angular/platform-browser-dynamic": "14.1.0",
"@angular/platform-server": "14.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/angular_devkit/architect/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ load("//tools:defaults.bzl", "pkg_npm", "ts_library")

# @external_begin
load("//tools:ts_json_schema.bzl", "ts_json_schema")
load("@npm//@angular/dev-infra-private/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
# @external_end

licenses(["notice"]) # MIT
Expand Down
2 changes: 1 addition & 1 deletion packages/angular_devkit/build_angular/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
load("//tools:ts_json_schema.bzl", "ts_json_schema")
load("@npm//@angular/dev-infra-private/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")

licenses(["notice"]) # MIT

Expand Down
2 changes: 1 addition & 1 deletion packages/angular_devkit/build_webpack/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
load("//tools:ts_json_schema.bzl", "ts_json_schema")
load("@npm//@angular/dev-infra-private/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")

licenses(["notice"]) # MIT

Expand Down
2 changes: 1 addition & 1 deletion packages/angular_devkit/core/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
load("//tools:defaults.bzl", "pkg_npm", "ts_library")

# @external_begin
load("@npm//@angular/dev-infra-private/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
# @external_end

# Copyright Google Inc. All Rights Reserved.
Expand Down
2 changes: 1 addition & 1 deletion packages/angular_devkit/schematics/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
load("//tools:defaults.bzl", "pkg_npm", "ts_library")

# @external_begin
load("@npm//@angular/dev-infra-private/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
# @external_end

# Copyright Google Inc. All Rights Reserved.
Expand Down
2 changes: 1 addition & 1 deletion packages/ngtools/webpack/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

load("@npm//@bazel/jasmine:index.bzl", "jasmine_node_test")
load("//tools:defaults.bzl", "pkg_npm", "ts_library")
load("@npm//@angular/dev-infra-private/bazel/api-golden:index.bzl", "api_golden_test_npm_package")
load("@npm//@angular/build-tooling/bazel/api-golden:index.bzl", "api_golden_test_npm_package")

licenses(["notice"]) # MIT

Expand Down
2 changes: 1 addition & 1 deletion scripts/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function _runTemplate(inputPath: string, outputPath: string, logger: loggi

// TODO(ESM): Consider making this an actual import statement.
const { COMMIT_TYPES, ScopeRequirement } = await new Function(
`return import('@angular/dev-infra-private/ng-dev');`,
`return import('@angular/ng-dev');`,
)();

const template = require(inputPath).default;
Expand Down
2 changes: 1 addition & 1 deletion tools/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ platform(
exec_properties = {
"dockerNetwork": "standard",
},
parents = ["@npm//@angular/dev-infra-private/bazel/remote-execution:platform"],
parents = ["@npm//@angular/build-tooling/bazel/remote-execution:platform"],
)

# @external_end
2 changes: 1 addition & 1 deletion tools/defaults.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
load("@npm//@bazel/concatjs/internal:build_defs.bzl", _ts_library = "ts_library_macro")
load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin", _js_library = "js_library", _pkg_npm = "pkg_npm")
load("@rules_pkg//:pkg.bzl", "pkg_tar")
load("@npm//@angular/dev-infra-private/bazel:extract_js_module_output.bzl", "extract_js_module_output")
load("@npm//@angular/build-tooling/bazel:extract_js_module_output.bzl", "extract_js_module_output")
load("@aspect_bazel_lib//lib:utils.bzl", "to_label")
load("@aspect_bazel_lib//lib:jq.bzl", "jq")
load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory")
Expand Down
80 changes: 43 additions & 37 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,42 @@
"@angular/core" "^13.0.0 || ^14.0.0-0"
reflect-metadata "^0.1.13"

"@angular/build-tooling@https://github.com/angular/dev-infra-private-build-tooling-builds.git#1addc303bef0b6acc0dca0961e9e642629f3a5cd":
version "0.0.0-fa61d03a603e04af2b66f3598f1af01da1e1cfb1"
resolved "https://github.com/angular/dev-infra-private-build-tooling-builds.git#1addc303bef0b6acc0dca0961e9e642629f3a5cd"
dependencies:
"@angular-devkit/build-angular" "14.1.0-rc.3"
"@angular/benchpress" "0.3.0"
"@babel/core" "^7.16.0"
"@bazel/buildifier" "5.1.0"
"@bazel/concatjs" "5.5.2"
"@bazel/esbuild" "5.5.2"
"@bazel/protractor" "5.5.2"
"@bazel/runfiles" "5.5.2"
"@bazel/terser" "5.5.2"
"@bazel/typescript" "5.5.2"
"@microsoft/api-extractor" "7.28.4"
"@types/browser-sync" "^2.26.3"
"@types/node" "16.10.9"
"@types/selenium-webdriver" "^4.0.18"
"@types/send" "^0.17.1"
"@types/tmp" "^0.2.1"
"@types/uuid" "^8.3.1"
"@types/yargs" "^17.0.0"
browser-sync "^2.27.7"
clang-format "1.8.0"
prettier "2.7.1"
protractor "^7.0.0"
selenium-webdriver "4.3.1"
send "^0.18.0"
source-map "^0.7.4"
tmp "^0.2.1"
"true-case-path" "^2.2.1"
tslib "^2.3.0"
typescript "~4.7.3"
uuid "^8.3.2"
yargs "^17.0.0"

"@angular/cdk@14.1.0":
version "14.1.0"
resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-14.1.0.tgz#abf5ad3cdd96e42666bce949833ac1c2405ab031"
Expand Down Expand Up @@ -168,43 +204,6 @@
dependencies:
tslib "^2.3.0"

"@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#b2da73b3dddddd6a253ee8ea48ef387b20f5aedf":
version "0.0.0-114c5a9e0c063e65dc42ded4d2ae07a3cca5418a"
resolved "https://github.com/angular/dev-infra-private-builds.git#b2da73b3dddddd6a253ee8ea48ef387b20f5aedf"
dependencies:
"@angular-devkit/build-angular" "14.1.0-rc.3"
"@angular/benchpress" "0.3.0"
"@babel/core" "^7.16.0"
"@bazel/buildifier" "5.1.0"
"@bazel/concatjs" "5.5.2"
"@bazel/esbuild" "5.5.2"
"@bazel/protractor" "5.5.2"
"@bazel/runfiles" "5.5.2"
"@bazel/terser" "5.5.2"
"@bazel/typescript" "5.5.2"
"@microsoft/api-extractor" "7.28.4"
"@types/browser-sync" "^2.26.3"
"@types/node" "16.10.9"
"@types/selenium-webdriver" "^4.0.18"
"@types/send" "^0.17.1"
"@types/tmp" "^0.2.1"
"@types/uuid" "^8.3.1"
"@types/yargs" "^17.0.0"
"@yarnpkg/lockfile" "^1.1.0"
browser-sync "^2.27.7"
clang-format "1.8.0"
prettier "2.7.1"
protractor "^7.0.0"
selenium-webdriver "4.3.1"
send "^0.18.0"
source-map "^0.7.4"
tmp "^0.2.1"
"true-case-path" "^2.2.1"
tslib "^2.3.0"
typescript "~4.7.3"
uuid "^8.3.2"
yargs "^17.0.0"

"@angular/forms@14.1.0":
version "14.1.0"
resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-14.1.0.tgz#17a7ec211a11b75572d89359f08c277cfcdb1210"
Expand All @@ -228,6 +227,13 @@
dependencies:
tslib "^2.3.0"

"@angular/ng-dev@https://github.com/angular/dev-infra-private-ng-dev-builds.git#865c7687cdca2bd512040330e1677eecaa26e46a":
version "0.0.0-fa61d03a603e04af2b66f3598f1af01da1e1cfb1"
resolved "https://github.com/angular/dev-infra-private-ng-dev-builds.git#865c7687cdca2bd512040330e1677eecaa26e46a"
dependencies:
"@yarnpkg/lockfile" "^1.1.0"
typescript "~4.7.3"

"@angular/platform-browser-dynamic@14.1.0":
version "14.1.0"
resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-14.1.0.tgz#9e30c5c4d2ff507402dcb36a5878068d8d900b81"
Expand Down

0 comments on commit 087ab46

Please sign in to comment.