Skip to content

Commit 73db6f2

Browse files
committed
refactor(compiler-cli): Update compliance golden partials
This commit is part of the update to standalone by default
1 parent 16374d5 commit 73db6f2

52 files changed

Lines changed: 1219 additions & 416 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/GOLDEN_PARTIAL.js

Lines changed: 55 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDE
1515
selector: 'host-binding-comp',
1616
template: `
1717
<my-forward-directive></my-forward-directive>
18-
`
18+
`,
19+
standalone: false
1920
}]
2021
}] });
2122
class MyForwardDirective {
@@ -24,7 +25,10 @@ MyForwardDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", versi
2425
MyForwardDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyForwardDirective, selector: "my-forward-directive", ngImport: i0 });
2526
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyForwardDirective, decorators: [{
2627
type: Directive,
27-
args: [{ selector: 'my-forward-directive' }]
28+
args: [{
29+
selector: 'my-forward-directive',
30+
standalone: false
31+
}]
2832
}] });
2933
export class MyModule {
3034
}
@@ -67,7 +71,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDE
6771
selector: 'host-binding-comp',
6872
template: `
6973
<div [attr.style]="{} | my_forward_pipe">...</div>
70-
`
74+
`,
75+
standalone: false
7176
}]
7277
}] });
7378
class MyForwardPipe {
@@ -77,7 +82,10 @@ MyForwardPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
7782
MyForwardPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyForwardPipe, name: "my_forward_pipe" });
7883
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyForwardPipe, decorators: [{
7984
type: Pipe,
80-
args: [{ name: 'my_forward_pipe' }]
85+
args: [{
86+
name: 'my_forward_pipe',
87+
standalone: false
88+
}]
8189
}] });
8290
export class MyModule {
8391
}
@@ -114,7 +122,10 @@ SomeDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
114122
SomeDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: SomeDirective, selector: "[some-directive]", exportAs: ["someDir", "otherDir"], ngImport: i0 });
115123
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: SomeDirective, decorators: [{
116124
type: Directive,
117-
args: [{ selector: '[some-directive]', exportAs: 'someDir, otherDir' }]
125+
args: [{
126+
selector: '[some-directive]', exportAs: 'someDir, otherDir',
127+
standalone: false
128+
}]
118129
}] });
119130
export class MyModule {
120131
}
@@ -173,7 +184,10 @@ SomeComp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0
173184
SomeComp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: SomeComp, selector: "some-comp", inputs: { prop: "prop", otherProp: "otherProp" }, ngImport: i0, template: '', isInline: true });
174185
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: SomeComp, decorators: [{
175186
type: Component,
176-
args: [{ selector: 'some-comp', template: '' }]
187+
args: [{
188+
selector: 'some-comp', template: '',
189+
standalone: false
190+
}]
177191
}], propDecorators: { prop: [{
178192
type: Input
179193
}], otherProp: [{
@@ -185,7 +199,10 @@ MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PL
185199
MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, selector: "ng-component", ngImport: i0, template: '<some-comp [prop]="{}" [otherProp]="{a: 1, b: 2}"></some-comp>', isInline: true, dependencies: [{ kind: "component", type: SomeComp, selector: "some-comp", inputs: ["prop", "otherProp"] }] });
186200
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{
187201
type: Component,
188-
args: [{ template: '<some-comp [prop]="{}" [otherProp]="{a: 1, b: 2}"></some-comp>' }]
202+
args: [{
203+
template: '<some-comp [prop]="{}" [otherProp]="{a: 1, b: 2}"></some-comp>',
204+
standalone: false
205+
}]
189206
}] });
190207
export class MyMod {
191208
}
@@ -228,7 +245,10 @@ SomeComp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0
228245
SomeComp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: SomeComp, selector: "some-comp", inputs: { prop: "prop", otherProp: "otherProp" }, ngImport: i0, template: '', isInline: true });
229246
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: SomeComp, decorators: [{
230247
type: Component,
231-
args: [{ selector: 'some-comp', template: '' }]
248+
args: [{
249+
selector: 'some-comp', template: '',
250+
standalone: false
251+
}]
232252
}], propDecorators: { prop: [{
233253
type: Input
234254
}], otherProp: [{
@@ -240,7 +260,10 @@ MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PL
240260
MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, selector: "ng-component", ngImport: i0, template: '<some-comp [prop]="[]" [otherProp]="[0, 1, 2]"></some-comp>', isInline: true, dependencies: [{ kind: "component", type: SomeComp, selector: "some-comp", inputs: ["prop", "otherProp"] }] });
241261
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{
242262
type: Component,
243-
args: [{ template: '<some-comp [prop]="[]" [otherProp]="[0, 1, 2]"></some-comp>' }]
263+
args: [{
264+
template: '<some-comp [prop]="[]" [otherProp]="[0, 1, 2]"></some-comp>',
265+
standalone: false
266+
}]
244267
}] });
245268
export class MyMod {
246269
}
@@ -290,7 +313,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDE
290313
template: `
291314
<div [dir]="{foo: null}"></div>
292315
<div [dir]="{foo: {}}"></div>
293-
`
316+
`,
317+
standalone: false
294318
}]
295319
}] });
296320
export class MyModule {
@@ -335,7 +359,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDE
335359
template: `
336360
<div [dir]="{foo: null}"></div>
337361
<div [dir]="{foo: []}"></div>
338-
`
362+
`,
363+
standalone: false
339364
}]
340365
}] });
341366
export class MyModule {
@@ -383,7 +408,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDE
383408
template: `
384409
<div [dir]="{foo: null}"></div>
385410
<div [dir]="{foo: getFoo()}"></div>
386-
`
411+
`,
412+
standalone: false
387413
}]
388414
}] });
389415
export class MyModule {
@@ -466,7 +492,10 @@ MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.
466492
MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, selector: "my-app", ngImport: i0, template: '<ng-template [id]=""></ng-template>', isInline: true });
467493
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{
468494
type: Component,
469-
args: [{ selector: 'my-app', template: '<ng-template [id]=""></ng-template>' }]
495+
args: [{
496+
selector: 'my-app', template: '<ng-template [id]=""></ng-template>',
497+
standalone: false
498+
}]
470499
}] });
471500
export class MyModule {
472501
}
@@ -504,7 +533,10 @@ TestCmp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-
504533
TestCmp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: TestCmp, selector: "test-cmp", ngImport: i0, template: "<div *ngIf=\"show\">Hello</div>", isInline: true });
505534
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestCmp, decorators: [{
506535
type: Component,
507-
args: [{ selector: 'test-cmp', template: myTemplate }]
536+
args: [{
537+
selector: 'test-cmp', template: myTemplate,
538+
standalone: false
539+
}]
508540
}] });
509541

510542
/****************************************************************************************************
@@ -529,7 +561,10 @@ TestCmp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-
529561
TestCmp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: TestCmp, selector: "test-cmp", ngImport: i0, template: "<div *ngIf=\"show\">Hello!</div>", isInline: true });
530562
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestCmp, decorators: [{
531563
type: Component,
532-
args: [{ selector: 'test-cmp', template: myTemplate }]
564+
args: [{
565+
selector: 'test-cmp', template: myTemplate,
566+
standalone: false
567+
}]
533568
}] });
534569

535570
/****************************************************************************************************
@@ -554,7 +589,10 @@ TestCmp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-
554589
TestCmp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: TestCmp, selector: "test-cmp", ngImport: i0, template: "<div *ngIf=\"show\">Hello!</div>", isInline: true });
555590
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: TestCmp, decorators: [{
556591
type: Component,
557-
args: [{ selector: 'test-cmp', template: myTemplate }]
592+
args: [{
593+
selector: 'test-cmp', template: myTemplate,
594+
standalone: false
595+
}]
558596
}] });
559597

560598
/****************************************************************************************************
@@ -588,6 +626,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDE
588626
template: `
589627
<lib-dir></lib-dir>
590628
`,
629+
standalone: false
591630
}]
592631
}] });
593632
export class TestModule {

packages/compiler-cli/test/compliance/test_cases/r3_compiler_compliance/components_and_directives/content_projection/GOLDEN_PARTIAL.js

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ SimpleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
99
SimpleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: SimpleComponent, selector: "simple", ngImport: i0, template: '<div><ng-content></ng-content></div>', isInline: true });
1010
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: SimpleComponent, decorators: [{
1111
type: Component,
12-
args: [{ selector: 'simple', template: '<div><ng-content></ng-content></div>' }]
12+
args: [{
13+
selector: 'simple', template: '<div><ng-content></ng-content></div>',
14+
standalone: false
15+
}]
1316
}] });
1417
export class ComplexComponent {
1518
}
@@ -23,7 +26,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDE
2326
selector: 'complex',
2427
template: `
2528
<div id="first"><ng-content select="span[title=toFirst]"></ng-content></div>
26-
<div id="second"><ng-content SELECT="span[title=toSecond]"></ng-content></div>`
29+
<div id="second"><ng-content SELECT="span[title=toSecond]"></ng-content></div>`,
30+
standalone: false
2731
}]
2832
}] });
2933
export class MyApp {
@@ -32,7 +36,10 @@ MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PL
3236
MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, selector: "my-app", ngImport: i0, template: '<simple>content</simple> <complex></complex>', isInline: true, dependencies: [{ kind: "component", type: SimpleComponent, selector: "simple" }, { kind: "component", type: ComplexComponent, selector: "complex" }] });
3337
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{
3438
type: Component,
35-
args: [{ selector: 'my-app', template: '<simple>content</simple> <complex></complex>' }]
39+
args: [{
40+
selector: 'my-app', template: '<simple>content</simple> <complex></complex>',
41+
standalone: false
42+
}]
3643
}] });
3744
export class MyModule {
3845
}
@@ -87,6 +94,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDE
8794
<ng-content select="[spacer]"></ng-content>
8895
<ng-content></ng-content>
8996
`,
97+
standalone: false
9098
}]
9199
}] });
92100
class Module {
@@ -137,6 +145,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDE
137145
'*' selector: <ng-content></ng-content>
138146
</ng-template>
139147
`,
148+
standalone: false
140149
}]
141150
}] });
142151
class Module {
@@ -191,6 +200,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDE
191200
</ng-template>
192201
<ng-content select="[id=toMainAfter]"></ng-content>
193202
`,
203+
standalone: false
194204
}]
195205
}] });
196206
class Module {
@@ -219,15 +229,21 @@ SimpleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
219229
SimpleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: SimpleComponent, selector: "simple", ngImport: i0, template: '<div><ng-content select="[title]"></ng-content></div>', isInline: true });
220230
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: SimpleComponent, decorators: [{
221231
type: Component,
222-
args: [{ selector: 'simple', template: '<div><ng-content select="[title]"></ng-content></div>' }]
232+
args: [{
233+
selector: 'simple', template: '<div><ng-content select="[title]"></ng-content></div>',
234+
standalone: false
235+
}]
223236
}] });
224237
export class MyApp {
225238
}
226239
MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component });
227240
MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, selector: "my-app", ngImport: i0, template: '<simple><h1 ngProjectAs="[title]"></h1></simple>', isInline: true, dependencies: [{ kind: "component", type: SimpleComponent, selector: "simple" }] });
228241
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{
229242
type: Component,
230-
args: [{ selector: 'my-app', template: '<simple><h1 ngProjectAs="[title]"></h1></simple>' }]
243+
args: [{
244+
selector: 'my-app', template: '<simple><h1 ngProjectAs="[title]"></h1></simple>',
245+
standalone: false
246+
}]
231247
}] });
232248
export class MyModule {
233249
}
@@ -268,15 +284,21 @@ SimpleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
268284
SimpleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: SimpleComponent, selector: "simple", ngImport: i0, template: '<div><ng-content select="[title]"></ng-content></div>', isInline: true });
269285
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: SimpleComponent, decorators: [{
270286
type: Component,
271-
args: [{ selector: 'simple', template: '<div><ng-content select="[title]"></ng-content></div>' }]
287+
args: [{
288+
selector: 'simple', template: '<div><ng-content select="[title]"></ng-content></div>',
289+
standalone: false
290+
}]
272291
}] });
273292
export class MyApp {
274293
}
275294
MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, deps: [], target: i0.ɵɵFactoryTarget.Component });
276295
MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, selector: "my-app", ngImport: i0, template: '<simple><h1 ngProjectAs="[title],[header]"></h1></simple>', isInline: true, dependencies: [{ kind: "component", type: SimpleComponent, selector: "simple" }] });
277296
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{
278297
type: Component,
279-
args: [{ selector: 'my-app', template: '<simple><h1 ngProjectAs="[title],[header]"></h1></simple>' }]
298+
args: [{
299+
selector: 'my-app', template: '<simple><h1 ngProjectAs="[title],[header]"></h1></simple>',
300+
standalone: false
301+
}]
280302
}] });
281303
export class MyModule {
282304
}
@@ -320,7 +342,10 @@ MyApp.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PL
320342
MyApp.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyApp, selector: "my-app", ngImport: i0, template: '<div *ngIf="show" ngProjectAs=".someclass"></div>', isInline: true });
321343
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyApp, decorators: [{
322344
type: Component,
323-
args: [{ selector: 'my-app', template: '<div *ngIf="show" ngProjectAs=".someclass"></div>' }]
345+
args: [{
346+
selector: 'my-app', template: '<div *ngIf="show" ngProjectAs=".someclass"></div>',
347+
standalone: false
348+
}]
324349
}] });
325350

326351
/****************************************************************************************************
@@ -344,7 +369,10 @@ SimpleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
344369
SimpleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: SimpleComponent, selector: "simple", ngImport: i0, template: '<ng-content *ngIf="showContent"></ng-content>', isInline: true });
345370
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: SimpleComponent, decorators: [{
346371
type: Component,
347-
args: [{ selector: 'simple', template: '<ng-content *ngIf="showContent"></ng-content>' }]
372+
args: [{
373+
selector: 'simple', template: '<ng-content *ngIf="showContent"></ng-content>',
374+
standalone: false
375+
}]
348376
}] });
349377

350378
/****************************************************************************************************
@@ -377,7 +405,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDE
377405
<ng-content select="[card-title]"></ng-content>
378406
---
379407
<ng-content select="[card-content]"></ng-content>
380-
`
408+
`,
409+
standalone: false
381410
}]
382411
}] });
383412
class CardWithTitle {
@@ -398,7 +427,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDE
398427
<h1 ngProjectAs="[card-title]">Title</h1>
399428
<ng-content ngProjectAs="[card-content]"></ng-content>
400429
</card>
401-
`
430+
`,
431+
standalone: false
402432
}]
403433
}] });
404434
class App {
@@ -413,7 +443,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDE
413443
selector: 'app',
414444
template: `
415445
<card-with-title>content</card-with-title>
416-
`
446+
`,
447+
standalone: false
417448
}]
418449
}] });
419450
class Module {

0 commit comments

Comments
 (0)