Skip to content

Commit 5abde9e

Browse files
authored
build: fix test failure with latest CLI version (#24820)
We have a test that verifies that we're able to read workspaces in JSON5 format. The devkit appears to have switched to `jsonc-parse` for the config file parsing which only supports comments in JSON, not trailing commas and unquoted keys. These changes adjust our test to account for the new parsing behavior.
1 parent 8dfbbed commit 5abde9e

File tree

3 files changed

+49
-169
lines changed

3 files changed

+49
-169
lines changed

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@
6868
"zone.js": "~0.11.5"
6969
},
7070
"devDependencies": {
71-
"@angular-devkit/build-angular": "14.0.0-next.9",
72-
"@angular-devkit/core": "14.0.0-next.9",
73-
"@angular-devkit/schematics": "14.0.0-next.9",
71+
"@angular-devkit/build-angular": "14.0.0-next.11",
72+
"@angular-devkit/core": "14.0.0-next.11",
73+
"@angular-devkit/schematics": "14.0.0-next.11",
7474
"@angular/bazel": "14.0.0-next.14",
75-
"@angular/cli": "14.0.0-next.9",
75+
"@angular/cli": "14.0.0-next.11",
7676
"@angular/compiler-cli": "14.0.0-next.14",
7777
"@angular/dev-infra-private": "https://github.com/angular/dev-infra-private-builds.git#4b4f4e4269a93c14f511c087bb14cdbc58a5ca70",
7878
"@angular/localize": "14.0.0-next.14",
@@ -143,7 +143,7 @@
143143
"@octokit/rest": "18.3.5",
144144
"@rollup/plugin-commonjs": "^21.0.0",
145145
"@rollup/plugin-node-resolve": "^13.1.3",
146-
"@schematics/angular": "14.0.0-next.9",
146+
"@schematics/angular": "14.0.0-next.11",
147147
"@types/babel__core": "^7.1.18",
148148
"@types/browser-sync": "^2.26.3",
149149
"@types/fs-extra": "^9.0.13",

src/cdk/schematics/utils/project-tsconfig-paths.spec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,24 @@ describe('project tsconfig paths', () => {
2727
);
2828
});
2929

