mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
build: update Angular tooling packages to 15.0.0-next.3 (#47584)
- This update is needed to implement the changes in `ng add localize` https://github.com/angular/angular/pull/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 #47584
This commit is contained in:
parent
50f8928d56
commit
249384b00c
20 changed files with 566 additions and 578 deletions
|
|
@ -2,7 +2,7 @@
|
|||
"cli-hello-world": {
|
||||
"uncompressed": {
|
||||
"runtime": 1083,
|
||||
"main": 125134,
|
||||
"main": 124531,
|
||||
"polyfills": 33824
|
||||
}
|
||||
},
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
"cli-hello-world-ivy-compat": {
|
||||
"uncompressed": {
|
||||
"runtime": 1102,
|
||||
"main": 132120,
|
||||
"main": 131519,
|
||||
"polyfills": 33957
|
||||
}
|
||||
},
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
"cli-hello-world-lazy": {
|
||||
"uncompressed": {
|
||||
"runtime": 2835,
|
||||
"main": 227905,
|
||||
"main": 225269,
|
||||
"polyfills": 33842,
|
||||
"src_app_lazy_lazy_routes_ts": 487
|
||||
}
|
||||
|
|
@ -41,14 +41,14 @@
|
|||
"forms": {
|
||||
"uncompressed": {
|
||||
"runtime": 1060,
|
||||
"main": 157136,
|
||||
"main": 155712,
|
||||
"polyfills": 33915
|
||||
}
|
||||
},
|
||||
"animations": {
|
||||
"uncompressed": {
|
||||
"runtime": 1070,
|
||||
"main": 156816,
|
||||
"main": 155920,
|
||||
"polyfills": 33814
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,14 +7,8 @@ import {
|
|||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
|
|
|
|||
|
|
@ -8,4 +8,3 @@ if (environment.production) {
|
|||
}
|
||||
|
||||
export { AppServerModule } from './app/app.server.module';
|
||||
export { renderModule, renderModuleFactory } from '@angular/platform-server';
|
||||
|
|
|
|||
|
|
@ -7,19 +7,9 @@ import {
|
|||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: {
|
||||
context(path: string, deep?: boolean, filter?: RegExp): {
|
||||
keys(): string[];
|
||||
<T>(id: string): T;
|
||||
};
|
||||
};
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,14 +7,8 @@ import {
|
|||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
|
|
|
|||
|
|
@ -7,14 +7,8 @@ import {
|
|||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
|
|
|
|||
|
|
@ -7,14 +7,8 @@ import {
|
|||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
|
|
|
|||
|
|
@ -5,11 +5,5 @@ import 'zone.js/testing';
|
|||
import {getTestBed} from '@angular/core/testing';
|
||||
import {BrowserDynamicTestingModule, platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting());
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
|
|
|
|||
|
|
@ -7,14 +7,8 @@ import {
|
|||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
|
|
|
|||
|
|
@ -7,14 +7,8 @@ import {
|
|||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
|
|
|
|||
|
|
@ -7,14 +7,8 @@ import {
|
|||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
|
|
|
|||
|
|
@ -7,19 +7,8 @@ import {
|
|||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: {
|
||||
context(path: string, deep?: boolean, filter?: RegExp): {
|
||||
keys(): string[];
|
||||
<T>(id: string): T;
|
||||
};
|
||||
};
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
|
|
|
|||
10
package.json
10
package.json
|
|
@ -45,13 +45,13 @@
|
|||
},
|
||||
"// 1": "dependencies are used locally and by bazel",
|
||||
"dependencies": {
|
||||
"@angular-devkit/build-angular": "^14.2.0",
|
||||
"@angular-devkit/build-angular": "15.0.0-next.3",
|
||||
"@angular-devkit/build-optimizer": "0.1302.0-rc.1",
|
||||
"@angular-devkit/core": "^14.2.0",
|
||||
"@angular-devkit/schematics": "^14.2.0",
|
||||
"@angular-devkit/core": "15.0.0-next.3",
|
||||
"@angular-devkit/schematics": "15.0.0-next.3",
|
||||
"@angular/animations-12": "npm:@angular/animations@12.2.13",
|
||||
"@angular/cdk": "^14.2.0",
|
||||
"@angular/cli": "^14.2.0",
|
||||
"@angular/cli": "15.0.0-next.3",
|
||||
"@angular/common-12": "npm:@angular/common@12.2.13",
|
||||
"@angular/core-12": "npm:@angular/core@12.2.13",
|
||||
"@angular/forms-12": "npm:@angular/forms@12.2.13",
|
||||
|
|
@ -80,7 +80,7 @@
|
|||
"@rollup/plugin-babel": "^5.3.0",
|
||||
"@rollup/plugin-commonjs": "^22.0.0",
|
||||
"@rollup/plugin-node-resolve": "^13.0.4",
|
||||
"@schematics/angular": "^14.2.0",
|
||||
"@schematics/angular": "15.0.0-next.3",
|
||||
"@types/angular": "^1.6.47",
|
||||
"@types/babel__core": "7.1.19",
|
||||
"@types/babel__generator": "7.6.4",
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ describe('all migrations', () => {
|
|||
writeFile('/node_modules/@angular/core/index.d.ts', `export const MODULE: any;`);
|
||||
writeFile('/angular.json', JSON.stringify({
|
||||
version: 1,
|
||||
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
projects: {t: {root: '', architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
}));
|
||||
writeFile('/tsconfig.json', `{}`);
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ describe('entryComponents migration', () => {
|
|||
}));
|
||||
writeFile('/angular.json', JSON.stringify({
|
||||
version: 1,
|
||||
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
projects: {t: {root: '', architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
}));
|
||||
|
||||
previousWorkingDir = shx.pwd();
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ describe('PathMatch type migration', () => {
|
|||
}));
|
||||
writeFile('/angular.json', JSON.stringify({
|
||||
version: 1,
|
||||
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
projects: {t: {root: '', architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
}));
|
||||
// We need to declare the Angular symbols we're testing for, otherwise type checking won't work.
|
||||
writeFile('/node_modules/@angular/router/index.d.ts', `
|
||||
|
|
|
|||
|
|
@ -22,7 +22,9 @@ describe('project tsconfig paths', () => {
|
|||
testTree.create('/my-custom-config.json', '');
|
||||
testTree.create('/angular.json', JSON.stringify({
|
||||
version: 1,
|
||||
projects: {my_name: {architect: {build: {options: {tsConfig: './my-custom-config.json'}}}}}
|
||||
projects: {
|
||||
my_name: {root: '', architect: {build: {options: {tsConfig: './my-custom-config.json'}}}}
|
||||
}
|
||||
}));
|
||||
|
||||
expect((await getProjectTsConfigPaths(testTree)).buildPaths).toEqual(['my-custom-config.json']);
|
||||
|
|
@ -36,6 +38,7 @@ describe('project tsconfig paths', () => {
|
|||
// Comments are supported in the workspace configurations.
|
||||
"projects": {
|
||||
"with_tests": {
|
||||
"root": "",
|
||||
"targets": {
|
||||
"build": {
|
||||
"options": {
|
||||
|
|
@ -56,7 +59,8 @@ describe('project tsconfig paths', () => {
|
|||
testTree.create('/my-test-config.json', '');
|
||||
testTree.create('/angular.json', JSON.stringify({
|
||||
version: 1,
|
||||
projects: {my_name: {architect: {test: {options: {tsConfig: './my-test-config.json'}}}}}
|
||||
projects:
|
||||
{my_name: {root: '', architect: {test: {options: {tsConfig: './my-test-config.json'}}}}}
|
||||
}));
|
||||
|
||||
expect((await getProjectTsConfigPaths(testTree)).testPaths).toEqual(['my-test-config.json']);
|
||||
|
|
@ -66,7 +70,9 @@ describe('project tsconfig paths', () => {
|
|||
testTree.create('/my-test-config.json', '');
|
||||
testTree.create('/.angular.json', JSON.stringify({
|
||||
version: 1,
|
||||
projects: {with_tests: {architect: {test: {options: {tsConfig: './my-test-config.json'}}}}}
|
||||
projects: {
|
||||
with_tests: {root: '', architect: {test: {options: {tsConfig: './my-test-config.json'}}}}
|
||||
}
|
||||
}));
|
||||
|
||||
expect((await getProjectTsConfigPaths(testTree)).testPaths).toEqual(['my-test-config.json']);
|
||||
|
|
@ -76,7 +82,7 @@ describe('project tsconfig paths', () => {
|
|||
testTree.create('/tsconfig.json', '');
|
||||
testTree.create('/.angular.json', JSON.stringify({
|
||||
version: 1,
|
||||
projects: {app: {architect: {build: {options: {tsConfig: 'tsconfig.json'}}}}}
|
||||
projects: {app: {root: '', architect: {build: {options: {tsConfig: 'tsconfig.json'}}}}}
|
||||
}));
|
||||
|
||||
expect((await getProjectTsConfigPaths(testTree)).buildPaths).toEqual(['tsconfig.json']);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ describe('Typed Forms migration', () => {
|
|||
|
||||
writeFile('/angular.json', JSON.stringify({
|
||||
version: 1,
|
||||
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
projects: {t: {root: '', architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
|
||||
}));
|
||||
|
||||
// We need to declare the Angular symbols we're testing for, otherwise type checking won't work.
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ export { renderModule, renderModuleFactory } from '@angular/platform-server';`;
|
|||
version: 1,
|
||||
projects: {
|
||||
'demo': {
|
||||
root: '',
|
||||
architect: {
|
||||
build: {
|
||||
builder: '@angular-devkit/build-angular:browser',
|
||||
|
|
@ -166,6 +167,7 @@ export { renderModule, renderModuleFactory } from '@angular/platform-server';`;
|
|||
version: 1,
|
||||
projects: {
|
||||
'demo': {
|
||||
root: '',
|
||||
architect: {},
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue