Skip to content

Update framework dependencies #15845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
"typescript": "3.5.3"
},
"devDependencies": {
"@angular/compiler": "9.0.0-next.10",
"@angular/compiler-cli": "9.0.0-next.10",
"@angular/compiler": "9.0.0-next.11",
"@angular/compiler-cli": "9.0.0-next.11",
"@bazel/bazel": "0.29.0",
"@bazel/buildifier": "0.29.0",
"@bazel/jasmine": "0.37.1",
Expand Down
25 changes: 13 additions & 12 deletions packages/angular_devkit/build_angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,20 @@
"worker-plugin": "3.2.0"
},
"devDependencies": {
"@angular/animations": "9.0.0-next.10",
"@angular/animations": "9.0.0-next.11",
"@angular/cdk": "8.2.3",
"@angular/common": "9.0.0-next.10",
"@angular/compiler": "9.0.0-next.10",
"@angular/compiler-cli": "9.0.0-next.10",
"@angular/core": "9.0.0-next.10",
"@angular/forms": "9.0.0-next.10",
"@angular/localize": "9.0.0-next.10",
"@angular/common": "9.0.0-next.11",
"@angular/compiler": "9.0.0-next.11",
"@angular/compiler-cli": "9.0.0-next.11",
"@angular/core": "9.0.0-next.11",
"@angular/forms": "9.0.0-next.11",
"@angular/localize": "9.0.0-next.11",
"@angular/material": "8.2.3",
"@angular/platform-browser": "9.0.0-next.10",
"@angular/platform-browser-dynamic": "9.0.0-next.10",
"@angular/platform-server": "9.0.0-next.10",
"@angular/router": "9.0.0-next.10",
"@angular/service-worker": "9.0.0-next.10",
"@angular/platform-browser": "9.0.0-next.11",
"@angular/platform-browser-dynamic": "9.0.0-next.11",
"@angular/platform-server": "9.0.0-next.11",
"@angular/router": "9.0.0-next.11",
"@angular/service-worker": "9.0.0-next.11",
"codelyzer": "^5.0.0",
"bootstrap": "^4.0.0",
"font-awesome": "^4.7.0",
Expand All @@ -93,6 +93,7 @@
"karma-jasmine-html-reporter": "^1.4.0",
"popper.js": "^1.14.1",
"protractor": "~5.4.0",
"tslib": "~1.10.0",
"zone.js": "^0.10.0"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,13 @@ export class NgBuildAnalyticsPlugin {
// Count the number of `Component({` strings (case sensitive), which happens in __decorate().
// This does not include View Engine AOT compilation, we use the ngfactory for it.
this._stats.numberOfComponents += countOccurrences(module._source.source(), ' Component({');
// For Ivy we just count ngComponentDef.
const numIvyComponents = countOccurrences(module._source.source(), 'ngComponentDef', true);
// For Ivy we just count ɵcmp.
const numIvyComponents = countOccurrences(module._source.source(), 'ɵcmp', true);
this._stats.numberOfComponents += numIvyComponents;

// Check whether this is an Ivy app so that it can reported as part of analytics.
if (!this._stats.isIvy) {
if (numIvyComponents > 0 || module._source.source().includes('ngModuleDef')) {
this._stats.isIvy = true;
}
if (!this._stats.isIvy && numIvyComponents > 0) {
this._stats.isIvy = true;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('Browser Builder AOT', () => {
const fileName = join(normalize(output.outputPath), 'main.js');
const content = virtualFs.fileBufferToString(await host.read(normalize(fileName)).toPromise());
if (!veEnabled) {
expect(content).toContain('AppComponent.ngComponentDef');
expect(content).toContain('AppComponent.ɵcmp');
} else {
expect(content).toMatch(/platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('Browser Builder lazy modules', () => {
if (!veEnabled) {
const data = await files['lazy-lazy-module.js'];
expect(data).not.toBeUndefined('Lazy module output bundle does not exist');
expect(data).toContain('LazyModule.ngModuleDef');
expect(data).toContain('LazyModule.ɵmod');
} else {
expect(files['lazy-lazy-module-ngfactory.js']).not.toBeUndefined();
}
Expand Down Expand Up @@ -270,7 +270,7 @@ describe('Browser Builder lazy modules', () => {
if (!veEnabled) {
const data = await files['src-app-lazy-lazy-module.js'];
expect(data).not.toBeUndefined('Lazy module output bundle does not exist');
expect(data).toContain('LazyModule.ngModuleDef');
expect(data).toContain('LazyModule.ɵmod');
} else {
expect(files['src-app-lazy-lazy-module-ngfactory.js']).not.toBeUndefined();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Server Builder', () => {
if (veEnabled) {
expect(content).toMatch(/AppServerModuleNgFactory/);
} else {
expect(content).toMatch(/AppServerModule\.ngModuleDef/);
expect(content).toMatch(/AppServerModule\.ɵmod/);
}

await run.stop();
Expand Down Expand Up @@ -148,7 +148,7 @@ describe('Server Builder', () => {
if (veEnabled) {
expect(content).toMatch(/AppServerModuleNgFactory/);
} else {
expect(content).toMatch(/AppServerModule\.ngModuleDef/);
expect(content).toMatch(/AppServerModule\.ɵmod/);
}
}),
take(1),
Expand Down
4 changes: 2 additions & 2 deletions packages/angular_devkit/build_ng_packagr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"ng-packagr": "^4.0.0 || ^5.0.0"
},
"devDependencies": {
"@angular/compiler": "9.0.0-next.10",
"@angular/compiler-cli": "9.0.0-next.10",
"@angular/compiler": "9.0.0-next.11",
"@angular/compiler-cli": "9.0.0-next.11",
"@angular-devkit/core": "0.0.0",
"ng-packagr": "~5.7.0",
"tslib": "^1.10.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ describe('NgPackagr Builder', () => {
expect(content).toContain('lib works');

if (veEnabled) {
expect(content).not.toContain('ngComponentDef');
expect(content).not.toContain('ɵcmp');
} else {
expect(content).toContain('ngComponentDef');
expect(content).toContain('ɵcmp');
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('wrap enums and classes transformer', () => {
class ApplicationModule {
constructor(appRef) { }
}
ApplicationModule.ngModuleDef = ɵɵdefineNgModule({ type: ApplicationModule });
ApplicationModule.ɵmod = ɵɵdefineNgModule({ type: ApplicationModule });
/*@__PURE__*/ setClassMetadata(ApplicationModule, [{
type: NgModule,
args: [{ providers: APPLICATION_MODULE_PROVIDERS }]
Expand All @@ -148,7 +148,7 @@ describe('wrap enums and classes transformer', () => {
it('with nested static properties in IIFE', () => {
const input = tags.stripIndent`
class CommonModule { }
CommonModule.ngModuleDef = defineNgModule({
CommonModule.ɵmod = defineNgModule({
type: CommonModule
}), CommonModule.ngInjectorDef = defineInjector({
factory: function (t) {
Expand Down
4 changes: 2 additions & 2 deletions packages/ngtools/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"webpack": "^4.0.0"
},
"devDependencies": {
"@angular/compiler": "9.0.0-next.10",
"@angular/compiler-cli": "9.0.0-next.10",
"@angular/compiler": "9.0.0-next.11",
"@angular/compiler-cli": "9.0.0-next.11",
"typescript": "3.5.3",
"webpack": "4.41.1"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/schematics/angular/utility/latest-versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

export const latestVersions = {
// These versions should be kept up to date with latest Angular peer dependencies.
Angular: '~9.0.0-next.10',
Angular: '~9.0.0-next.11',
RxJs: '~6.5.3',
ZoneJs: '~0.10.2',
TypeScript: '~3.5.3',
Expand Down
2 changes: 1 addition & 1 deletion scripts/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default function(args: ParsedArgs, logger: logging.Logger) {
} else if (args.shard !== undefined) {
// CI is really flaky with NGCC
// This is a working around test order and isolation issues.
execSync('./node_modules/.bin/ivy-ngcc', { stdio: 'inherit' });
execSync('./node_modules/.bin/ngcc', { stdio: 'inherit' });
}

if (args.large) {
Expand Down
20 changes: 10 additions & 10 deletions tests/legacy-cli/e2e/ng-snapshot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"description": "snapshot versions of Angular for e2e testing",
"private": true,
"dependencies": {
"@angular/animations": "github:angular/animations-builds#07b04260b2653c48b11164b974e8acd89c956fb2",
"@angular/common": "github:angular/common-builds#07a003b4d34b98677ba5eeffea2b41ea15126ff6",
"@angular/compiler": "github:angular/compiler-builds#16f9f82ae890734f766fe3d5c78602cde193438a",
"@angular/compiler-cli": "github:angular/compiler-cli-builds#cb91e7386f8174c5f7b98e08c9b7c3a4c8ee12c3",
"@angular/core": "github:angular/core-builds#d144181cf413da0a442a24434b13e287c74b654d",
"@angular/forms": "github:angular/forms-builds#7c857ae1506d0d9bf86880442b7c25aea2c7dd9d",
"@angular/language-service": "github:angular/language-service-builds#279fb6627ffbf790523691c50f763b99b4f83080",
"@angular/platform-browser": "github:angular/platform-browser-builds#117ba04374a43ea0ade5b82470658b82359ef71e",
"@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#13b4e02eb3bba4b221609c1f4d9a554417cae4a9",
"@angular/router": "github:angular/router-builds#8a7d5c49fc9ad105f3b9ca986ac14c6f3aec4435"
"@angular/animations": "github:angular/animations-builds#06199648629a68084af81ecdbc73a4a425ff3a92",
"@angular/common": "github:angular/common-builds#239bb4eb52905c57a8a0207e4f1e95f8e018bd54",
"@angular/compiler": "github:angular/compiler-builds#ad0588213a4ae15b585efdca549bb04221129014",
"@angular/compiler-cli": "github:angular/compiler-cli-builds#46061561d517698fc9608a44d207540bfda2fede",
"@angular/core": "github:angular/core-builds#e05a7ec0414fe552ac3632d3735927e026157db3",
"@angular/forms": "github:angular/forms-builds#e3910afb6188c86e9f51c615e24e3e65587142f5",
"@angular/language-service": "github:angular/language-service-builds#5f99caab4c5bcfbdd8aecafc9c70d8c7ce703004",
"@angular/platform-browser": "github:angular/platform-browser-builds#16497ae98fc072c69910e3042e622980645340ad",
"@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#73fe229bcd3b0e644b946296805939757a2b9f83",
"@angular/router": "github:angular/router-builds#f9822e15092516892cb3817ec3bf6524c0188adc"
}
}
2 changes: 1 addition & 1 deletion tests/legacy-cli/e2e/tests/basic/ivy-opt-out.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default async function() {
const mainUrl = mainUrlMatch && mainUrlMatch[1];
const main = await request('http://localhost:4200/' + mainUrl);

if (main.match(/ngComponentDef\s*=/)) {
if (main.match(/ɵcmp\s*=/)) {
throw new Error('Loaded Ivy but expected View Engine applicatiom.');
}

Expand Down
2 changes: 1 addition & 1 deletion tests/legacy-cli/e2e/tests/basic/ivy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default async function() {
const mainUrl = mainUrlMatch && mainUrlMatch[1];
const main = await request('http://localhost:4200/' + mainUrl);

if (!main.match(/ngComponentDef\s*=/)) {
if (!main.match(/ɵcmp\s*=/)) {
throw new Error('Ivy could not be found.');
}
if (main.match(/ngDevMode/)) {
Expand Down
44 changes: 25 additions & 19 deletions tests/legacy-cli/e2e/tests/build/platform-server.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { normalize } from 'path';
import { getGlobalVariable } from '../../utils/env';
import { expectFileToMatch, writeFile } from '../../utils/fs';
import { appendToFile, expectFileToMatch, writeFile } from '../../utils/fs';
import { exec, ng, silentNpm } from '../../utils/process';
import { updateJsonFile } from '../../utils/project';
import { readNgVersion } from '../../utils/version';
Expand All @@ -9,9 +9,7 @@ export default async function () {
const argv = getGlobalVariable('argv');
const veEnabled = argv['ve'];

await ng('add', '@nguniversal/express-engine', '--client-project', 'test-project');
// todo remove once https://github.com/angular/universal/pull/1229 is landed
await silentNpm('install', '@types/express', '--save-dev');
await ng('add', '@nguniversal/[email protected]');

await updateJsonFile('package.json', packageJson => {
const dependencies = packageJson['dependencies'];
Expand All @@ -22,32 +20,40 @@ export default async function () {

await silentNpm('install');
if (veEnabled) {
// todo: https://github.com/angular/angular-cli/issues/15851
// We need to fix the 'export_ngfactory' transformer as with the
// new universal approach the factory is not exported.
await appendToFile(
'./src/main.server.ts',
`export { AppServerModuleNgFactory } from './app/app.server.module.ngfactory'`,
);

await writeFile(
'./index.js',
` require('zone.js/dist/zone-node');
const fs = require('fs');
const { AppServerModuleNgFactory, renderModuleFactory } = require('./dist/server/main');
'./server.ts',
` import 'zone.js/dist/zone-node';
import * as fs from 'fs';
import { AppServerModuleNgFactory, renderModuleFactory } from './src/main.server';

renderModuleFactory(AppServerModuleNgFactory, {
url: '/',
document: '<app-root></app-root>'
}).then(html => {
fs.writeFileSync('dist/server/index.html', html);
fs.writeFileSync('dist/test-project/server/index.html', html);
});
`,
);
} else {
await writeFile(
'./index.js',
` require('zone.js/dist/zone-node');
const fs = require('fs');
const { AppServerModule, renderModule } = require('./dist/server/main');
'./server.ts',
` import 'zone.js/dist/zone-node';
import * as fs from 'fs';
import { AppServerModule, renderModule } from './src/main.server';

renderModule(AppServerModule, {
url: '/',
document: '<app-root></app-root>'
}).then(html => {
fs.writeFileSync('dist/server/index.html', html);
fs.writeFileSync('dist/test-project/server/index.html', html);
});
`,
);
Expand All @@ -56,18 +62,18 @@ export default async function () {

await ng('run', 'test-project:server:production', '--optimization', 'false');

await expectFileToMatch('dist/server/main.js', veEnabled ? /exports.*AppServerModuleNgFactory/ : /exports.*AppServerModule/);
await exec(normalize('node'), 'index.js');
await expectFileToMatch('dist/test-project/server/main.js', veEnabled ? /exports.*AppServerModuleNgFactory/ : /exports.*AppServerModule/);
await exec(normalize('node'), 'dist/test-project/server/main.js');
await expectFileToMatch(
'dist/server/index.html',
'dist/test-project/server/index.html',
/<p.*>Here are some links to help you get started:<\/p>/,
);

// works with optimization and bundleDependencies enabled
await ng('run', 'test-project:server:production', '--optimization', '--bundleDependencies', 'all');
await exec(normalize('node'), 'index.js');
await exec(normalize('node'), 'dist/test-project/server/main.js');
await expectFileToMatch(
'dist/server/index.html',
'dist/test-project/server/index.html',
/<p.*>Here are some links to help you get started:<\/p>/,
);
}
Loading