30-
it('should be able to read workspace configuration which is using JSON5 features', async () => {
30+
it('should be able to read workspace configuration which is using JSONC features', async () => {
3131
testTree.create('/my-build-config.json', '');
3232
testTree.create(
3333
'/angular.json',
3434
`{
35-
// Comments, unquoted properties or trailing commas are only supported in JSON5.
36-
version: 1,
37-
projects: {
38-
with_tests: {
39-
targets: {
40-
build: {
41-
options: {
42-
tsConfig: './my-build-config.json',
35+
// Comments are only supported in JSONC.
36+
"version": 1,
37+
"projects": {
38+
"with_tests": {
39+
"targets": {
40+
"build": {
41+
"options": {
42+
"tsConfig": "./my-build-config.json"
4343
}
4444
}
4545
}
4646
}
47-
},
47+
}
4848
}`,
4949
);
5050

yarn.lock

Lines changed: 34 additions & 154 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,6 @@
1717
"@angular-devkit/core" "14.0.0-next.11"
1818
rxjs "6.6.7"
1919

20-
"@angular-devkit/[email protected]":
21-
version "0.1400.0-next.9"
22-
resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1400.0-next.9.tgz#97b68b08c4babdfd0467366f5fe761c68198bb44"
23-
integrity sha512-u5rSvPyIU1XolXoyaMcwVFgj+8SvAYwuA0rWttDUi58KQJa5bfga7yVNPUT9thMVMIigEkds9UG2TEf1FWBANA==
24-
dependencies:
25-
"@angular-devkit/core" "14.0.0-next.9"
26-
rxjs "6.6.7"
27-
2820
"@angular-devkit/[email protected]":
2921
version "14.0.0-next.11"
3022
resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-14.0.0-next.11.tgz#e7e6438d72dcd17f0ad6ef11a8827c921c339ea4"
@@ -95,76 +87,6 @@
9587
optionalDependencies:
9688
esbuild "0.14.36"
9789

98-
"@angular-devkit/[email protected]":
99-
version "14.0.0-next.9"
100-
resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-14.0.0-next.9.tgz#d6b274bf635047ec38c863c8af1dfb3c432106ed"
101-
integrity sha512-QZtXGv0fq/GfvZaPFOlE+JM4twI50rpYOrm1Z3+pTZN57/ALrdMZc2z0I2i1YmiMH/v8EoiM1uOmLN4HnDxcPw==
102-
dependencies:
103-
"@ampproject/remapping" "2.1.2"
104-
"@angular-devkit/architect" "0.1400.0-next.9"
105-
"@angular-devkit/build-webpack" "0.1400.0-next.9"
106-
"@angular-devkit/core" "14.0.0-next.9"
107-
"@babel/core" "7.17.9"
108-
"@babel/generator" "7.17.9"
109-
"@babel/helper-annotate-as-pure" "7.16.7"
110-
"@babel/plugin-proposal-async-generator-functions" "7.16.8"
111-
"@babel/plugin-transform-async-to-generator" "7.16.8"
112-
"@babel/plugin-transform-runtime" "7.17.0"
113-
"@babel/preset-env" "7.16.11"
114-
"@babel/runtime" "7.17.9"
115-
"@babel/template" "7.16.7"
116-
"@discoveryjs/json-ext" "0.5.7"
117-
"@ngtools/webpack" "14.0.0-next.9"
118-
ansi-colors "4.1.1"
119-
babel-loader "8.2.4"
120-
babel-plugin-istanbul "6.1.1"
121-
browserslist "^4.9.1"
122-
cacache "16.0.4"
123-
copy-webpack-plugin "10.2.4"
124-
critters "0.0.16"
125-
css-loader "6.7.1"
126-
esbuild-wasm "0.14.36"
127-
glob "7.2.0"
128-
https-proxy-agent "5.0.0"
129-
inquirer "8.2.2"
130-
jsonc-parser "3.0.0"
131-
karma-source-map-support "1.4.0"
132-
less "4.1.2"
133-
less-loader "10.2.0"
134-
license-webpack-plugin "4.0.2"
135-
loader-utils "3.2.0"
136-
mini-css-extract-plugin "2.6.0"
137-
minimatch "5.0.1"
138-
open "8.4.0"
139-
ora "5.4.1"
140-
parse5-html-rewriting-stream "6.0.1"
141-
piscina "3.2.0"
142-
postcss "8.4.12"
143-
postcss-import "14.1.0"
144-
postcss-loader "6.2.1"
145-
postcss-preset-env "7.4.3"
146-
regenerator-runtime "0.13.9"
147-
resolve-url-loader "5.0.0"
148-
rxjs "6.6.7"
149-
sass "1.50.0"
150-
sass-loader "12.6.0"
151-
semver "7.3.6"
152-
source-map-loader "3.0.1"
153-
source-map-support "0.5.21"
154-
stylus "0.57.0"
155-
stylus-loader "6.2.0"
156-
terser "5.12.1"
157-
text-table "0.2.0"
158-
tree-kill "1.2.2"
159-
tslib "2.3.1"
160-
webpack "5.72.0"
161-
webpack-dev-middleware "5.3.1"
162-
webpack-dev-server "4.8.1"
163-
webpack-merge "5.8.0"
164-
webpack-subresource-integrity "5.1.0"
165-
optionalDependencies:
166-
esbuild "0.14.36"
167-
16890
"@angular-devkit/[email protected]":
16991
version "0.1400.0-next.11"
17092
resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1400.0-next.11.tgz#8cbdd0140749e19f4eb28f005ef841e3eb4f5e3d"
@@ -173,14 +95,6 @@
17395
"@angular-devkit/architect" "0.1400.0-next.11"
17496
rxjs "6.6.7"
17597

176-
"@angular-devkit/[email protected]":
177-
version "0.1400.0-next.9"
178-
resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1400.0-next.9.tgz#5a65347a00aa9dd4d7b60ac6a3855ef5e0de9f1e"
179-
integrity sha512-O4xzexGG5XiMPBBxYqL602k7TDdOlfVx2mgSRsm6M9Yi7VBzUhErrFOmv9roA8lj5c+vvz8iNpdykiTFgA2+wg==
180-
dependencies:
181-
"@angular-devkit/architect" "0.1400.0-next.9"
182-
rxjs "6.6.7"
183-
18498
"@angular-devkit/[email protected]":
18599
version "14.0.0-next.11"
186100
resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-14.0.0-next.11.tgz#29a10e3a7dc15affbdc26a246ec6f30ed826486f"
@@ -192,24 +106,12 @@
192106
rxjs "6.6.7"
193107
source-map "0.7.3"
194108

195-
"@angular-devkit/[email protected]":
196-
version "14.0.0-next.9"
197-
resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-14.0.0-next.9.tgz#64e14c132babe43368b50ea0711eba2c950ced5f"
198-
integrity sha512-bw1jmhCMGQK1S/XZ8SB2LGGkGn1j3v9TAkHs3EwM6bBYKSgLPKj9rEnRSz7GArZ+uLU7KVXYWJWxmuWfH0e/LQ==
199-
dependencies:
200-
ajv "8.11.0"
201-
ajv-formats "2.1.1"
202-
fast-json-stable-stringify "2.1.0"
203-
magic-string "0.26.1"
204-
rxjs "6.6.7"
205-
source-map "0.7.3"
206-
207-
"@angular-devkit/[email protected]":
208-
version "14.0.0-next.9"
209-
resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-14.0.0-next.9.tgz#258d82931e0e5ecff2905910eb7701d7992a36ea"
210-
integrity sha512-vXr6J0GswTuNXz7RyhkmOlnUsQJ1OfjhiXAXMd3rP6GsmH4erJXuVVeYBwxBqi4dwAdwL0EHMy5tu603BKMaGA==
109+
"@angular-devkit/[email protected]":
110+
version "14.0.0-next.11"
111+
resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-14.0.0-next.11.tgz#8acdb26a51697ab580feba94342286d51c481e17"
112+
integrity sha512-x8F+yUYodxNcMsGhutOvwpd7lv0aUHgIiQOdGMzmfSuITm5/ENs/DaXBtg6VetbRDePttVYAoQXykcDgdJV35g==
211113
dependencies:
212-
"@angular-devkit/core" "14.0.0-next.9"
114+
"@angular-devkit/core" "14.0.0-next.11"
213115
jsonc-parser "3.0.0"
214116
magic-string "0.26.1"
215117
ora "5.4.1"
@@ -240,15 +142,15 @@
240142
"@angular/core" "^13.0.0 || ^14.0.0-0"
241143
reflect-metadata "^0.1.13"
242144

243-
"@angular/[email protected].9":
244-
version "14.0.0-next.9"
245-
resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-14.0.0-next.9.tgz#bca542488948a872a0b5282e591de2ce623e7ec6"
246-
integrity sha512-uTScUIcFE5Fp41uLjS5jYVaAZdO0dXzF44QN2U8j11XfYGbTL2a5gLdFHbvprjA3g10lOQh22hTuamVzbaCqfg==
145+
"@angular/[email protected].11":
146+
version "14.0.0-next.11"
147+
resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-14.0.0-next.11.tgz#93f2205b2fd9f82a43fb646d7ebe7da83377cc9e"
148+
integrity sha512-wKbkc56gJ/sAQrgT8keQsotUhr/+CK2zqY8Ab+GHjAdiP07cIuocP3PELoluGlDNxraqilUSgQwjqxsRcdPluw==
247149
dependencies:
248-
"@angular-devkit/architect" "0.1400.0-next.9"
249-
"@angular-devkit/core" "14.0.0-next.9"
250-
"@angular-devkit/schematics" "14.0.0-next.9"
251-
"@schematics/angular" "14.0.0-next.9"
150+
"@angular-devkit/architect" "0.1400.0-next.11"
151+
"@angular-devkit/core" "14.0.0-next.11"
152+
"@angular-devkit/schematics" "14.0.0-next.11"
153+
"@schematics/angular" "14.0.0-next.11"
252154
"@yarnpkg/lockfile" "1.1.0"
253155
ansi-colors "4.1.1"
254156
debug "4.3.4"
@@ -261,7 +163,7 @@
261163
ora "5.4.1"
262164
pacote "13.1.1"
263165
resolve "1.22.0"
264-
semver "7.3.6"
166+
semver "7.3.7"
265167
symbol-observable "4.0.0"
266168
uuid "8.3.2"
267169
yargs "17.4.1"
@@ -322,7 +224,6 @@
322224

323225
"@angular/dev-infra-private@https://github.com/angular/dev-infra-private-builds.git#4b4f4e4269a93c14f511c087bb14cdbc58a5ca70":
324226
version "0.0.0-63547286e1423fe55df2e4b8a93b435f982f52a1"
325-
uid "4b4f4e4269a93c14f511c087bb14cdbc58a5ca70"
326227
resolved "https://github.com/angular/dev-infra-private-builds.git#4b4f4e4269a93c14f511c087bb14cdbc58a5ca70"
327228
dependencies:
328229
"@angular-devkit/build-angular" "14.0.0-next.11"
@@ -2373,11 +2274,6 @@
23732274
resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-14.0.0-next.11.tgz#f5be27ab37b6d7097693a59c1f0a6be66f3a37f3"
23742275
integrity sha512-oph82/ud1tFtkTL6iqq6MDxPMxrX1lfnZgyorYlYx7rxw6j3SZpjFRCP19UUUlNisqIMLZXCeor0+IXeOlposA==
23752276

2376-
"@ngtools/[email protected]":
2377-
version "14.0.0-next.9"
2378-
resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-14.0.0-next.9.tgz#3806bdf6ff0944e289cdcf74995cd592fa3e086b"
2379-
integrity sha512-T9J2RUZOzdLm1j3sLu/17OkPwTloCN9d2hxCbDyWLkjwvFz4DVdEfHtotLQ5KPqhv91nAoEmoCqf96CwKds2qA==
2380-
23812277
"@nodelib/[email protected]":
23822278
version "2.1.5"
23832279
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"
@@ -2714,13 +2610,13 @@
27142610
colors "~1.2.1"
27152611
string-argv "~0.3.1"
27162612

2717-
"@schematics/[email protected].9":
2718-
version "14.0.0-next.9"
2719-
resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-14.0.0-next.9.tgz#b0b981f54f9d0f94ddefb2ce7a12583113fdcd83"
2720-
integrity sha512-Ktevb4JxU/WoQ6LcmHl28dDD59ZSA0AkOeYHXFuwn88R0vNkgG++TaXvMgHuWEGdNvulK7tSF/gVITZ58ukmaw==
2613+
"@schematics/[email protected].11":
2614+
version "14.0.0-next.11"
2615+
resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-14.0.0-next.11.tgz#e707c19a389c5621444b7f0fdf9f98699c4d033c"
2616+
integrity sha512-CsKgUjrAaFj3CFFZjOmFtieupmXRFORbOSkfWMJuLMZlqD7VUdsAd50VUwho6NwnrrsrpruVnEXlbVgKfZ3hcQ==
27212617
dependencies:
2722-
"@angular-devkit/core" "14.0.0-next.9"
2723-
"@angular-devkit/schematics" "14.0.0-next.9"
2618+
"@angular-devkit/core" "14.0.0-next.11"
2619+
"@angular-devkit/schematics" "14.0.0-next.11"
27242620
jsonc-parser "3.0.0"
27252621

27262622
"@sindresorhus/is@^0.14.0":
@@ -7128,7 +7024,7 @@ fast-glob@^3.2.11, fast-glob@^3.2.7, fast-glob@^3.2.9:
71287024
merge2 "^1.3.0"
71297025
micromatch "^4.0.4"
71307026

7131-
fast-json-stable-stringify@2.1.0, fast-json-stable-stringify@^2.0.0:
7027+
fast-json-stable-stringify@^2.0.0:
71327028
version "2.1.0"
71337029
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
71347030
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
@@ -7796,18 +7692,6 @@ glob-to-regexp@^0.4.1:
77967692
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
77977693
integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==
77987694

7799-
[email protected], glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, glob@^7.2.0, glob@~7.2.0:
7800-
version "7.2.0"
7801-
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023"
7802-
integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==
7803-
dependencies:
7804-
fs.realpath "^1.0.0"
7805-
inflight "^1.0.4"
7806-
inherits "2"
7807-
minimatch "^3.0.4"
7808-
once "^1.3.0"
7809-
path-is-absolute "^1.0.0"
7810-
78117695
78127696
version "8.0.1"
78137697
resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.1.tgz#00308f5c035aa0b2a447cd37ead267ddff1577d3"
@@ -7831,6 +7715,18 @@ glob@^5.0.15:
78317715
once "^1.3.0"
78327716
path-is-absolute "^1.0.0"
78337717

7718+
glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, glob@^7.2.0, glob@~7.2.0:
7719+
version "7.2.0"
7720+
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023"
7721+
integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==
7722+
dependencies:
7723+
fs.realpath "^1.0.0"
7724+
inflight "^1.0.4"
7725+
inherits "2"
7726+
minimatch "^3.0.4"
7727+
once "^1.3.0"
7728+
path-is-absolute "^1.0.0"
7729+
78347730
global-agent@^2.1.12:
78357731
version "2.2.0"
78367732
resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-2.2.0.tgz#566331b0646e6bf79429a16877685c4a1fbf76dc"
@@ -9998,7 +9894,7 @@ lru-cache@^6.0.0:
99989894
dependencies:
99999895
yallist "^4.0.0"
100009896

10001-
lru-cache@^7.4.0, lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1:
9897+
lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1:
100029898
version "7.8.1"
100039899
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.8.1.tgz#68ee3f4807a57d2ba185b7fd90827d5c21ce82bb"
100049900
integrity sha512-E1v547OCgJvbvevfjgK9sNKIVXO96NnsTsFPBlg4ZxjhsJSODoH9lk8Bm0OxvHNm6Vm5Yqkl/1fErDxhYL8Skg==
@@ -12811,15 +12707,6 @@ sass-lookup@^3.0.0:
1281112707
dependencies:
1281212708
commander "^2.16.0"
1281312709

12814-
12815-
version "1.50.0"
12816-
resolved "https://registry.yarnpkg.com/sass/-/sass-1.50.0.tgz#3e407e2ebc53b12f1e35ce45efb226ea6063c7c8"
12817-
integrity sha512-cLsD6MEZ5URXHStxApajEh7gW189kkjn4Rc8DQweMyF+o5HF5nfEz8QYLMlPsTOD88DknatTmBWkOcw5/LnJLQ==
12818-
dependencies:
12819-
chokidar ">=3.0.0 <4.0.0"
12820-
immutable "^4.0.0"
12821-
source-map-js ">=0.6.2 <2.0.0"
12822-
1282312710
[email protected], sass@^1.50.1:
1282412711
version "1.50.1"
1282512712
resolved "https://registry.yarnpkg.com/sass/-/sass-1.50.1.tgz#e9b078a1748863013c4712d2466ce8ca4e4ed292"
@@ -12966,13 +12853,6 @@ [email protected]:
1296612853
resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e"
1296712854
integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==
1296812855

12969-
12970-
version "7.3.6"
12971-
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.6.tgz#5d73886fb9c0c6602e79440b97165c29581cbb2b"
12972-
integrity sha512-HZWqcgwLsjaX1HBD31msI/rXktuIhS+lWvdE4kN9z+8IVT4Itc7vqU2WvYsyD6/sjYCt4dEKH/m1M3dwI9CC5w==
12973-
dependencies:
12974-
lru-cache "^7.4.0"
12975-
1297612856
[email protected], semver@^7.0.0, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@~7.3.0:
1297712857
version "7.3.7"
1297812858
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f"

0 commit comments

Comments
 (0)