refactor(core): Don't generate standalone: true for definitions (#58238)

The runtime default is now `standalone: true`.
`ɵɵdefineComponent`, `ɵɵdefineDirective` and `ɵɵdefinePipe` now set `standalone` as `true` by default in the definitions.

PR Close #58238
This commit is contained in:
Matthieu Riegler
2024-10-16 22:55:20 -06:00
committed by Alex Rickabaugh
parent 18ddf0de76
commit a10f7cfbc2
6 changed files with 17 additions and 11 deletions
@@ -60,9 +60,8 @@ export function compilePipeFromMetadata(metadata: R3PipeMetadata): R3CompiledExp
// e.g. `pure: true`
definitionMapValues.push({key: 'pure', value: o.literal(metadata.pure), quoted: false});
// TODO: standalone as default value (invert the condition)
if (metadata.isStandalone) {
definitionMapValues.push({key: 'standalone', value: o.literal(true), quoted: false});
if (metadata.isStandalone === false) {
definitionMapValues.push({key: 'standalone', value: o.literal(false), quoted: false});
}
const expression = o
@@ -93,8 +93,8 @@ function baseDirectiveFields(
definitionMap.set('exportAs', o.literalArr(meta.exportAs.map((e) => o.literal(e))));
}
if (meta.isStandalone) {
definitionMap.set('standalone', o.literal(true));
if (meta.isStandalone === false) {
definitionMap.set('standalone', o.literal(false));
}
if (meta.isSignal) {
definitionMap.set('signals', o.literal(true));