Skip to content

Commit cb71ba9

Browse files
alan-agius4pterratpro
authored andcommitted
build: update Angular tooling packages to 15.0.0-next.3 (angular#47584)
- This update is needed to implement the changes in `ng add localize` angular#47569 - Add missing `root` options to all `angular.json`, this is required as otherwise the angular.json validation will fail. - Remove `require.context` from test.ts integration test, as this is no longer needed. - Update payloads golden files. PR Close angular#47584
1 parent 58d0647 commit cb71ba9

File tree

20 files changed

+525
-537
lines changed

20 files changed

+525
-537
lines changed

goldens/size-tracking/integration-payloads.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cli-hello-world": {
33
"uncompressed": {
44
"runtime": 1083,
5-
"main": 125134,
5+
"main": 124531,
66
"polyfills": 33824
77
}
88
},
@@ -19,7 +19,7 @@
1919
"cli-hello-world-ivy-compat": {
2020
"uncompressed": {
2121
"runtime": 1102,
22-
"main": 132120,
22+
"main": 131519,
2323
"polyfills": 33957
2424
}
2525
},
@@ -33,22 +33,22 @@
3333
"cli-hello-world-lazy": {
3434
"uncompressed": {
3535
"runtime": 2835,
36-
"main": 227905,
36+
"main": 225269,
3737
"polyfills": 33842,
3838
"src_app_lazy_lazy_routes_ts": 487
3939
}
4040
},
4141
"forms": {
4242
"uncompressed": {
4343
"runtime": 1060,
44-
"main": 157136,
44+
"main": 155712,
4545
"polyfills": 33915
4646
}
4747
},
4848
"animations": {
4949
"uncompressed": {
5050
"runtime": 1070,
51-
"main": 156816,
51+
"main": 155920,
5252
"polyfills": 33814
5353
}
5454
},

integration/animations/src/test.ts

-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@ import {
77
platformBrowserDynamicTesting
88
} from '@angular/platform-browser-dynamic/testing';
99

10-
declare const require: any;
11-
1210
// First, initialize the Angular testing environment.
1311
getTestBed().initTestEnvironment(
1412
BrowserDynamicTestingModule,
1513
platformBrowserDynamicTesting()
1614
);
17-
// Then we find all the tests.
18-
const context = require.context('./', true, /\.spec\.ts$/);
19-
// And load the modules.
20-
context.keys().map(context);

integration/cli-elements-universal/src/main.server.ts

-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ if (environment.production) {
88
}
99

1010
export { AppServerModule } from './app/app.server.module';
11-
export { renderModule, renderModuleFactory } from '@angular/platform-server';

integration/cli-elements-universal/src/test.ts

+1-11
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,9 @@ import {
77
platformBrowserDynamicTesting
88
} from '@angular/platform-browser-dynamic/testing';
99

10-
declare const require: {
11-
context(path: string, deep?: boolean, filter?: RegExp): {
12-
keys(): string[];
13-
<T>(id: string): T;
14-
};
15-
};
16-
1710
// First, initialize the Angular testing environment.
1811
getTestBed().initTestEnvironment(
1912
BrowserDynamicTestingModule,
2013
platformBrowserDynamicTesting()
2114
);
22-
// Then we find all the tests.
23-
const context = require.context('./', true, /\.spec\.ts$/);
24-
// And load the modules.
25-
context.keys().map(context);
15+

integration/cli-hello-world-ivy-compat/src/test.ts

-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@ import {
77
platformBrowserDynamicTesting
88
} from '@angular/platform-browser-dynamic/testing';
99

10-
declare const require: any;
11-
1210
// First, initialize the Angular testing environment.
1311
getTestBed().initTestEnvironment(
1412
BrowserDynamicTestingModule,
1513
platformBrowserDynamicTesting()
1614
);
17-
// Then we find all the tests.
18-
const context = require.context('./', true, /\.spec\.ts$/);
19-
// And load the modules.
20-
context.keys().map(context);

integration/cli-hello-world-ivy-i18n/src/test.ts

-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@ import {
77
platformBrowserDynamicTesting
88
} from '@angular/platform-browser-dynamic/testing';
99

10-
declare const require: any;
11-
1210
// First, initialize the Angular testing environment.
1311
getTestBed().initTestEnvironment(
1412
BrowserDynamicTestingModule,
1513
platformBrowserDynamicTesting()
1614
);
17-
// Then we find all the tests.
18-
const context = require.context('./', true, /\.spec\.ts$/);
19-
// And load the modules.
20-
context.keys().map(context);

integration/cli-hello-world-lazy/src/test.ts

-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@ import {
77
platformBrowserDynamicTesting
88
} from '@angular/platform-browser-dynamic/testing';
99

