Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(compiler): output input flags as a literal (#55215)
Previously the input flags were being generated as a reference to an enum member for better readability and under the assumption that minifiers would inline the values. That doesn't appear to be the case so these changes switch to using the literal values instead. PR Close #55215
- Loading branch information
1 parent
493c192
commit 39624c6
Showing
20 changed files
with
85 additions
and
148 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
packages/compiler-cli/test/compliance/test_cases/model_inputs/mixed_model_types.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/compiler-cli/test/compliance/test_cases/model_inputs/model_component_definition.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/compiler-cli/test/compliance/test_cases/model_inputs/model_directive_definition.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ompliance/components_and_directives/lifecycle_hooks/lifecycle_hooks_lifecycle_comp_def.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...i/test/compliance/test_cases/r3_view_compiler_input_outputs/input_transform_definition.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
MyDirective.ɵdir = /*@__PURE__*/ $r3$.ɵɵdefineDirective({ | ||
… | ||
inputs: { | ||
functionDeclarationInput: [$r3$.ɵɵInputFlags.HasDecoratorInputTransform, "functionDeclarationInput", "functionDeclarationInput", toNumber], | ||
inlineFunctionInput: [$r3$.ɵɵInputFlags.HasDecoratorInputTransform, "inlineFunctionInput", "inlineFunctionInput", (value, _) => value ? 1 : 0] | ||
functionDeclarationInput: [2, "functionDeclarationInput", "functionDeclarationInput", toNumber], | ||
inlineFunctionInput: [2, "inlineFunctionInput", "inlineFunctionInput", (value, _) => value ? 1 : 0] | ||
}, | ||
features: [$r3$.ɵɵInputTransformsFeature]… | ||
}); |
8 changes: 4 additions & 4 deletions
8
...ages/compiler-cli/test/compliance/test_cases/signal_inputs/complex_transform_functions.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/compiler-cli/test/compliance/test_cases/signal_inputs/input_component_definition.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/compiler-cli/test/compliance/test_cases/signal_inputs/input_directive_definition.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
packages/compiler-cli/test/compliance/test_cases/signal_inputs/mixed_input_types.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
TestDir.ɵdir = /* @__PURE__ */ $r3$.ɵɵdefineDirective({ | ||
… | ||
inputs: { | ||
counter: [$r3$.ɵɵInputFlags.SignalBased, "counter"], | ||
signalWithTransform: [$r3$.ɵɵInputFlags.SignalBased, "signalWithTransform"], | ||
signalWithTransformAndAlias: [$r3$.ɵɵInputFlags.SignalBased, "publicNameSignal", "signalWithTransformAndAlias"], | ||
counter: [1, "counter"], | ||
signalWithTransform: [1, "signalWithTransform"], | ||
signalWithTransformAndAlias: [1, "publicNameSignal", "signalWithTransformAndAlias"], | ||
decoratorInput: "decoratorInput", | ||
decoratorInputWithAlias: [$r3$.ɵɵInputFlags.None, "publicNameDecorator", "decoratorInputWithAlias"], | ||
decoratorInputWithTransformAndAlias: [$r3$.ɵɵInputFlags.HasDecoratorInputTransform, "publicNameDecorator2", "decoratorInputWithTransformAndAlias", convertToBoolean] | ||
decoratorInputWithAlias: [0, "publicNameDecorator", "decoratorInputWithAlias"], | ||
decoratorInputWithTransformAndAlias: [2, "publicNameDecorator2", "decoratorInputWithTransformAndAlias", convertToBoolean] | ||
}, | ||
… | ||
}); |
2 changes: 1 addition & 1 deletion
2
packages/compiler-cli/test/compliance/test_cases/signal_inputs/transform_not_captured.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.