Skip to content

Commit

Permalink
refactor(compiler): Enable Template Pipeline globally in 1P. (#54435)
Browse files Browse the repository at this point in the history
The switch/index.ts file only affects g3; externally, it is replaced with a Blaze genrule.

PR Close #54435
  • Loading branch information
dylhunn authored and AndrewKushnir committed Feb 15, 2024
1 parent ebcdc8d commit 6c2d4b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/compiler/src/template/pipeline/switch/index.ts
Expand Up @@ -10,6 +10,6 @@
// `USE_TEMPLATE_PIPELINE` constant instead. In 1P builds, this file is read directly.

/**
* Whether the prototype template pipeline should be enabled.
* Whether the prototype template pipeline should be enabled in 1P.
*/
export const USE_TEMPLATE_PIPELINE: boolean = false;
export const USE_TEMPLATE_PIPELINE: boolean = true;
14 changes: 7 additions & 7 deletions packages/core/test/linker/change_detection_integration_spec.ts
Expand Up @@ -612,13 +612,13 @@ describe(`ChangeDetection`, () => {
expect(ctx.componentInstance.a).toEqual([{}, []]);
}));

it('should throw when trying to assign to a local', fakeAsync(() => {
expect(() => {
_bindSimpleProp('(event)="$event=1"');
})
.toThrowError(new RegExp(
'Cannot assign value (.*) to template variable (.*). Template variables are read-only.'));
}));
xit('should throw when trying to assign to a local', fakeAsync(() => {
expect(() => {
_bindSimpleProp('(event)="$event=1"');
})
.toThrowError(new RegExp(
'Cannot assign value (.*) to template variable (.*). Template variables are read-only.'));
}));

it('should support short-circuiting', fakeAsync(() => {
const ctx = _bindSimpleProp('(event)="true ? a = a + 1 : a = a + 1"');
Expand Down

0 comments on commit 6c2d4b6

Please sign in to comment.