Skip to content

Commit e847ee5

Browse files
alan-agius4vikerman
authored andcommitted
fix(@angular-devkit/build-angular): change the ngComponentDef to ɵcmp
Related to angular/angular@64fd0d6
1 parent 940276f commit e847ee5

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

packages/angular_devkit/build_angular/plugins/webpack/analytics.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ export class NgBuildAnalyticsPlugin {
158158
// Count the number of `Component({` strings (case sensitive), which happens in __decorate().
159159
// This does not include View Engine AOT compilation, we use the ngfactory for it.
160160
this._stats.numberOfComponents += countOccurrences(module._source.source(), ' Component({');
161-
// For Ivy we just count ngComponentDef.
162-
const numIvyComponents = countOccurrences(module._source.source(), 'ngComponentDef', true);
161+
// For Ivy we just count ɵcmp.
162+
const numIvyComponents = countOccurrences(module._source.source(), 'ɵcmp', true);
163163
this._stats.numberOfComponents += numIvyComponents;
164164

165165
// Check whether this is an Ivy app so that it can reported as part of analytics.

packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('Browser Builder AOT', () => {
3232
const fileName = join(normalize(output.outputPath), 'main.js');
3333
const content = virtualFs.fileBufferToString(await host.read(normalize(fileName)).toPromise());
3434
if (!veEnabled) {
35-
expect(content).toContain('AppComponent.ngComponentDef');
35+
expect(content).toContain('AppComponent.ɵcmp');
3636
} else {
3737
expect(content).toMatch(/platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/);
3838
}

packages/angular_devkit/build_ng_packagr/src/build/index_spec_large.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ describe('NgPackagr Builder', () => {
6666
expect(content).toContain('lib works');
6767

6868
if (veEnabled) {
69-
expect(content).not.toContain('ngComponentDef');
69+
expect(content).not.toContain('ɵcmp');
7070
} else {
71-
expect(content).toContain('ngComponentDef');
71+
expect(content).toContain('ɵcmp');
7272
}
7373
});
7474

tests/legacy-cli/e2e/ng-snapshot/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"description": "snapshot versions of Angular for e2e testing",
33
"private": true,
44
"dependencies": {
5-
"@angular/animations": "github:angular/animations-builds#07b04260b2653c48b11164b974e8acd89c956fb2",
6-
"@angular/common": "github:angular/common-builds#07a003b4d34b98677ba5eeffea2b41ea15126ff6",
7-
"@angular/compiler": "github:angular/compiler-builds#16f9f82ae890734f766fe3d5c78602cde193438a",
8-
"@angular/compiler-cli": "github:angular/compiler-cli-builds#cb91e7386f8174c5f7b98e08c9b7c3a4c8ee12c3",
9-
"@angular/core": "github:angular/core-builds#d144181cf413da0a442a24434b13e287c74b654d",
10-
"@angular/forms": "github:angular/forms-builds#7c857ae1506d0d9bf86880442b7c25aea2c7dd9d",
11-
"@angular/language-service": "github:angular/language-service-builds#279fb6627ffbf790523691c50f763b99b4f83080",
12-
"@angular/platform-browser": "github:angular/platform-browser-builds#117ba04374a43ea0ade5b82470658b82359ef71e",
13-
"@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#13b4e02eb3bba4b221609c1f4d9a554417cae4a9",
14-
"@angular/router": "github:angular/router-builds#8a7d5c49fc9ad105f3b9ca986ac14c6f3aec4435"
5+
"@angular/animations": "github:angular/animations-builds#06199648629a68084af81ecdbc73a4a425ff3a92",
6+
"@angular/common": "github:angular/common-builds#239bb4eb52905c57a8a0207e4f1e95f8e018bd54",
7+
"@angular/compiler": "github:angular/compiler-builds#ad0588213a4ae15b585efdca549bb04221129014",
8+
"@angular/compiler-cli": "github:angular/compiler-cli-builds#46061561d517698fc9608a44d207540bfda2fede",
9+
"@angular/core": "github:angular/core-builds#e05a7ec0414fe552ac3632d3735927e026157db3",
10+
"@angular/forms": "github:angular/forms-builds#e3910afb6188c86e9f51c615e24e3e65587142f5",
11+
"@angular/language-service": "github:angular/language-service-builds#5f99caab4c5bcfbdd8aecafc9c70d8c7ce703004",
12+
"@angular/platform-browser": "github:angular/platform-browser-builds#16497ae98fc072c69910e3042e622980645340ad",
13+
"@angular/platform-browser-dynamic": "github:angular/platform-browser-dynamic-builds#73fe229bcd3b0e644b946296805939757a2b9f83",
14+
"@angular/router": "github:angular/router-builds#f9822e15092516892cb3817ec3bf6524c0188adc"
1515
}
1616
}

tests/legacy-cli/e2e/tests/basic/ivy-opt-out.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default async function() {
4141
const mainUrl = mainUrlMatch && mainUrlMatch[1];
4242
const main = await request('http://localhost:4200/' + mainUrl);
4343

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

tests/legacy-cli/e2e/tests/basic/ivy.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default async function() {
4242
const mainUrl = mainUrlMatch && mainUrlMatch[1];
4343
const main = await request('http://localhost:4200/' + mainUrl);
4444

45-
if (!main.match(/ngComponentDef\s*=/)) {
45+
if (!main.match(/ɵcmp\s*=/)) {
4646
throw new Error('Ivy could not be found.');
4747
}
4848
if (main.match(/ngDevMode/)) {

0 commit comments

Comments
 (0)