Skip to content

Commit 73c1d35

Browse files
committed
build: no longer install snapshot build of @angular/bazel (#23429)
* build: no longer install snapshot build of `@angular/bazel` No longer uses a snapshot build for `@angular/bazel`. We previously used a snapshot build in order to update to v4 of `rules_nodejs`. * build: add missing dependency for jsonc-parser Sets up the jsonc-parser dependency in the BUILD bazel file.
1 parent 4da31c4 commit 73c1d35

File tree

4 files changed

+21
-16
lines changed

4 files changed

+21
-16
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
"@angular-devkit/build-optimizer": "0.1201.0",
7474
"@angular-devkit/core": "12.1.2",
7575
"@angular-devkit/schematics": "12.1.2",
76-
"@angular/bazel": "https://github.com/angular/bazel-builds.git#2566cc859235399edc72749a957f1cdcba2dc121",
76+
"@angular/bazel": "12.1.2",
7777
"@angular/compiler-cli": "12.1.2",
7878
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#56655ed6ccf24b7f3ad6b9ccdd1ef2896c7fa9f4",
7979
"@angular/localize": "12.1.2",
@@ -183,6 +183,7 @@
183183
"inquirer": "^8.0.0",
184184
"jasmine": "^3.6.0",
185185
"jasmine-core": "^3.6.0",
186+
"jsonc-parser": "^3.0.0",
186187
"kagekiri": "^1.4.1",
187188
"karma": "^4.4.1",
188189
"karma-browserstack-launcher": "^1.6.0",

src/cdk/schematics/testing/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ ts_library(
2121
"@npm//@types/jasmine",
2222
"@npm//@types/node",
2323
"@npm//fs-extra",
24+
"@npm//jsonc-parser",
2425
"@npm//rxjs",
2526
],
2627
)

src/cdk/schematics/testing/test-case-setup.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
import {getSystemPath, JsonParseMode, parseJson, Path} from '@angular-devkit/core';
8+
9+
import {parse} from 'jsonc-parser';
10+
import {getSystemPath, Path} from '@angular-devkit/core';
911
import {HostTree, Tree} from '@angular-devkit/schematics';
1012
import {SchematicTestRunner, UnitTestTree} from '@angular-devkit/schematics/testing';
1113
import {readFileSync} from 'fs-extra';
@@ -82,10 +84,10 @@ export async function createTestCaseSetup(migrationName: string, collectionPath:
8284
});
8385

8486
const testAppTsconfigPath = 'projects/cdk-testing/tsconfig.app.json';
85-
// Parse TypeScript configuration files with JSON5 as they could contain comments or
86-
// unquoted properties.
87-
const testAppTsconfig =
88-
parseJson(appTree.readContent(testAppTsconfigPath), JsonParseMode.Json5) as any;
87+
// Parse TypeScript configuration files with JSONC (like the CLI does) as the
88+
// config files could contain comments or trailing commas
89+
const testAppTsconfig = parse(appTree.readContent(testAppTsconfigPath), [],
90+
{allowTrailingComma: true});
8991

9092
// include all TypeScript files in the project. Otherwise all test input
9193
// files won't be part of the program and cannot be migrated.

yarn.lock

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@
7070
dependencies:
7171
tslib "^2.2.0"
7272

73-
"@angular/bazel@https://github.com/angular/bazel-builds.git#2566cc859235399edc72749a957f1cdcba2dc121":
74-
version "12.2.0-next.1"
75-
resolved "https://github.com/angular/bazel-builds.git#2566cc859235399edc72749a957f1cdcba2dc121"
73+
"@angular/[email protected]":
74+
version "12.1.2"
75+
resolved "https://registry.yarnpkg.com/@angular/bazel/-/bazel-12.1.2.tgz#be3219cb7a573b95c47184cb5904ada4ffb7b135"
76+
integrity sha512-cSP2j2tZxQPw8YYQ7SkNCz7iUkz8I3tyUX2VZO717vLBDGdYgjtgJ3+A6sgLraCL0e+4pj8xRa5m8G8ovNLVrQ==
7677
dependencies:
77-
"@microsoft/api-extractor" "7.18.1"
78+
"@microsoft/api-extractor" "7.17.1"
7879
shelljs "0.8.4"
7980
tsickle "^0.38.0"
8081
tslib "^2.2.0"
@@ -1395,10 +1396,10 @@
13951396
"@microsoft/tsdoc-config" "~0.15.2"
13961397
"@rushstack/node-core-library" "3.40.0"
13971398

1398-
"@microsoft/api-extractor@7.18.1":
1399-
version "7.18.1"
1400-
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.18.1.tgz#61b39f972b646261dd49f2de9f5d448aa6497e7a"
1401-
integrity sha512-qljUF2Q0zAx1vJrjKkJVGN7OVbsXki+Pji99jywyl6L/FK3YZ7PpstUJYE6uBcLPy6rhNPWPAsHNTMpG/kHIsg==
1399+
"@microsoft/api-extractor@7.17.1":
1400+
version "7.17.1"
1401+
resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.17.1.tgz#df6b7aa7cadcb35e2483048ebe5dbaf7af932446"
1402+
integrity sha512-NqdN627QoDdDtvfqEoX+Z6WbF2yid5URUZVYefC9KuisgwrsfvbSj5QwzOZlMYcufoafTq9jfeVyFAXr4PqGig==
14021403
dependencies:
14031404
"@microsoft/api-extractor-model" "7.13.3"
14041405
"@microsoft/tsdoc" "0.13.2"
@@ -1585,7 +1586,7 @@
15851586
resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-9.2.0.tgz#46bbfe6a85bfd2987e69216955fcd04df7d025bb"
15861587
integrity sha512-c4A1Xm0At+ypvBfEETREu519wLncJYQXvY+dBGg/V5YA51eg5EwdDsPPfcOMG0cuXscqRvsIgIySTmTJUdcTNA==
15871588

1588-
"@octokit/openapi-types@^9.5.0":
1589+
"@octokit/openapi-types@^9.4.0", "@octokit/openapi-types@^9.5.0":
15891590
version "9.7.0"
15901591
resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-9.7.0.tgz#9897cdefd629cd88af67b8dbe2e5fb19c63426b2"
15911592
integrity sha512-TUJ16DJU8mekne6+KVcMV5g6g/rJlrnIKn7aALG9QrNpnEipFc1xjoarh0PKaAWf2Hf+HwthRKYt+9mCm5RsRg==
@@ -8549,7 +8550,7 @@ json5@^2.1.0, json5@^2.1.2:
85498550
dependencies:
85508551
minimist "^1.2.5"
85518552

8552-
8553+
[email protected], jsonc-parser@^3.0.0:
85538554
version "3.0.0"
85548555
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.0.0.tgz#abdd785701c7e7eaca8a9ec8cf070ca51a745a22"
85558556
integrity sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==

0 commit comments

Comments
 (0)