Skip to content

Commit b8a4dcd

Browse files
authored
feat(examples): update angular_bazel_architect to version 11 (#2495)
1 parent d8ec78b commit b8a4dcd

21 files changed

Lines changed: 2601 additions & 2681 deletions

examples/angular_bazel_architect/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ filegroup(
55
name = "common_deps",
66
srcs = [
77
"angular.json",
8-
"tsconfig.base.json",
8+
"tsconfig.json",
99
],
1010
visibility = ["//:__subpackages__"],
1111
)

examples/angular_bazel_architect/WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
2323
yarn_install(
2424
# Name this npm so that Bazel Label references look like @npm//package
2525
name = "npm",
26-
data = ["//:patches/@angular-devkit+architect-cli+0.900.1.patch"],
26+
data = ["//:patches/@angular-devkit+architect-cli+0.1102.2.patch"],
2727
package_json = "//:package.json",
2828
# Turn off symlink_node_modules here as it causes extreme flakiness on buildkite
2929
# macos CI with missing files in node_modules.

examples/angular_bazel_architect/angular.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
"optimization": true,
4646
"outputHashing": "all",
4747
"sourceMap": false,
48-
"extractCss": true,
4948
"namedChunks": false,
5049
"aot": true,
5150
"extractLicenses": true,
@@ -136,7 +135,7 @@
136135
"prefix": "lib",
137136
"architect": {
138137
"build": {
139-
"builder": "@angular-devkit/build-ng-packagr:build",
138+
"builder": "@angular-devkit/build-angular:ng-packagr",
140139
"options": {
141140
"tsConfig": "projects/frontend-lib/tsconfig.lib.json",
142141
"project": "projects/frontend-lib/ng-package.js"

examples/angular_bazel_architect/e2e/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"extends": "../tsconfig.base.json",
2+
"extends": "../tsconfig.json",
33
"compilerOptions": {
44
"outDir": "../out-tsc/e2e",
55
"module": "commonjs",

examples/angular_bazel_architect/package.json

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,44 +13,45 @@
1313
},
1414
"private": true,
1515
"dependencies": {
16-
"@angular-devkit/architect-cli": "0.900.1",
17-
"@angular/animations": "10.0.4",
18-
"@angular/common": "10.0.4",
19-
"@angular/compiler": "10.0.4",
20-
"@angular/core": "10.0.4",
21-
"@angular/forms": "10.0.4",
22-
"@angular/platform-browser": "10.0.4",
23-
"@angular/platform-browser-dynamic": "10.0.4",
24-
"@angular/router": "10.0.4",
16+
"@angular/animations": "11.2.3",
17+
"@angular/common": "11.2.3",
18+
"@angular/compiler": "11.2.3",
19+
"@angular/core": "11.2.3",
20+
"@angular/forms": "11.2.3",
21+
"@angular/platform-browser": "11.2.3",
22+
"@angular/platform-browser-dynamic": "11.2.3",
23+
"@angular/router": "11.2.3",
2524
"mime": "^2.4.4",
2625
"patch-package": "^6.2.0",
2726
"rxjs": "~6.5.0",
2827
"tslib": "^2.0.0",
2928
"zone.js": "~0.10.3"
3029
},
3130
"devDependencies": {
32-
"@angular-devkit/build-angular": "0.1000.3",
33-
"@angular-devkit/build-ng-packagr": "0.1000.3",
34-
"@angular/cli": "10.0.3",
35-
"@angular/compiler-cli": "10.0.4",
36-
"@angular/language-service": "10.0.4",
37-
"@bazel/buildifier": "^4.0.0",
38-
"@bazel/ibazel": "^0.14.0",
39-
"@types/jasmine": "~3.3.8",
31+
"@angular-devkit/architect-cli": "0.1102.2",
32+
"@angular-devkit/build-angular": "0.1102.2",
33+
"@angular/cli": "11.2.2",
34+
"@angular/compiler-cli": "11.2.3",
35+
"@angular/language-service": "11.2.3",
36+
"@bazel/bazelisk": "^1.5.0",
37+
"@bazel/buildifier": "^3.4.0",
38+
"@bazel/ibazel": "^0.13.1",
39+
"@types/jasmine": "~3.6.0",
4040
"@types/jasminewd2": "~2.0.3",
4141
"@types/node": "12.12.6",
4242
"codelyzer": "^6.0.0",
4343
"html-webpack-plugin": "^3.2.0",
44+
"jasmine-core": "~3.6.0",
4445
"jasmine-spec-reporter": "~5.0.0",
45-
"karma": "~5.0.0",
46+
"karma": "~6.1.1",
4647
"karma-chrome-launcher": "~3.1.0",
4748
"karma-coverage-istanbul-reporter": "~3.0.2",
48-
"karma-jasmine": "~3.3.0",
49+
"karma-jasmine": "~4.0.0",
4950
"karma-jasmine-html-reporter": "^1.5.0",
50-
"ng-packagr": "^10.0.0",
51+
"ng-packagr": "^11.2.4",
5152
"protractor": "~7.0.0",
5253
"ts-node": "~7.0.0",
5354
"tslint": "~6.1.0",
54-
"typescript": "~3.9.7"
55+
"typescript": "~4.1.5"
5556
}
56-
}
57+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git a/node_modules/@angular-devkit/architect-cli/bin/architect.js b/node_modules/@angular-devkit/architect-cli/bin/architect.js
2+
index 3ec3d0a..088459d 100755
3+
--- a/node_modules/@angular-devkit/architect-cli/bin/architect.js
4+
+++ b/node_modules/@angular-devkit/architect-cli/bin/architect.js
5+
@@ -74,6 +74,13 @@ async function _executeTarget(parentLogger, workspace, root, argv, registry) {
6+
const { _, ...options } = argv;
7+
const run = await architect.scheduleTarget(targetSpec, options, { logger });
8+
const bars = new progress_1.MultiProgressBar(':name :bar (:current/:total) :status');
9+
+ const exit = process.exit.bind(process);
10+
+ process.exit = (code) => {
11+
+ if(code != 0) {
12+
+ console.error('Exiting with code ', code, new Error().stack);
13+
+ }
14+
+ exit(code);
15+
+ };
16+
run.progress.subscribe(update => {
17+
const data = bars.get(update.id) || {
18+
id: update.id,

examples/angular_bazel_architect/patches/@angular-devkit+architect-cli+0.900.1.patch

Lines changed: 0 additions & 27 deletions
This file was deleted.

examples/angular_bazel_architect/projects/frontend-lib/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ architect(
3030
"@npm//tslib",
3131
"@npm//typescript",
3232
"@npm//@angular-devkit/architect-cli",
33-
"@npm//@angular-devkit/build-ng-packagr",
33+
"@npm//@angular-devkit/build-angular",
3434
],
3535
output_dir = True,
3636
)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
21
const { resolve } = require('path');
32

3+
const [outputPath] = process.argv.slice(-1);
4+
45
module.exports = {
5-
dest: resolve(process.argv.pop()),
6+
dest: resolve(outputPath),
67
lib: {
78
entryFile: 'src/public-api.ts'
89
}
910
}
10-

examples/angular_bazel_architect/projects/frontend-lib/src/lib/frontend-lib.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
1+
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
22

33
import { FrontendLibComponent } from './frontend-lib.component';
44

55
describe('FrontendLibComponent', () => {
66
let component: FrontendLibComponent;
77
let fixture: ComponentFixture<FrontendLibComponent>;
88

9-
beforeEach(async(() => {
9+
beforeEach(waitForAsync(() => {
1010
TestBed.configureTestingModule({
1111
declarations: [ FrontendLibComponent ]
1212
})

0 commit comments

Comments
 (0)