10-
declare const require: any;
11-
1210
// First, initialize the Angular testing environment.
1311
getTestBed().initTestEnvironment(
1412
BrowserDynamicTestingModule,
1513
platformBrowserDynamicTesting()
1614
);
17-
// Then we find all the tests.
18-
const context = require.context('./', true, /\.spec\.ts$/);
19-
// And load the modules.
20-
context.keys().map(context);

integration/cli-hello-world-mocha/src/test.ts

-6
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,5 @@ import 'zone.js/testing';
55
import {getTestBed} from '@angular/core/testing';
66
import {BrowserDynamicTestingModule, platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing';
77

8-
declare const require: any;
9-
108
// First, initialize the Angular testing environment.
119
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
12-
// Then we find all the tests.
13-
const context = require.context('./', true, /\.spec\.ts$/);
14-
// And load the modules.
15-
context.keys().map(context);

integration/cli-hello-world-ts-47/src/test.ts

-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@ import {
77
platformBrowserDynamicTesting
88
} from '@angular/platform-browser-dynamic/testing';
99

10-
declare const require: any;
11-
1210
// First, initialize the Angular testing environment.
1311
getTestBed().initTestEnvironment(
1412
BrowserDynamicTestingModule,
1513
platformBrowserDynamicTesting()
1614
);
17-
// Then we find all the tests.
18-
const context = require.context('./', true, /\.spec\.ts$/);
19-
// And load the modules.
20-
context.keys().map(context);

integration/cli-hello-world/src/test.ts

-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@ import {
77
platformBrowserDynamicTesting
88
} from '@angular/platform-browser-dynamic/testing';
99

10-
declare const require: any;
11-
1210
// First, initialize the Angular testing environment.
1311
getTestBed().initTestEnvironment(
1412
BrowserDynamicTestingModule,
1513
platformBrowserDynamicTesting()
1614
);
17-
// Then we find all the tests.
18-
const context = require.context('./', true, /\.spec\.ts$/);
19-
// And load the modules.
20-
context.keys().map(context);

integration/forms/src/test.ts

-6
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,8 @@ import {
77
platformBrowserDynamicTesting
88
} from '@angular/platform-browser-dynamic/testing';
99

10-
declare const require: any;
11-
1210
// First, initialize the Angular testing environment.
1311
getTestBed().initTestEnvironment(
1412
BrowserDynamicTestingModule,
1513
platformBrowserDynamicTesting()
1614
);
17-
// Then we find all the tests.
18-
const context = require.context('./', true, /\.spec\.ts$/);
19-
// And load the modules.
20-
context.keys().map(context);

integration/trusted-types/src/test.ts

-11
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,8 @@ import {
77
platformBrowserDynamicTesting
88
} from '@angular/platform-browser-dynamic/testing';
99

10-
declare const require: {
11-
context(path: string, deep?: boolean, filter?: RegExp): {
12-
keys(): string[];
13-
<T>(id: string): T;
14-
};
15-
};
16-
1710
// First, initialize the Angular testing environment.
1811
getTestBed().initTestEnvironment(
1912
BrowserDynamicTestingModule,
2013
platformBrowserDynamicTesting()
2114
);
22-
// Then we find all the tests.
23-
const context = require.context('./', true, /\.spec\.ts$/);
24-
// And load the modules.
25-
context.keys().map(context);

package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545
},
4646
"// 1": "dependencies are used locally and by bazel",
4747
"dependencies": {
48-
"@angular-devkit/build-angular": "^14.2.0",
48+
"@angular-devkit/build-angular": "15.0.0-next.3",
4949
"@angular-devkit/build-optimizer": "0.1302.0-rc.1",
50-
"@angular-devkit/core": "^14.2.0",
51-
"@angular-devkit/schematics": "^14.2.0",
50+
"@angular-devkit/core": "15.0.0-next.3",
51+
"@angular-devkit/schematics": "15.0.0-next.3",
5252
"@angular/animations-12": "npm:@angular/[email protected]",
5353
"@angular/cdk": "^14.2.0",
54-
"@angular/cli": "^14.2.0",
54+
"@angular/cli": "15.0.0-next.3",
5555
"@angular/common-12": "npm:@angular/[email protected]",
5656
"@angular/core-12": "npm:@angular/[email protected]",
5757
"@angular/forms-12": "npm:@angular/[email protected]",
@@ -80,7 +80,7 @@
8080
"@rollup/plugin-babel": "^5.3.0",
8181
"@rollup/plugin-commonjs": "^22.0.0",
8282
"@rollup/plugin-node-resolve": "^13.0.4",
83-
"@schematics/angular": "^14.2.0",
83+
"@schematics/angular": "15.0.0-next.3",
8484
"@types/angular": "^1.6.47",
8585
"@types/babel__core": "7.1.19",
8686
"@types/babel__generator": "7.6.4",

packages/core/schematics/test/all-migrations.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe('all migrations', () => {
3030
writeFile('/node_modules/@angular/core/index.d.ts', `export const MODULE: any;`);
3131
writeFile('/angular.json', JSON.stringify({
3232
version: 1,
33-
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
33+
projects: {t: {root: '', architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
3434
}));
3535
writeFile('/tsconfig.json', `{}`);
3636

packages/core/schematics/test/entry_components_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe('entryComponents migration', () => {
3333
}));
3434
writeFile('/angular.json', JSON.stringify({
3535
version: 1,
36-
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
36+
projects: {t: {root: '', architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
3737
}));
3838

3939
previousWorkingDir = shx.pwd();

packages/core/schematics/test/path_match_type_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('PathMatch type migration', () => {
3232
}));
3333
writeFile('/angular.json', JSON.stringify({
3434
version: 1,
35-
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
35+
projects: {t: {root: '', architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
3636
}));
3737
// We need to declare the Angular symbols we're testing for, otherwise type checking won't work.
3838
writeFile('/node_modules/@angular/router/index.d.ts', `

packages/core/schematics/test/project_tsconfig_paths_spec.ts

+10-4
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ describe('project tsconfig paths', () => {
2222
testTree.create('/my-custom-config.json', '');
2323
testTree.create('/angular.json', JSON.stringify({
2424
version: 1,
25-
projects: {my_name: {architect: {build: {options: {tsConfig: './my-custom-config.json'}}}}}
25+
projects: {
26+
my_name: {root: '', architect: {build: {options: {tsConfig: './my-custom-config.json'}}}}
27+
}
2628
}));
2729

2830
expect((await getProjectTsConfigPaths(testTree)).buildPaths).toEqual(['my-custom-config.json']);
@@ -36,6 +38,7 @@ describe('project tsconfig paths', () => {
3638
// Comments are supported in the workspace configurations.
3739
"projects": {
3840
"with_tests": {
41+
"root": "",
3942
"targets": {
4043
"build": {
4144
"options": {
@@ -56,7 +59,8 @@ describe('project tsconfig paths', () => {
5659
testTree.create('/my-test-config.json', '');
5760
testTree.create('/angular.json', JSON.stringify({
5861
version: 1,
59-
projects: {my_name: {architect: {test: {options: {tsConfig: './my-test-config.json'}}}}}
62+
projects:
63+
{my_name: {root: '', architect: {test: {options: {tsConfig: './my-test-config.json'}}}}}
6064
}));
6165

6266
expect((await getProjectTsConfigPaths(testTree)).testPaths).toEqual(['my-test-config.json']);
@@ -66,7 +70,9 @@ describe('project tsconfig paths', () => {
6670
testTree.create('/my-test-config.json', '');
6771
testTree.create('/.angular.json', JSON.stringify({
6872
version: 1,
69-
projects: {with_tests: {architect: {test: {options: {tsConfig: './my-test-config.json'}}}}}
73+
projects: {
74+
with_tests: {root: '', architect: {test: {options: {tsConfig: './my-test-config.json'}}}}
75+
}
7076
}));
7177

7278
expect((await getProjectTsConfigPaths(testTree)).testPaths).toEqual(['my-test-config.json']);
@@ -76,7 +82,7 @@ describe('project tsconfig paths', () => {
7682
testTree.create('/tsconfig.json', '');
7783
testTree.create('/.angular.json', JSON.stringify({
7884
version: 1,
79-
projects: {app: {architect: {build: {options: {tsConfig: 'tsconfig.json'}}}}}
85+
projects: {app: {root: '', architect: {build: {options: {tsConfig: 'tsconfig.json'}}}}}
8086
}));
8187

8288
expect((await getProjectTsConfigPaths(testTree)).buildPaths).toEqual(['tsconfig.json']);

packages/core/schematics/test/typed_forms_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe('Typed Forms migration', () => {
3333

3434
writeFile('/angular.json', JSON.stringify({
3535
version: 1,
36-
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
36+
projects: {t: {root: '', architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
3737
}));
3838

3939
// We need to declare the Angular symbols we're testing for, otherwise type checking won't work.

packages/localize/schematics/ng-add/index_spec.ts

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export { renderModule, renderModuleFactory } from '@angular/platform-server';`;
5252
version: 1,
5353
projects: {
5454
'demo': {
55+
root: '',
5556
architect: {
5657
build: {
5758
builder: '@angular-devkit/build-angular:browser',
@@ -166,6 +167,7 @@ export { renderModule, renderModuleFactory } from '@angular/platform-server';`;
166167
version: 1,
167168
projects: {
168169
'demo': {
170+
root: '',
169171
architect: {},
170172
}
171173
},

0 commit comments

Comments
 (0)