Skip to content

Commit

Permalink
feat(examples): update angular_bazel_architect to version 11 (#2495)
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-agius4 authored Mar 4, 2021
1 parent d8ec78b commit b8a4dcd
Show file tree
Hide file tree
Showing 21 changed files with 2,601 additions and 2,681 deletions.
2 changes: 1 addition & 1 deletion examples/angular_bazel_architect/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ filegroup(
name = "common_deps",
srcs = [
"angular.json",
"tsconfig.base.json",
"tsconfig.json",
],
visibility = ["//:__subpackages__"],
)
Expand Down
2 changes: 1 addition & 1 deletion examples/angular_bazel_architect/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")
yarn_install(
# Name this npm so that Bazel Label references look like @npm//package
name = "npm",
data = ["//:patches/@angular-devkit+architect-cli+0.900.1.patch"],
data = ["//:patches/@angular-devkit+architect-cli+0.1102.2.patch"],
package_json = "//:package.json",
# Turn off symlink_node_modules here as it causes extreme flakiness on buildkite
# macos CI with missing files in node_modules.
Expand Down
3 changes: 1 addition & 2 deletions examples/angular_bazel_architect/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
Expand Down Expand Up @@ -136,7 +135,7 @@
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/frontend-lib/tsconfig.lib.json",
"project": "projects/frontend-lib/ng-package.js"
Expand Down
2 changes: 1 addition & 1 deletion examples/angular_bazel_architect/e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.base.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
Expand Down
45 changes: 23 additions & 22 deletions examples/angular_bazel_architect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,45 @@
},
"private": true,
"dependencies": {
"@angular-devkit/architect-cli": "0.900.1",
"@angular/animations": "10.0.4",
"@angular/common": "10.0.4",
"@angular/compiler": "10.0.4",
"@angular/core": "10.0.4",
"@angular/forms": "10.0.4",
"@angular/platform-browser": "10.0.4",
"@angular/platform-browser-dynamic": "10.0.4",
"@angular/router": "10.0.4",
"@angular/animations": "11.2.3",
"@angular/common": "11.2.3",
"@angular/compiler": "11.2.3",
"@angular/core": "11.2.3",
"@angular/forms": "11.2.3",
"@angular/platform-browser": "11.2.3",
"@angular/platform-browser-dynamic": "11.2.3",
"@angular/router": "11.2.3",
"mime": "^2.4.4",
"patch-package": "^6.2.0",
"rxjs": "~6.5.0",
"tslib": "^2.0.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.1000.3",
"@angular-devkit/build-ng-packagr": "0.1000.3",
"@angular/cli": "10.0.3",
"@angular/compiler-cli": "10.0.4",
"@angular/language-service": "10.0.4",
"@bazel/buildifier": "^4.0.0",
"@bazel/ibazel": "^0.14.0",
"@types/jasmine": "~3.3.8",
"@angular-devkit/architect-cli": "0.1102.2",
"@angular-devkit/build-angular": "0.1102.2",
"@angular/cli": "11.2.2",
"@angular/compiler-cli": "11.2.3",
"@angular/language-service": "11.2.3",
"@bazel/bazelisk": "^1.5.0",
"@bazel/buildifier": "^3.4.0",
"@bazel/ibazel": "^0.13.1",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "12.12.6",
"codelyzer": "^6.0.0",
"html-webpack-plugin": "^3.2.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma": "~6.1.1",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng-packagr": "^10.0.0",
"ng-packagr": "^11.2.4",
"protractor": "~7.0.0",
"ts-node": "~7.0.0",
"tslint": "~6.1.0",
"typescript": "~3.9.7"
"typescript": "~4.1.5"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/node_modules/@angular-devkit/architect-cli/bin/architect.js b/node_modules/@angular-devkit/architect-cli/bin/architect.js
index 3ec3d0a..088459d 100755
--- a/node_modules/@angular-devkit/architect-cli/bin/architect.js
+++ b/node_modules/@angular-devkit/architect-cli/bin/architect.js
@@ -74,6 +74,13 @@ async function _executeTarget(parentLogger, workspace, root, argv, registry) {
const { _, ...options } = argv;
const run = await architect.scheduleTarget(targetSpec, options, { logger });
const bars = new progress_1.MultiProgressBar(':name :bar (:current/:total) :status');
+ const exit = process.exit.bind(process);
+ process.exit = (code) => {
+ if(code != 0) {
+ console.error('Exiting with code ', code, new Error().stack);
+ }
+ exit(code);
+ };
run.progress.subscribe(update => {
const data = bars.get(update.id) || {
id: update.id,

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ architect(
"@npm//tslib",
"@npm//typescript",
"@npm//@angular-devkit/architect-cli",
"@npm//@angular-devkit/build-ng-packagr",
"@npm//@angular-devkit/build-angular",
],
output_dir = True,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

const { resolve } = require('path');

const [outputPath] = process.argv.slice(-1);

module.exports = {
dest: resolve(process.argv.pop()),
dest: resolve(outputPath),
lib: {
entryFile: 'src/public-api.ts'
}
}

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';

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

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

beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ FrontendLibComponent ]
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"declarationMap": true,
"target": "es2015",
"declaration": true,
"inlineSources": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.base.json",
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/spec",
"types": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


tslib@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a"
integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import {RouterModule, Routes} from '@angular/router';

const routes: Routes = [];

@NgModule({imports: [RouterModule.forRoot(routes)], exports: [RouterModule]})
@NgModule({imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })], exports: [RouterModule]})
export class AppRoutingModule {}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {async, TestBed} from '@angular/core/testing';
import { TestBed, waitForAsync } from '@angular/core/testing';
import {FrontendLibModule} from 'frontend-lib';

import {AppComponent} from './app.component';

describe('AppComponent', () => {
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed
.configureTestingModule({
imports: [FrontendLibModule],
Expand Down
2 changes: 1 addition & 1 deletion examples/angular_bazel_architect/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []
Expand Down
26 changes: 0 additions & 26 deletions examples/angular_bazel_architect/tsconfig.base.json

This file was deleted.

47 changes: 25 additions & 22 deletions examples/angular_bazel_architect/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
/*
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience.
It is not intended to be used to perform a compilation.
To learn more about this file see: https://angular.io/config/solution-tsconfig.
*/
{
"files": [],
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
},
{
"path": "./projects/frontend-lib/tsconfig.lib.json"
},
{
"path": "./projects/frontend-lib/tsconfig.spec.json"
}
]
}
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "es2020",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
2 changes: 1 addition & 1 deletion examples/angular_bazel_architect/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [
Expand Down
Loading

0 comments on commit b8a4dcd

Please sign in to comment.