avancement planning

This commit is contained in:
2026-05-26 11:58:39 +02:00
parent 619a2b240a
commit 150b97cd2e
4892 changed files with 99214 additions and 429382 deletions
+8 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
@@ -17,6 +17,8 @@ import { OutputRef, OutputRefSubscription, DestroyRef, Signal, WritableSignal, V
* <my-comp (valueChange)="processNewValue($event)" />
* ```
*
* @see [Custom events with outputs](guide/components/outputs)
*
* @publicAPI
*/
declare class OutputEmitterRef<T> implements OutputRef<T> {
@@ -34,6 +36,8 @@ declare function getOutputDestroyRef(ref: OutputRef<unknown>): DestroyRef | unde
/**
* Options for declaring an output.
*
* @see [Customizing output names](guide/components/outputs#customizing-output-names)
*
* @publicApi 19.0
*/
interface OutputOptions {
@@ -78,6 +82,9 @@ interface OutputOptions {
* this.nameChange.emit(newName);
* }
* ```
*
* @see [Custom events with outputs](guide/components/outputs#customizing-output-names)
*
* @initializerApiFunction {"showTypesInSignaturePreview": true}
* @publicApi 19.0
*/
+11 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
@@ -80,6 +80,7 @@ interface CreateSignalOptions<T> {
}
/**
* Create a `Signal` that can be set or updated directly.
* @see [Angular Signals](guide/signals)
*/
declare function signal<T>(initialValue: T, options?: CreateSignalOptions<T>): WritableSignal<T>;
@@ -90,6 +91,8 @@ declare function signal<T>(initialValue: T, options?: CreateSignalOptions<T>): W
* Note: Angular will automatically clean up subscriptions
* when the directive/component of the output is destroyed.
*
* @see [Subscribing to outputs programmatically](guide/components/outputs#subscribing-to-outputs-programmatically)
*
* @publicAPI
*/
interface OutputRefSubscription {
@@ -99,6 +102,7 @@ interface OutputRefSubscription {
* A reference to an Angular output.
*
* @publicAPI
* @see [Subscribing to outputs programmatically](guide/components/outputs#subscribing-to-outputs-programmatically)
*/
interface OutputRef<T> {
/**
@@ -211,6 +215,9 @@ type Writable<T> = {
*
* {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
*
*
* @see [What is an InjectionToken?](guide/di/defining-dependency-providers#what-is-an-injectiontoken)
*
* @publicApi
*/
declare class InjectionToken<T> {
@@ -674,6 +681,8 @@ type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToken<T>;
*
* {@example core/di/ts/injector_spec.ts region='injectInjector'}
*
* @see [Types of injector hierarchies](guide/di/hierarchical-dependency-injection#types-of-injector-hierarchies)
*
* @publicApi
*/
declare abstract class Injector {
@@ -840,6 +849,7 @@ declare global {
* @experimental
*
* @returns a function that can be invoked to stop sending profiling data.
* @see [Profiling with the Chrome DevTools](best-practices/profiling-with-chrome-devtools#recording-a-profile)
*/
declare function enableProfiling(): () => void;
+33 -2
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
@@ -44,6 +44,8 @@ declare const ANIMATIONS_DISABLED: InjectionToken<boolean>;
* The event type for when `animate.enter` and `animate.leave` are used with function
* callbacks.
*
* @see [Animating your applications with animate.enter and animate.leave](guide/animations)
*
* @publicApi 20.2
*/
type AnimationCallbackEvent = {
@@ -58,6 +60,7 @@ type AnimationCallbackEvent = {
* for when stylesheets are pruned.
*
* @publicApi 20.2
* @see [Animating your applications with animate.enter and animate.leave](guide/animations)
*/
declare const MAX_ANIMATION_TIMEOUT: InjectionToken<number>;
/**
@@ -2072,6 +2075,8 @@ declare const INJECTOR_SCOPE: InjectionToken<InjectorScope | null>;
* An `Injector` that's part of the environment injector hierarchy, which exists outside of the
* component tree.
*
* @see [Types of injector hierarchies](guide/di/hierarchical-dependency-injection#types-of-injector-hierarchies)
*
* @publicApi
*/
declare abstract class EnvironmentInjector implements Injector {
@@ -3133,12 +3138,16 @@ interface CreateEffectOptions {
* before the next effect run. The cleanup function makes it possible to "cancel" any work that the
* previous effect run might have started.
*
* @see [Effect cleanup functions](guide/signals#effect-cleanup-functions)
*
* @publicApi 20.0
*/
type EffectCleanupFn = () => void;
/**
* A callback passed to the effect function that makes it possible to register cleanup logic.
*
* @see [Effect cleanup functions](guide/signals#effect-cleanup-functions)
*
* @publicApi 20.0
*/
type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;
@@ -3158,6 +3167,8 @@ type EffectCleanupRegisterFn = (cleanupFn: EffectCleanupFn) => void;
*
* `effect()` must be run in injection context, unless the `injector` option is manually specified.
*
* @see [Effects](guide/signals#effects)
*
* @publicApi 20.0
*/
declare function effect(effectFn: (onCleanup: EffectCleanupRegisterFn) => void, options?: CreateEffectOptions): EffectRef;
@@ -4718,6 +4729,12 @@ interface DirectiveDecorator {
/**
* Directive decorator and metadata.
*
* @see [Built-in directives](guide/directives)
* @see [Including inputs and outputs](guide/directives/directive-composition-api#including-inputs-and-outputs)
* @see [Assigning a reference to an Angular directive](guide/templates/variables#assigning-a-reference-to-an-angular-directive)
* @see [Referencing component children with queries](guide/components/queries)
* @see [Binding to the host element](guide/components/host-elements#binding-to-the-host-element)
* @see [Host directive semantics](guide/directives/directive-composition-api#host-directive-semantics)
* @Annotation
* @publicApi
*/
@@ -5119,6 +5136,11 @@ interface ComponentDecorator {
/**
* Supplies configuration metadata for an Angular component.
*
* @see [Anatomy of a component](guide/components)
* @see [ChangeDetectionStrategy](guide/components/advanced-configuration#changedetectionstrategy)
* @see [Using the viewProviders array](guide/di/hierarchical-dependency-injection#using-the-viewproviders-array)
* @see [Style scoping](guide/components/styling#style-scoping)
*
* @publicApi
*/
interface Component extends Directive {
@@ -5274,7 +5296,7 @@ interface PipeDecorator {
* to a template. To make it a member of an NgModule,
* list it in the `declarations` field of the `NgModule` metadata.
*
* @see [Style Guide: Pipe Names](style-guide#02-09)
* @see [Pipes](/guide/templates/pipes)
*
*/
(obj: Pipe): TypeDecorator;
@@ -5757,6 +5779,7 @@ interface DirectiveWithBindings<T> {
* bindings: [inputBinding('disabled', isDisabled)]
* });
* ```
* @see [Binding inputs, outputs and setting host directives at creation](guide/components/programmatic-rendering#binding-inputs-outputs-and-setting-host-directives-at-creation)
*/
declare function inputBinding(publicName: string, value: () => unknown): Binding;
/**
@@ -5779,6 +5802,7 @@ declare function inputBinding(publicName: string, value: () => unknown): Binding
* ],
* });
* ```
* @see [Binding inputs, outputs and setting host directives at creation](guide/components/programmatic-rendering#binding-inputs-outputs-and-setting-host-directives-at-creation)
*/
declare function outputBinding<T>(eventName: string, listener: (event: T) => unknown): Binding;
/**
@@ -5800,6 +5824,7 @@ declare function outputBinding<T>(eventName: string, listener: (event: T) => unk
* ],
* });
* ```
* @see [Binding inputs, outputs and setting host directives at creation](guide/components/programmatic-rendering#binding-inputs-outputs-and-setting-host-directives-at-creation)
*/
declare function twoWayBinding(publicName: string, value: WritableSignal<unknown>): Binding;
@@ -5813,6 +5838,8 @@ declare function twoWayBinding(publicName: string, value: WritableSignal<unknown
* XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the
* [Security Guide](https://g.co/ng/security).
*
* @see [Using DOM APIs](guide/components/dom-apis)
*
* @publicApi
*/
declare class ElementRef<T = any> {
@@ -6145,6 +6172,8 @@ declare abstract class ComponentFactory<C> {
* <zippy (open)="onOpen($event)" (close)="onClose($event)"></zippy>
* ```
*
* @see [Declaring outputs with the @Output decorator](guide/components/outputs#declaring-outputs-with-the-output-decorator)
*
* @publicApi
*/
interface EventEmitter<T> extends Subject<T>, OutputRef<T> {
@@ -6261,6 +6290,8 @@ declare const EventEmitter: {
* }
* ```
*
* @see [Resolving zone pollution](best-practices/zone-pollution#run-tasks-outside-ngzone)
*
* @publicApi
*/
declare class NgZone {
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"attribute.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/attribute.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport const Attribute = {\n /**\n * The jsaction attribute defines a mapping of a DOM event to a\n * generic event (aka jsaction), to which the actual event handlers\n * that implement the behavior of the application are bound. The\n * value is a semicolon separated list of colon separated pairs of\n * an optional DOM event name and a jsaction name. If the optional\n * DOM event name is omitted, 'click' is assumed. The jsaction names\n * are dot separated pairs of a namespace and a simple jsaction\n * name.\n *\n * See grammar in README.md for expected syntax in the attribute value.\n */\n JSACTION: 'jsaction' as const,\n};\n"],"names":[],"mappings":";;;;;;AAQa,MAAA,SAAS,GAAG;AACvB;;;;;;;;;;;AAWG;AACH,IAAA,QAAQ,EAAE,UAAmB;;;;;"}
{"version":3,"file":"attribute.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/event-dispatch/src/attribute.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport const Attribute = {\n /**\n * The jsaction attribute defines a mapping of a DOM event to a\n * generic event (aka jsaction), to which the actual event handlers\n * that implement the behavior of the application are bound. The\n * value is a semicolon separated list of colon separated pairs of\n * an optional DOM event name and a jsaction name. If the optional\n * DOM event name is omitted, 'click' is assumed. The jsaction names\n * are dot separated pairs of a namespace and a simple jsaction\n * name.\n *\n * See grammar in README.md for expected syntax in the attribute value.\n */\n JSACTION: 'jsaction' as const,\n};\n"],"names":[],"mappings":";;;;;;AAQa,MAAA,SAAS,GAAG;AACvB;;;;;;;;;;;AAWG;AACH,IAAA,QAAQ,EAAE,UAAmB;;;;;"}
+30 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+582 -503
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"not_found.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/di/src/injector.ts","../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/di/src/not_found.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Constructor, InjectionToken} from './injection_token';\nimport {NotFound, NOT_FOUND} from './not_found';\n\nexport interface Injector {\n retrieve<T>(token: InjectionToken<T>, options?: unknown): T | NotFound;\n}\n\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector: Injector | undefined | null = undefined;\n\nexport function getCurrentInjector(): Injector | undefined | null {\n return _currentInjector;\n}\n\nexport function setCurrentInjector(\n injector: Injector | null | undefined,\n): Injector | undefined | null {\n const former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\n\nexport function inject<T>(token: InjectionToken<T> | Constructor<T>): T;\nexport function inject<T>(\n token: InjectionToken<T> | Constructor<T>,\n options?: unknown,\n): T | NotFound {\n const currentInjector = getCurrentInjector();\n if (!currentInjector) {\n throw new Error('Current injector is not set.');\n }\n if (!(token as InjectionToken<T>).ɵprov) {\n throw new Error('Token is not an injectable');\n }\n return currentInjector.retrieve(token as InjectionToken<T>, options);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Value returned if the key-value pair couldn't be found in the context\n * hierarchy.\n */\nexport const NOT_FOUND: unique symbol = Symbol('NotFound');\n\n/**\n * Error thrown when the key-value pair couldn't be found in the context\n * hierarchy. Context can be attached below.\n */\nexport class NotFoundError extends Error {\n override readonly name: string = 'ɵNotFound';\n constructor(message: string) {\n super(message);\n }\n}\n\n/**\n * Type guard for checking if an unknown value is a NotFound.\n */\nexport function isNotFound(e: unknown): e is NotFound {\n return e === NOT_FOUND || (e as NotFoundError)?.name === 'ɵNotFound';\n}\n\n/**\n * Type union of NotFound and NotFoundError.\n */\nexport type NotFound = typeof NOT_FOUND | NotFoundError;\n"],"names":[],"mappings":";;;;;;AAeA;;;;;AAKG;AACH,IAAI,gBAAgB,GAAgC,SAAS;SAE7C,kBAAkB,GAAA;AAChC,IAAA,OAAO,gBAAgB;AACzB;AAEM,SAAU,kBAAkB,CAChC,QAAqC,EAAA;IAErC,MAAM,MAAM,GAAG,gBAAgB;IAC/B,gBAAgB,GAAG,QAAQ;AAC3B,IAAA,OAAO,MAAM;AACf;AAGgB,SAAA,MAAM,CACpB,KAAyC,EACzC,OAAiB,EAAA;AAEjB,IAAA,MAAM,eAAe,GAAG,kBAAkB,EAAE;IAC5C,IAAI,CAAC,eAAe,EAAE;AACpB,QAAA,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC;;AAEjD,IAAA,IAAI,CAAE,KAA2B,CAAC,KAAK,EAAE;AACvC,QAAA,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC;;IAE/C,OAAO,eAAe,CAAC,QAAQ,CAAC,KAA0B,EAAE,OAAO,CAAC;AACtE;;ACxCA;;;AAGG;MACU,SAAS,GAAkB,MAAM,CAAC,UAAU;AAEzD;;;AAGG;AACG,MAAO,aAAc,SAAQ,KAAK,CAAA;IACpB,IAAI,GAAW,WAAW;AAC5C,IAAA,WAAA,CAAY,OAAe,EAAA;QACzB,KAAK,CAAC,OAAO,CAAC;;AAEjB;AAED;;AAEG;AACG,SAAU,UAAU,CAAC,CAAU,EAAA;IACnC,OAAO,CAAC,KAAK,SAAS,IAAK,CAAmB,EAAE,IAAI,KAAK,WAAW;AACtE;;;;"}
{"version":3,"file":"not_found.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/di/src/injector.ts","../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/di/src/not_found.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Constructor, InjectionToken} from './injection_token';\nimport {NotFound, NOT_FOUND} from './not_found';\n\nexport interface Injector {\n retrieve<T>(token: InjectionToken<T>, options?: unknown): T | NotFound;\n}\n\n/**\n * Current injector value used by `inject`.\n * - `undefined`: it is an error to call `inject`\n * - `null`: `inject` can be called but there is no injector (limp-mode).\n * - Injector instance: Use the injector for resolution.\n */\nlet _currentInjector: Injector | undefined | null = undefined;\n\nexport function getCurrentInjector(): Injector | undefined | null {\n return _currentInjector;\n}\n\nexport function setCurrentInjector(\n injector: Injector | null | undefined,\n): Injector | undefined | null {\n const former = _currentInjector;\n _currentInjector = injector;\n return former;\n}\n\nexport function inject<T>(token: InjectionToken<T> | Constructor<T>): T;\nexport function inject<T>(\n token: InjectionToken<T> | Constructor<T>,\n options?: unknown,\n): T | NotFound {\n const currentInjector = getCurrentInjector();\n if (!currentInjector) {\n throw new Error('Current injector is not set.');\n }\n if (!(token as InjectionToken<T>).ɵprov) {\n throw new Error('Token is not an injectable');\n }\n return currentInjector.retrieve(token as InjectionToken<T>, options);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * Value returned if the key-value pair couldn't be found in the context\n * hierarchy.\n */\nexport const NOT_FOUND: unique symbol = Symbol('NotFound');\n\n/**\n * Error thrown when the key-value pair couldn't be found in the context\n * hierarchy. Context can be attached below.\n */\nexport class NotFoundError extends Error {\n override readonly name: string = 'ɵNotFound';\n constructor(message: string) {\n super(message);\n }\n}\n\n/**\n * Type guard for checking if an unknown value is a NotFound.\n */\nexport function isNotFound(e: unknown): e is NotFound {\n return e === NOT_FOUND || (e as NotFoundError)?.name === 'ɵNotFound';\n}\n\n/**\n * Type union of NotFound and NotFoundError.\n */\nexport type NotFound = typeof NOT_FOUND | NotFoundError;\n"],"names":[],"mappings":";;;;;;AAeA;;;;;AAKG;AACH,IAAI,gBAAgB,GAAgC,SAAS;SAE7C,kBAAkB,GAAA;AAChC,IAAA,OAAO,gBAAgB;AACzB;AAEM,SAAU,kBAAkB,CAChC,QAAqC,EAAA;IAErC,MAAM,MAAM,GAAG,gBAAgB;IAC/B,gBAAgB,GAAG,QAAQ;AAC3B,IAAA,OAAO,MAAM;AACf;AAGgB,SAAA,MAAM,CACpB,KAAyC,EACzC,OAAiB,EAAA;AAEjB,IAAA,MAAM,eAAe,GAAG,kBAAkB,EAAE;IAC5C,IAAI,CAAC,eAAe,EAAE;AACpB,QAAA,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC;;AAEjD,IAAA,IAAI,CAAE,KAA2B,CAAC,KAAK,EAAE;AACvC,QAAA,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC;;IAE/C,OAAO,eAAe,CAAC,QAAQ,CAAC,KAA0B,EAAE,OAAO,CAAC;AACtE;;ACxCA;;;AAGG;MACU,SAAS,GAAkB,MAAM,CAAC,UAAU;AAEzD;;;AAGG;AACG,MAAO,aAAc,SAAQ,KAAK,CAAA;IACpB,IAAI,GAAW,WAAW;AAC5C,IAAA,WAAA,CAAY,OAAe,EAAA;QACzB,KAAK,CAAC,OAAO,CAAC;;AAEjB;AAED;;AAEG;AACG,SAAU,UAAU,CAAC,CAAU,EAAA;IACnC,OAAO,CAAC,KAAK,SAAS,IAAK,CAAmB,EAAE,IAAI,KAAK,WAAW;AACtE;;;;"}
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"di.mjs","sources":["../../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/di/src/injection_token.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from './type';\n/**\n * Information about how a type or `InjectionToken` interfaces with the DI\n * system. This describes:\n *\n * 1. *How* the type is provided\n * The declaration must specify only one of the following:\n * - A `value` which is a predefined instance of the type.\n * - A `factory` which defines how to create the given type `T`, possibly\n * requesting injection of other types if necessary.\n * - Neither, in which case the type is expected to already be present in the\n * injector hierarchy. This is used for internal use cases.\n *\n * 2. *Where* the type is stored (if it is stored)\n * - The `providedIn` parameter specifies which injector the type belongs to.\n * - The `token` is used as the key to store the type in the injector.\n */\nexport interface ɵɵInjectableDeclaration<T> {\n /**\n * Specifies that the given type belongs to a particular `Injector`,\n * `NgModule`, or a special scope (e.g. `'root'`).\n *\n * `any` is deprecated and will be removed soon.\n *\n * A value of `null` indicates that the injectable does not belong to any\n * scope, and won't be stored in any injector. For declarations with a\n * factory, this will create a new instance of the type each time it is\n * requested.\n */\n providedIn: Type<any> | 'root' | 'platform' | 'any' | null;\n\n /**\n * The token to which this definition belongs.\n *\n * Note that this may not be the same as the type that the `factory` will create.\n */\n token: unknown;\n\n /**\n * Factory method to execute to create an instance of the injectable.\n */\n factory?: (t?: Type<any>) => T;\n\n /**\n * In a case of no explicit injector, a location where the instance of the injectable is stored.\n */\n value?: T;\n}\n\n/**\n * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.\n *\n * `InjectableType`s contain their own Dependency Injection metadata and are usable in an\n * `InjectorDef`-based `StaticInjector`.\n *\n * @publicApi\n */\nexport interface InjectionToken<T> {\n ɵprov: ɵɵInjectableDeclaration<T>;\n}\n\nexport function defineInjectable<T>(opts: {\n token: unknown;\n providedIn?: Type<any> | 'root' | 'platform' | 'any' | 'environment' | null;\n factory: () => T;\n}): ɵɵInjectableDeclaration<T> {\n return {\n token: opts.token,\n providedIn: (opts.providedIn as any) || null,\n factory: opts.factory,\n value: undefined,\n } as ɵɵInjectableDeclaration<T>;\n}\n\nexport type Constructor<T> = Function & {prototype: T};\n\nexport function registerInjectable<T>(\n ctor: unknown,\n declaration: ɵɵInjectableDeclaration<T>,\n): InjectionToken<T> {\n (ctor as unknown as InjectionToken<T>).ɵprov = declaration;\n return ctor as Constructor<T> & InjectionToken<T>;\n}\n"],"names":[],"mappings":";;;;;;;;AAqEM,SAAU,gBAAgB,CAAI,IAInC,EAAA;IACC,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,KAAK;AACjB,QAAA,UAAU,EAAG,IAAI,CAAC,UAAkB,IAAI,IAAI;QAC5C,OAAO,EAAE,IAAI,CAAC,OAAO;AACrB,QAAA,KAAK,EAAE,SAAS;KACa;AACjC;AAIgB,SAAA,kBAAkB,CAChC,IAAa,EACb,WAAuC,EAAA;AAEtC,IAAA,IAAqC,CAAC,KAAK,GAAG,WAAW;AAC1D,IAAA,OAAO,IAA0C;AACnD;;;;"}
{"version":3,"file":"di.mjs","sources":["../../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/di/src/injection_token.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Type} from './type';\n/**\n * Information about how a type or `InjectionToken` interfaces with the DI\n * system. This describes:\n *\n * 1. *How* the type is provided\n * The declaration must specify only one of the following:\n * - A `value` which is a predefined instance of the type.\n * - A `factory` which defines how to create the given type `T`, possibly\n * requesting injection of other types if necessary.\n * - Neither, in which case the type is expected to already be present in the\n * injector hierarchy. This is used for internal use cases.\n *\n * 2. *Where* the type is stored (if it is stored)\n * - The `providedIn` parameter specifies which injector the type belongs to.\n * - The `token` is used as the key to store the type in the injector.\n */\nexport interface ɵɵInjectableDeclaration<T> {\n /**\n * Specifies that the given type belongs to a particular `Injector`,\n * `NgModule`, or a special scope (e.g. `'root'`).\n *\n * `any` is deprecated and will be removed soon.\n *\n * A value of `null` indicates that the injectable does not belong to any\n * scope, and won't be stored in any injector. For declarations with a\n * factory, this will create a new instance of the type each time it is\n * requested.\n */\n providedIn: Type<any> | 'root' | 'platform' | 'any' | null;\n\n /**\n * The token to which this definition belongs.\n *\n * Note that this may not be the same as the type that the `factory` will create.\n */\n token: unknown;\n\n /**\n * Factory method to execute to create an instance of the injectable.\n */\n factory?: (t?: Type<any>) => T;\n\n /**\n * In a case of no explicit injector, a location where the instance of the injectable is stored.\n */\n value?: T;\n}\n\n/**\n * A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.\n *\n * `InjectableType`s contain their own Dependency Injection metadata and are usable in an\n * `InjectorDef`-based `StaticInjector`.\n *\n * @publicApi\n */\nexport interface InjectionToken<T> {\n ɵprov: ɵɵInjectableDeclaration<T>;\n}\n\nexport function defineInjectable<T>(opts: {\n token: unknown;\n providedIn?: Type<any> | 'root' | 'platform' | 'any' | 'environment' | null;\n factory: () => T;\n}): ɵɵInjectableDeclaration<T> {\n return {\n token: opts.token,\n providedIn: (opts.providedIn as any) || null,\n factory: opts.factory,\n value: undefined,\n } as ɵɵInjectableDeclaration<T>;\n}\n\nexport type Constructor<T> = Function & {prototype: T};\n\nexport function registerInjectable<T>(\n ctor: unknown,\n declaration: ɵɵInjectableDeclaration<T>,\n): InjectionToken<T> {\n (ctor as unknown as InjectionToken<T>).ɵprov = declaration;\n return ctor as Constructor<T> & InjectionToken<T>;\n}\n"],"names":[],"mappings":";;;;;;;;AAqEM,SAAU,gBAAgB,CAAI,IAInC,EAAA;IACC,OAAO;QACL,KAAK,EAAE,IAAI,CAAC,KAAK;AACjB,QAAA,UAAU,EAAG,IAAI,CAAC,UAAkB,IAAI,IAAI;QAC5C,OAAO,EAAE,IAAI,CAAC,OAAO;AACrB,QAAA,KAAK,EAAE,SAAS;KACa;AACjC;AAIgB,SAAA,kBAAkB,CAChC,IAAa,EACb,WAAuC,EAAA;AAEtC,IAAA,IAAqC,CAAC,KAAK,GAAG,WAAW;AAC1D,IAAA,OAAO,IAA0C;AACnD;;;;"}
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
File diff suppressed because one or more lines are too long
+10 -15
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
@@ -19,6 +19,8 @@ import { untracked as untracked$1, BASE_EFFECT_NODE, runEffect, createLinkedSign
* <my-comp (valueChange)="processNewValue($event)" />
* ```
*
* @see [Custom events with outputs](guide/components/outputs)
*
* @publicAPI
*/
class OutputEmitterRef {
@@ -85,6 +87,7 @@ function getOutputDestroyRef(ref) {
/**
* Execute an arbitrary function in a non-reactive (non-tracking) context. The executed function
* can, optionally, return a value.
* @see [Reading without tracking dependencies](guide/signals#reading-without-tracking-dependencies)
*/
function untracked(nonReactiveReadsFn) {
return untracked$1(nonReactiveReadsFn);
@@ -92,6 +95,7 @@ function untracked(nonReactiveReadsFn) {
/**
* Create a computed `Signal` which derives a reactive value from an expression.
* @see [Computed signals](guide/signals#computed-signals)
*/
function computed(computation, options) {
const getter = createComputed(computation, options?.equal);
@@ -127,6 +131,8 @@ class EffectRefImpl {
*
* `effect()` must be run in injection context, unless the `injector` option is manually specified.
*
* @see [Effects](guide/signals#effects)
*
* @publicApi 20.0
*/
function effect(effectFn, options) {
@@ -294,19 +300,13 @@ function upgradeLinkedSignalGetter(getter, debugName) {
return upgradedGetter;
}
/**
* Whether a `Resource.value()` should throw an error when the resource is in the error state.
*
* This internal flag is being used to gradually roll out this behavior.
*/
let RESOURCE_VALUE_THROWS_ERRORS_DEFAULT = true;
function resource(options) {
if (ngDevMode && !options?.injector) {
assertInInjectionContext(resource);
}
const oldNameForParams = options.request;
const params = (options.params ?? oldNameForParams ?? (() => null));
return new ResourceImpl(params, getLoader(options), options.defaultValue, options.equal ? wrapEqualityFn(options.equal) : undefined, options.injector ?? inject(Injector), RESOURCE_VALUE_THROWS_ERRORS_DEFAULT);
return new ResourceImpl(params, getLoader(options), options.defaultValue, options.equal ? wrapEqualityFn(options.equal) : undefined, options.injector ?? inject(Injector));
}
/**
* Base class which implements `.value` as a `WritableSignal` by delegating `.set` and `.update`.
@@ -361,7 +361,7 @@ class ResourceImpl extends BaseWritableResource {
resolvePendingTask = undefined;
destroyed = false;
unregisterOnDestroy;
constructor(request, loaderFn, defaultValue, equal, injector, throwErrorsFromValue = RESOURCE_VALUE_THROWS_ERRORS_DEFAULT) {
constructor(request, loaderFn, defaultValue, equal, injector) {
super(
// Feed a computed signal for the value to `BaseWritableResource`, which will upgrade it to a
// `WritableSignal` that delegates to `ResourceImpl.set`.
@@ -375,12 +375,7 @@ class ResourceImpl extends BaseWritableResource {
return defaultValue;
}
if (!isResolved(streamValue)) {
if (throwErrorsFromValue) {
throw new ResourceValueError(this.error());
}
else {
return defaultValue;
}
throw new ResourceValueError(this.error());
}
return streamValue.value;
}, { equal }));
File diff suppressed because one or more lines are too long
+22 -3
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
@@ -31,7 +31,7 @@ class Version {
/**
* @publicApi
*/
const VERSION = /* @__PURE__ */ new Version('20.3.11');
const VERSION = /* @__PURE__ */ new Version('20.3.21');
/**
* Base URL for the error details page.
@@ -267,7 +267,7 @@ const __forward_ref__ = getClosureSafeProperty({ __forward_ref__: getClosureSafe
* hideParent = input.required<boolean>();
* }
* ```
*
* @see [Resolve circular dependencies with a forward reference](guide/di/di-in-action#resolve-circular-dependencies-with-a-forward-reference)
* @publicApi
*/
function forwardRef(forwardRefFn) {
@@ -555,6 +555,9 @@ const NG_INJ_DEF = getClosureSafeProperty({ ɵinj: getClosureSafeProperty });
*
* {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
*
*
* @see [What is an InjectionToken?](guide/di/defining-dependency-providers#what-is-an-injectiontoken)
*
* @publicApi
*/
class InjectionToken {
@@ -1136,6 +1139,8 @@ Please check that 1) the type for the parameter at index ${index} is correct and
* }
* ```
*
* @see [Injecting dependencies with inject()](guide/di#injecting-dependencies-with-inject)
*
* @publicApi
*/
function inject(token, options) {
@@ -1875,6 +1880,8 @@ function getNullInjector() {
* An `Injector` that's part of the environment injector hierarchy, which exists outside of the
* component tree.
*
* @see [Types of injector hierarchies](guide/di/hierarchical-dependency-injection#types-of-injector-hierarchies)
*
* @publicApi
*/
class EnvironmentInjector {
@@ -2356,6 +2363,8 @@ function forEachSingleProvider(providers, fn) {
* from the given `Injector`. Note that `inject` is only usable synchronously, and cannot be used in
* any asynchronous callbacks or after any `await` points.
*
* @see [Run within an injection context](guide/di/dependency-injection-context#run-within-an-injection-context)
*
* @param injector the injector which will satisfy calls to [`inject`](api/core/inject) while `fn`
* is executing
* @param fn the closure to be run in the context of `injector`
@@ -3504,6 +3513,8 @@ function createInjectorWithoutInjectorInstances(defType, parent = null, addition
*
* {@example core/di/ts/injector_spec.ts region='injectInjector'}
*
* @see [Types of injector hierarchies](guide/di/hierarchical-dependency-injection#types-of-injector-hierarchies)
*
* @publicApi
*/
class Injector {
@@ -3536,6 +3547,8 @@ class Injector {
* In a browser and SSR this is the DOM Document.
* When using SSR, that document is created by [Domino](https://github.com/angular/domino).
*
* @see [Accessing Document via DI](guide/ssr#accessing-document-via-di)
*
* @publicApi
*/
const DOCUMENT = new InjectionToken(ngDevMode ? 'DocumentToken' : '');
@@ -3701,6 +3714,8 @@ const globalErrorListeners = new InjectionToken(ngDevMode ? 'GlobalErrorListener
*
* The listeners added are for the window's 'unhandledrejection' and 'error' events.
*
* @see [Global error listeners](best-practices/error-handling#global-error-listeners)
*
* @publicApi
*/
function provideBrowserGlobalErrorListeners() {
@@ -3729,6 +3744,7 @@ function ɵunwrapWritableSignal(value) {
}
/**
* Create a `Signal` that can be set or updated directly.
* @see [Angular Signals](guide/signals)
*/
function signal(initialValue, options) {
const [get, set, update] = createSignal(initialValue, options?.equal);
@@ -3889,6 +3905,9 @@ class PendingTasksInternal {
* taskCleanup();
* ```
*
*
* @see [PendingTasks for Server Side Rendering (SSR)](guide/zoneless#pendingtasks-for-server-side-rendering-ssr)
*
* @publicApi 20.0
*/
class PendingTasks {
File diff suppressed because one or more lines are too long
+11 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
@@ -22,6 +22,8 @@ import './effect.mjs';
* passed explicitly to use `takeUntilDestroyed` outside of an [injection
* context](guide/di/dependency-injection-context). Otherwise, the current `DestroyRef` is injected.
*
* @see [Unsubscribing with takeUntilDestroyed](ecosystem/rxjs-interop/take-until-destroyed)
*
* @publicApi 19.0
*/
function takeUntilDestroyed(destroyRef) {
@@ -94,6 +96,7 @@ class OutputFromObservableRef {
* nameChange = outputFromObservable(this.nameChange$);
* }
* ```
* @see [RxJS interop with component and directive outputs](ecosystem/rxjs-interop/output-interop)
*
* @publicApi 19.0
*/
@@ -109,6 +112,8 @@ function outputFromObservable(observable, opts) {
*
* You can subscribe to the output via `Observable.subscribe` then.
*
* @see [RxJS interop with component and directive outputs](ecosystem/rxjs-interop/output-interop)
*
* @publicApi 19.0
*/
function outputToObservable(ref) {
@@ -134,6 +139,9 @@ function outputToObservable(ref) {
*
* `toObservable` must be called in an injection context unless an injector is provided via options.
*
* @see [RxJS interop with Angular signals](ecosystem/rxjs-interop)
* @see [Create an RxJS Observable from a signal with toObservable](ecosystem/rxjs-interop#create-an-rxjs-observable-from-a-signal-with-toobservable)
*
* @publicApi 20.0
*/
function toObservable(source, options) {
@@ -181,6 +189,8 @@ function toObservable(source, options) {
* If the subscription should persist until the `Observable` itself completes, the `manualCleanup`
* option can be specified instead, which disables the automatic subscription teardown. No injection
* context is needed in this configuration as well.
*
* @see [RxJS interop with Angular signals](ecosystem/rxjs-interop)
*/
function toSignal(source, options) {
typeof ngDevMode !== 'undefined' &&
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
+1 -1
View File
@@ -1 +1 @@
{"version":3,"file":"weak_ref.mjs","sources":["../../../../../k8-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/signals/src/weak_ref.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport function setAlternateWeakRefImpl(impl: unknown) {\n // TODO: remove this function\n}\n"],"names":[],"mappings":";;;;;;AAQM,SAAU,uBAAuB,CAAC,IAAa,EAAA;;AAErD;;;;"}
{"version":3,"file":"weak_ref.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-199a4f3c4e20/bin/packages/core/primitives/signals/src/weak_ref.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport function setAlternateWeakRefImpl(impl: unknown) {\n // TODO: remove this function\n}\n"],"names":[],"mappings":";;;;;;AAQM,SAAU,uBAAuB,CAAC,IAAa,EAAA;;AAErD;;;;"}
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
+65 -13
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@angular/core",
"version": "20.3.11",
"version": "20.3.21",
"description": "Angular - the core framework",
"author": "angular",
"license": "MIT",
@@ -46,7 +46,7 @@
"tslib": "^2.3.0"
},
"peerDependencies": {
"@angular/compiler": "20.3.11",
"@angular/compiler": "20.3.21",
"rxjs": "^6.5.3 || ^7.4.0",
"zone.js": "~0.15.0"
},
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
+11 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
@@ -31,6 +31,7 @@ import { Observable, MonoTypeOperatorFunction, Subscribable } from 'rxjs';
* nameChange = outputFromObservable(this.nameChange$);
* }
* ```
* @see [RxJS interop with component and directive outputs](ecosystem/rxjs-interop/output-interop)
*
* @publicApi 19.0
*/
@@ -43,6 +44,8 @@ declare function outputFromObservable<T>(observable: Observable<T>, opts?: Outpu
*
* You can subscribe to the output via `Observable.subscribe` then.
*
* @see [RxJS interop with component and directive outputs](ecosystem/rxjs-interop/output-interop)
*
* @publicApi 19.0
*/
declare function outputToObservable<T>(ref: OutputRef<T>): Observable<T>;
@@ -55,6 +58,8 @@ declare function outputToObservable<T>(ref: OutputRef<T>): Observable<T>;
* passed explicitly to use `takeUntilDestroyed` outside of an [injection
* context](guide/di/dependency-injection-context). Otherwise, the current `DestroyRef` is injected.
*
* @see [Unsubscribing with takeUntilDestroyed](ecosystem/rxjs-interop/take-until-destroyed)
*
* @publicApi 19.0
*/
declare function takeUntilDestroyed<T>(destroyRef?: DestroyRef): MonoTypeOperatorFunction<T>;
@@ -81,6 +86,9 @@ interface ToObservableOptions {
*
* `toObservable` must be called in an injection context unless an injector is provided via options.
*
* @see [RxJS interop with Angular signals](ecosystem/rxjs-interop)
* @see [Create an RxJS Observable from a signal with toObservable](ecosystem/rxjs-interop#create-an-rxjs-observable-from-a-signal-with-toobservable)
*
* @publicApi 20.0
*/
declare function toObservable<T>(source: Signal<T>, options?: ToObservableOptions): Observable<T>;
@@ -169,6 +177,8 @@ interface RxResourceOptions<T, R> extends BaseResourceOptions<T, R> {
* Like `resource` but uses an RxJS based `loader` which maps the request to an `Observable` of the
* resource's value.
*
* @see [Using rxResource for async data](ecosystem/rxjs-interop#using-rxresource-for-async-data)
*
* @experimental
*/
declare function rxResource<T, R>(opts: RxResourceOptions<T, R> & {
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
@@ -8,12 +8,12 @@
require('@angular-devkit/core');
require('node:path/posix');
var project_paths = require('./project_paths-Dr30Du8j.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
var project_paths = require('./project_paths-Bq_k0pof.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
var ts = require('typescript');
require('os');
var apply_import_manager = require('./apply_import_manager-CPOYeJ7t.cjs');
require('./index-BXjkzENj.cjs');
var apply_import_manager = require('./apply_import_manager-Clb1Y0Nb.cjs');
require('./index-kR-YjYku.cjs');
require('path');
require('node:path');
require('@angular-devkit/schematics');
@@ -1,67 +0,0 @@
'use strict';
/**
* @license Angular v20.3.11
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
'use strict';
var ts = require('typescript');
require('os');
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
var project_paths = require('./project_paths-Dr30Du8j.cjs');
/**
* Applies import manager changes, and writes them as replacements the
* given result array.
*/
function applyImportManagerChanges(importManager, replacements, sourceFiles, info) {
const { newImports, updatedImports, deletedImports } = importManager.finalize();
const printer = ts.createPrinter({});
const pathToFile = new Map(sourceFiles.map((s) => [s.fileName, s]));
// Capture new imports
newImports.forEach((newImports, fileName) => {
newImports.forEach((newImport) => {
const printedImport = printer.printNode(ts.EmitHint.Unspecified, newImport, pathToFile.get(fileName));
replacements.push(new project_paths.Replacement(project_paths.projectFile(project_tsconfig_paths.absoluteFrom(fileName), info), new project_paths.TextUpdate({ position: 0, end: 0, toInsert: `${printedImport}\n` })));
});
});
// Capture updated imports
for (const [oldBindings, newBindings] of updatedImports.entries()) {
// The import will be generated as multi-line if it already is multi-line,
// or if the number of elements significantly increased and it previously
// consisted of very few specifiers.
const isMultiline = oldBindings.getText().includes('\n') ||
(newBindings.elements.length >= 6 && oldBindings.elements.length <= 3);
const hasSpaceBetweenBraces = oldBindings.getText().startsWith('{ ');
let formatFlags = ts.ListFormat.NamedImportsOrExportsElements |
ts.ListFormat.Indented |
ts.ListFormat.Braces |
ts.ListFormat.PreserveLines |
(isMultiline ? ts.ListFormat.MultiLine : ts.ListFormat.SingleLine);
if (hasSpaceBetweenBraces) {
formatFlags |= ts.ListFormat.SpaceBetweenBraces;
}
else {
formatFlags &= ~ts.ListFormat.SpaceBetweenBraces;
}
const printedBindings = printer.printList(formatFlags, newBindings.elements, oldBindings.getSourceFile());
replacements.push(new project_paths.Replacement(project_paths.projectFile(oldBindings.getSourceFile(), info), new project_paths.TextUpdate({
position: oldBindings.getStart(),
end: oldBindings.getEnd(),
// TS uses four spaces as indent. We migrate to two spaces as we
// assume this to be more common.
toInsert: printedBindings.replace(/^ {4}/gm, ' '),
})));
}
// Update removed imports
for (const removedImport of deletedImports) {
replacements.push(new project_paths.Replacement(project_paths.projectFile(removedImport.getSourceFile(), info), new project_paths.TextUpdate({
position: removedImport.getStart(),
end: removedImport.getEnd(),
toInsert: '',
})));
}
}
exports.applyImportManagerChanges = applyImportManagerChanges;
+5 -5
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
@@ -8,14 +8,14 @@
require('@angular-devkit/core');
require('node:path/posix');
var project_paths = require('./project_paths-Dr30Du8j.cjs');
var project_paths = require('./project_paths-Bq_k0pof.cjs');
var ts = require('typescript');
require('os');
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
var index = require('./index-BXjkzENj.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
var index = require('./index-kR-YjYku.cjs');
require('path');
require('node:path');
var apply_import_manager = require('./apply_import_manager-CPOYeJ7t.cjs');
var apply_import_manager = require('./apply_import_manager-Clb1Y0Nb.cjs');
require('@angular-devkit/schematics');
require('fs');
require('module');
@@ -1,319 +0,0 @@
'use strict';
/**
* @license Angular v20.3.11
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
'use strict';
var ts = require('typescript');
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
require('os');
var p = require('path');
function _interopNamespaceDefault(e) {
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n.default = e;
return Object.freeze(n);
}
var p__namespace = /*#__PURE__*/_interopNamespaceDefault(p);
/** Tracks changes that have to be made for specific files. */
class ChangeTracker {
_printer;
_importRemapper;
_changes = new Map();
_importManager;
_quotesCache = new WeakMap();
constructor(_printer, _importRemapper) {
this._printer = _printer;
this._importRemapper = _importRemapper;
this._importManager = new project_tsconfig_paths.ImportManager({
shouldUseSingleQuotes: (file) => this._getQuoteKind(file) === 0 /* QuoteKind.SINGLE */,
});
}
/**
* Tracks the insertion of some text.
* @param sourceFile File in which the text is being inserted.
* @param start Index at which the text is insert.
* @param text Text to be inserted.
*/
insertText(sourceFile, index, text) {
this._trackChange(sourceFile, { start: index, text });
}
/**
* Replaces text within a file.
* @param sourceFile File in which to replace the text.
* @param start Index from which to replace the text.
* @param removeLength Length of the text being replaced.
* @param text Text to be inserted instead of the old one.
*/
replaceText(sourceFile, start, removeLength, text) {
this._trackChange(sourceFile, { start, removeLength, text });
}
/**
* Replaces the text of an AST node with a new one.
* @param oldNode Node to be replaced.
* @param newNode New node to be inserted.
* @param emitHint Hint when formatting the text of the new node.
* @param sourceFileWhenPrinting File to use when printing out the new node. This is important
* when copying nodes from one file to another, because TypeScript might not output literal nodes
* without it.
*/
replaceNode(oldNode, newNode, emitHint = ts.EmitHint.Unspecified, sourceFileWhenPrinting) {
const sourceFile = oldNode.getSourceFile();
this.replaceText(sourceFile, oldNode.getStart(), oldNode.getWidth(), this._printer.printNode(emitHint, newNode, sourceFileWhenPrinting || sourceFile));
}
/**
* Removes the text of an AST node from a file.
* @param node Node whose text should be removed.
* @param useFullOffsets Whether to remove the node using its full offset (e.g. `getFullStart`
* rather than `fullStart`). This has the advantage of removing any comments that may be tied
* to the node, but can lead to too much code being deleted.
*/
removeNode(node, useFullOffsets = false) {
this._trackChange(node.getSourceFile(), {
start: useFullOffsets ? node.getFullStart() : node.getStart(),
removeLength: useFullOffsets ? node.getFullWidth() : node.getWidth(),
text: '',
});
}
/**
* Adds an import to a file.
* @param sourceFile File to which to add the import.
* @param symbolName Symbol being imported.
* @param moduleName Module from which the symbol is imported.
* @param alias Alias to use for the import.
*/
addImport(sourceFile, symbolName, moduleName, alias) {
if (this._importRemapper) {
moduleName = this._importRemapper(moduleName, sourceFile.fileName);
}
// It's common for paths to be manipulated with Node's `path` utilties which
// can yield a path with back slashes. Normalize them since outputting such
// paths will also cause TS to escape the forward slashes.
moduleName = normalizePath(moduleName);
if (!this._changes.has(sourceFile)) {
this._changes.set(sourceFile, []);
}
return this._importManager.addImport({
requestedFile: sourceFile,
exportSymbolName: symbolName,
exportModuleSpecifier: moduleName,
unsafeAliasOverride: alias,
});
}
/**
* Removes an import from a file.
* @param sourceFile File from which to remove the import.
* @param symbolName Original name of the symbol to be removed. Used even if the import is aliased.
* @param moduleName Module from which the symbol is imported.
*/
removeImport(sourceFile, symbolName, moduleName) {
// It's common for paths to be manipulated with Node's `path` utilties which
// can yield a path with back slashes. Normalize them since outputting such
// paths will also cause TS to escape the forward slashes.
moduleName = normalizePath(moduleName);
if (!this._changes.has(sourceFile)) {
this._changes.set(sourceFile, []);
}
this._importManager.removeImport(sourceFile, symbolName, moduleName);
}
/**
* Gets the changes that should be applied to all the files in the migration.
* The changes are sorted in the order in which they should be applied.
*/
recordChanges() {
this._recordImports();
return this._changes;
}
/**
* Clear the tracked changes
*/
clearChanges() {
this._changes.clear();
}
/**
* Adds a change to a `ChangesByFile` map.
* @param file File that the change is associated with.
* @param change Change to be added.
*/
_trackChange(file, change) {
const changes = this._changes.get(file);
if (changes) {
// Insert the changes in reverse so that they're applied in reverse order.
// This ensures that the offsets of subsequent changes aren't affected by
// previous changes changing the file's text.
const insertIndex = changes.findIndex((current) => current.start <= change.start);
if (insertIndex === -1) {
changes.push(change);
}
else {
changes.splice(insertIndex, 0, change);
}
}
else {
this._changes.set(file, [change]);
}
}
/** Determines what kind of quotes to use for a specific file. */
_getQuoteKind(sourceFile) {
if (this._quotesCache.has(sourceFile)) {
return this._quotesCache.get(sourceFile);
}
let kind = 0 /* QuoteKind.SINGLE */;
for (const statement of sourceFile.statements) {
if (ts.isImportDeclaration(statement) && ts.isStringLiteral(statement.moduleSpecifier)) {
kind = statement.moduleSpecifier.getText()[0] === '"' ? 1 /* QuoteKind.DOUBLE */ : 0 /* QuoteKind.SINGLE */;
this._quotesCache.set(sourceFile, kind);
break;
}
}
return kind;
}
/** Records the pending import changes from the import manager. */
_recordImports() {
const { newImports, updatedImports, deletedImports } = this._importManager.finalize();
for (const [original, replacement] of updatedImports) {
this.replaceNode(original, replacement);
}
for (const node of deletedImports) {
this.removeNode(node);
}
for (const [sourceFile] of this._changes) {
const importsToAdd = newImports.get(sourceFile.fileName);
if (!importsToAdd) {
continue;
}
const importLines = [];
let lastImport = null;
for (const statement of sourceFile.statements) {
if (ts.isImportDeclaration(statement)) {
lastImport = statement;
}
}
for (const decl of importsToAdd) {
importLines.push(this._printer.printNode(ts.EmitHint.Unspecified, decl, sourceFile));
}
this.insertText(sourceFile, lastImport ? lastImport.getEnd() : 0, (lastImport ? '\n' : '') + importLines.join('\n'));
}
}
}
/** Normalizes a path to use posix separators. */
function normalizePath(path) {
return path.replace(/\\/g, '/');
}
function parseTsconfigFile(tsconfigPath, basePath) {
const { config } = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
const parseConfigHost = {
useCaseSensitiveFileNames: ts.sys.useCaseSensitiveFileNames,
fileExists: ts.sys.fileExists,
readDirectory: ts.sys.readDirectory,
readFile: ts.sys.readFile,
};
// Throw if incorrect arguments are passed to this function. Passing relative base paths
// results in root directories not being resolved and in later type checking runtime errors.
// More details can be found here: https://github.com/microsoft/TypeScript/issues/37731.
if (!p__namespace.isAbsolute(basePath)) {
throw Error('Unexpected relative base path has been specified.');
}
return ts.parseJsonConfigFileContent(config, parseConfigHost, basePath, {});
}
/**
* Creates a TypeScript program instance for a TypeScript project within
* the virtual file system tree.
* @param tree Virtual file system tree that contains the source files.
* @param tsconfigPath Virtual file system path that resolves to the TypeScript project.
* @param basePath Base path for the virtual file system tree.
* @param fakeFileRead Optional file reader function. Can be used to overwrite files in
* the TypeScript program, or to add in-memory files (e.g. to add global types).
* @param additionalFiles Additional file paths that should be added to the program.
*/
function createMigrationProgram(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles) {
const { rootNames, options, host } = createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead);
return ts.createProgram(rootNames, options, host);
}
/**
* Creates the options necessary to instantiate a TypeScript program.
* @param tree Virtual file system tree that contains the source files.
* @param tsconfigPath Virtual file system path that resolves to the TypeScript project.
* @param basePath Base path for the virtual file system tree.
* @param fakeFileRead Optional file reader function. Can be used to overwrite files in
* the TypeScript program, or to add in-memory files (e.g. to add global types).
* @param additionalFiles Additional file paths that should be added to the program.
* @param optionOverrides Overrides of the parsed compiler options.
*/
function createProgramOptions(tree, tsconfigPath, basePath, fakeFileRead, additionalFiles, optionOverrides) {
// Resolve the tsconfig path to an absolute path. This is needed as TypeScript otherwise
// is not able to resolve root directories in the given tsconfig. More details can be found
// in the following issue: https://github.com/microsoft/TypeScript/issues/37731.
tsconfigPath = p.resolve(basePath, tsconfigPath);
const parsed = parseTsconfigFile(tsconfigPath, p.dirname(tsconfigPath));
const options = optionOverrides ? { ...parsed.options, ...optionOverrides } : parsed.options;
const host = createMigrationCompilerHost(tree, options, basePath, fakeFileRead);
return { rootNames: parsed.fileNames.concat([]), options, host };
}
function createMigrationCompilerHost(tree, options, basePath, fakeRead) {
const host = ts.createCompilerHost(options, true);
const defaultReadFile = host.readFile;
// We need to overwrite the host "readFile" method, as we want the TypeScript
// program to be based on the file contents in the virtual file tree. Otherwise
// if we run multiple migrations we might have intersecting changes and
// source files.
host.readFile = (fileName) => {
const treeRelativePath = p.relative(basePath, fileName);
let result = fakeRead?.(treeRelativePath);
if (typeof result !== 'string') {
// If the relative path resolved to somewhere outside of the tree, fall back to
// TypeScript's default file reading function since the `tree` will throw an error.
result = treeRelativePath.startsWith('..')
? defaultReadFile.call(host, fileName)
: tree.read(treeRelativePath)?.toString();
}
// Strip BOM as otherwise TSC methods (Ex: getWidth) will return an offset,
// which breaks the CLI UpdateRecorder.
// See: https://github.com/angular/angular/pull/30719
return typeof result === 'string' ? result.replace(/^\uFEFF/, '') : undefined;
};
return host;
}
/**
* Checks whether a file can be migrate by our automated migrations.
* @param basePath Absolute path to the project.
* @param sourceFile File being checked.
* @param program Program that includes the source file.
*/
function canMigrateFile(basePath, sourceFile, program) {
// We shouldn't migrate .d.ts files, files from an external library or type checking files.
if (sourceFile.fileName.endsWith('.ngtypecheck.ts') ||
sourceFile.isDeclarationFile ||
program.isSourceFileFromExternalLibrary(sourceFile)) {
return false;
}
// Our migrations are set up to create a `Program` from the project's tsconfig and to migrate all
// the files within the program. This can include files that are outside of the Angular CLI
// project. We can't migrate files outside of the project, because our file system interactions
// go through the CLI's `Tree` which assumes that all files are within the project. See:
// https://github.com/angular/angular-cli/blob/0b0961c9c233a825b6e4bb59ab7f0790f9b14676/packages/angular_devkit/schematics/src/tree/host-tree.ts#L131
return !p.relative(basePath, sourceFile.fileName).startsWith('..');
}
exports.ChangeTracker = ChangeTracker;
exports.canMigrateFile = canMigrateFile;
exports.createMigrationProgram = createMigrationProgram;
exports.createProgramOptions = createProgramOptions;
exports.normalizePath = normalizePath;
+3 -3
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
@@ -8,8 +8,8 @@
var schematics = require('@angular-devkit/schematics');
var path = require('node:path');
var compiler_host = require('./compiler_host-BGZcziuy.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
var compiler_host = require('./compiler_host-AFZotBLM.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
var ts = require('typescript');
var p = require('path');
require('os');
+5 -5
View File
@@ -1,19 +1,19 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
'use strict';
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
require('typescript');
require('os');
var apply_import_manager = require('./apply_import_manager-CPOYeJ7t.cjs');
require('./index-BXjkzENj.cjs');
var apply_import_manager = require('./apply_import_manager-Clb1Y0Nb.cjs');
require('./index-kR-YjYku.cjs');
require('path');
require('node:path');
var project_paths = require('./project_paths-Dr30Du8j.cjs');
var project_paths = require('./project_paths-Bq_k0pof.cjs');
var imports = require('./imports-CIX-JgAN.cjs');
require('@angular-devkit/core');
require('node:path/posix');
+1 -1
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
@@ -8,12 +8,12 @@
var ts = require('typescript');
require('os');
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
require('./index-BXjkzENj.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
require('./index-kR-YjYku.cjs');
require('path');
require('node:path');
var project_paths = require('./project_paths-Dr30Du8j.cjs');
var apply_import_manager = require('./apply_import_manager-CPOYeJ7t.cjs');
var project_paths = require('./project_paths-Bq_k0pof.cjs');
var apply_import_manager = require('./apply_import_manager-Clb1Y0Nb.cjs');
var imports = require('./imports-CIX-JgAN.cjs');
require('@angular-devkit/core');
require('node:path/posix');
+3 -3
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
@@ -8,13 +8,13 @@
var schematics = require('@angular-devkit/schematics');
var p = require('path');
var compiler_host = require('./compiler_host-BGZcziuy.cjs');
var compiler_host = require('./compiler_host-AFZotBLM.cjs');
var ts = require('typescript');
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
var imports = require('./imports-CIX-JgAN.cjs');
var nodes = require('./nodes-B16H9JUd.cjs');
var leading_space = require('./leading_space-D9nQ8UQC.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
require('os');
require('fs');
require('module');
+1 -1
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
+1 -1
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
+6 -6
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
@@ -8,13 +8,13 @@
var ts = require('typescript');
require('os');
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
var index$1 = require('./index-BXjkzENj.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
var index$1 = require('./index-kR-YjYku.cjs');
require('path');
require('node:path');
var project_paths = require('./project_paths-Dr30Du8j.cjs');
var apply_import_manager = require('./apply_import_manager-CPOYeJ7t.cjs');
var index = require('./index-BmMfRg5d.cjs');
var project_paths = require('./project_paths-Bq_k0pof.cjs');
var apply_import_manager = require('./apply_import_manager-Clb1Y0Nb.cjs');
var index = require('./index-CD4aCRVu.cjs');
require('@angular-devkit/core');
require('node:path/posix');
require('fs');
@@ -1,819 +0,0 @@
'use strict';
/**
* @license Angular v20.3.11
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
'use strict';
var index = require('./index-BXjkzENj.cjs');
var schematics = require('@angular-devkit/schematics');
var core = require('@angular-devkit/core');
var posixPath = require('node:path/posix');
var os = require('os');
var ts = require('typescript');
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
require('path');
var path = require('node:path');
function _interopNamespaceDefault(e) {
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n.default = e;
return Object.freeze(n);
}
var posixPath__namespace = /*#__PURE__*/_interopNamespaceDefault(posixPath);
var os__namespace = /*#__PURE__*/_interopNamespaceDefault(os);
var path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
/// <reference types="node" />
class NgtscCompilerHost {
fs;
options;
constructor(fs, options = {}) {
this.fs = fs;
this.options = options;
}
getSourceFile(fileName, languageVersion) {
const text = this.readFile(fileName);
return text !== undefined
? ts.createSourceFile(fileName, text, languageVersion, true)
: undefined;
}
getDefaultLibFileName(options) {
return this.fs.join(this.getDefaultLibLocation(), ts.getDefaultLibFileName(options));
}
getDefaultLibLocation() {
return this.fs.getDefaultLibLocation();
}
writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles) {
const path = project_tsconfig_paths.absoluteFrom(fileName);
this.fs.ensureDir(this.fs.dirname(path));
this.fs.writeFile(path, data);
}
getCurrentDirectory() {
return this.fs.pwd();
}
getCanonicalFileName(fileName) {
return this.useCaseSensitiveFileNames() ? fileName : fileName.toLowerCase();
}
useCaseSensitiveFileNames() {
return this.fs.isCaseSensitive();
}
getNewLine() {
switch (this.options.newLine) {
case ts.NewLineKind.CarriageReturnLineFeed:
return '\r\n';
case ts.NewLineKind.LineFeed:
return '\n';
default:
return os__namespace.EOL;
}
}
fileExists(fileName) {
const absPath = this.fs.resolve(fileName);
return this.fs.exists(absPath) && this.fs.stat(absPath).isFile();
}
readFile(fileName) {
const absPath = this.fs.resolve(fileName);
if (!this.fileExists(absPath)) {
return undefined;
}
return this.fs.readFile(absPath);
}
realpath(path) {
return this.fs.realpath(this.fs.resolve(path));
}
}
// We use TypeScript's native `ts.matchFiles` utility for the virtual file systems
// and their TypeScript compiler host `readDirectory` implementation. TypeScript's
// function implements complex logic for matching files with respect to root
// directory, extensions, excludes, includes etc. The function is currently
// internal but we can use it as the API most likely will not change any time soon,
// nor does it seem like this is being made public any time soon.
// Related issue for tracking: https://github.com/microsoft/TypeScript/issues/13793.
/**
* Creates a {@link ts.CompilerHost#readDirectory} implementation function,
* that leverages the specified file system (that may be e.g. virtual).
*/
function createFileSystemTsReadDirectoryFn(fs) {
if (ts.matchFiles === undefined) {
throw Error('Unable to read directory in configured file system. This means that ' +
'TypeScript changed its file matching internals.\n\nPlease consider downgrading your ' +
'TypeScript version, and report an issue in the Angular framework repository.');
}
const matchFilesFn = ts.matchFiles.bind(ts);
return (rootDir, extensions, excludes, includes, depth) => {
const directoryExists = (p) => {
const resolvedPath = fs.resolve(p);
return fs.exists(resolvedPath) && fs.stat(resolvedPath).isDirectory();
};
return matchFilesFn(rootDir, extensions, excludes, includes, fs.isCaseSensitive(), fs.pwd(), depth, (p) => {
const resolvedPath = fs.resolve(p);
// TS also gracefully returns an empty file set.
if (!directoryExists(resolvedPath)) {
return { directories: [], files: [] };
}
const children = fs.readdir(resolvedPath);
const files = [];
const directories = [];
for (const child of children) {
if (fs.stat(fs.join(resolvedPath, child))?.isDirectory()) {
directories.push(child);
}
else {
files.push(child);
}
}
return { files, directories };
}, (p) => fs.resolve(p), (p) => directoryExists(p));
};
}
function calcProjectFileAndBasePath(project, host = project_tsconfig_paths.getFileSystem()) {
const absProject = host.resolve(project);
const projectIsDir = host.lstat(absProject).isDirectory();
const projectFile = projectIsDir ? host.join(absProject, 'tsconfig.json') : absProject;
const projectDir = projectIsDir ? absProject : host.dirname(absProject);
const basePath = host.resolve(projectDir);
return { projectFile, basePath };
}
function readConfiguration(project, existingOptions, host = project_tsconfig_paths.getFileSystem()) {
try {
const fs = project_tsconfig_paths.getFileSystem();
const readConfigFile = (configFile) => ts.readConfigFile(configFile, (file) => host.readFile(host.resolve(file)));
const readAngularCompilerOptions = (configFile, parentOptions = {}) => {
const { config, error } = readConfigFile(configFile);
if (error) {
// Errors are handled later on by 'parseJsonConfigFileContent'
return parentOptions;
}
// Note: In Google, `angularCompilerOptions` are stored in `bazelOptions`.
// This function typically doesn't run for actual Angular compilations, but
// tooling like Tsurge, or schematics may leverage this helper, so we account
// for this here.
const angularCompilerOptions = config.angularCompilerOptions ?? config.bazelOptions?.angularCompilerOptions;
// we are only interested into merging 'angularCompilerOptions' as
// other options like 'compilerOptions' are merged by TS
let existingNgCompilerOptions = { ...angularCompilerOptions, ...parentOptions };
if (!config.extends) {
return existingNgCompilerOptions;
}
const extendsPaths = typeof config.extends === 'string' ? [config.extends] : config.extends;
// Call readAngularCompilerOptions recursively to merge NG Compiler options
// Reverse the array so the overrides happen from right to left.
return [...extendsPaths].reverse().reduce((prevOptions, extendsPath) => {
const extendedConfigPath = getExtendedConfigPath(configFile, extendsPath, host, fs);
return extendedConfigPath === null
? prevOptions
: readAngularCompilerOptions(extendedConfigPath, prevOptions);
}, existingNgCompilerOptions);
};
const { projectFile, basePath } = calcProjectFileAndBasePath(project, host);
const configFileName = host.resolve(host.pwd(), projectFile);
const { config, error } = readConfigFile(projectFile);
if (error) {
return {
project,
errors: [error],
rootNames: [],
options: {},
emitFlags: index.EmitFlags.Default,
};
}
const existingCompilerOptions = {
genDir: basePath,
basePath,
...readAngularCompilerOptions(configFileName),
...existingOptions,
};
const parseConfigHost = createParseConfigHost(host, fs);
const { options, errors, fileNames: rootNames, projectReferences, } = ts.parseJsonConfigFileContent(config, parseConfigHost, basePath, existingCompilerOptions, configFileName);
let emitFlags = index.EmitFlags.Default;
if (!(options['skipMetadataEmit'] || options['flatModuleOutFile'])) {
emitFlags |= index.EmitFlags.Metadata;
}
if (options['skipTemplateCodegen']) {
emitFlags = emitFlags & ~index.EmitFlags.Codegen;
}
return { project: projectFile, rootNames, projectReferences, options, errors, emitFlags };
}
catch (e) {
const errors = [
{
category: ts.DiagnosticCategory.Error,
messageText: e.stack ?? e.message,
file: undefined,
start: undefined,
length: undefined,
source: 'angular',
code: index.UNKNOWN_ERROR_CODE,
},
];
return { project: '', errors, rootNames: [], options: {}, emitFlags: index.EmitFlags.Default };
}
}
function createParseConfigHost(host, fs = project_tsconfig_paths.getFileSystem()) {
return {
fileExists: host.exists.bind(host),
readDirectory: createFileSystemTsReadDirectoryFn(fs),
readFile: host.readFile.bind(host),
useCaseSensitiveFileNames: fs.isCaseSensitive(),
};
}
function getExtendedConfigPath(configFile, extendsValue, host, fs) {
const result = getExtendedConfigPathWorker(configFile, extendsValue, host, fs);
if (result !== null) {
return result;
}
// Try to resolve the paths with a json extension append a json extension to the file in case if
// it is missing and the resolution failed. This is to replicate TypeScript behaviour, see:
// https://github.com/microsoft/TypeScript/blob/294a5a7d784a5a95a8048ee990400979a6bc3a1c/src/compiler/commandLineParser.ts#L2806
return getExtendedConfigPathWorker(configFile, `${extendsValue}.json`, host, fs);
}
function getExtendedConfigPathWorker(configFile, extendsValue, host, fs) {
if (extendsValue.startsWith('.') || fs.isRooted(extendsValue)) {
const extendedConfigPath = host.resolve(host.dirname(configFile), extendsValue);
if (host.exists(extendedConfigPath)) {
return extendedConfigPath;
}
}
else {
const parseConfigHost = createParseConfigHost(host, fs);
// Path isn't a rooted or relative path, resolve like a module.
const { resolvedModule } = ts.nodeModuleNameResolver(extendsValue, configFile, { moduleResolution: ts.ModuleResolutionKind.Node10, resolveJsonModule: true }, parseConfigHost);
if (resolvedModule) {
return project_tsconfig_paths.absoluteFrom(resolvedModule.resolvedFileName);
}
}
return null;
}
/**
* Angular compiler file system implementation that leverages an
* CLI schematic virtual file tree.
*/
class DevkitMigrationFilesystem {
tree;
constructor(tree) {
this.tree = tree;
}
extname(path) {
return core.extname(path);
}
isRoot(path) {
return path === core.normalize('/');
}
isRooted(path) {
return this.normalize(path).startsWith('/');
}
dirname(file) {
return this.normalize(core.dirname(file));
}
join(basePath, ...paths) {
return this.normalize(core.join(basePath, ...paths));
}
relative(from, to) {
return this.normalize(core.relative(from, to));
}
basename(filePath, extension) {
return posixPath__namespace.basename(filePath, extension);
}
normalize(path) {
return core.normalize(path);
}
resolve(...paths) {
const normalizedPaths = paths.map((p) => core.normalize(p));
// In dev-kit, the NodeJS working directory should never be
// considered, so `/` is the last resort over `cwd`.
return this.normalize(posixPath__namespace.resolve(core.normalize('/'), ...normalizedPaths));
}
pwd() {
return '/';
}
isCaseSensitive() {
return true;
}
exists(path) {
return statPath(this.tree, path) !== null;
}
readFile(path) {
return this.tree.readText(path);
}
readFileBuffer(path) {
const buffer = this.tree.read(path);
if (buffer === null) {
throw new Error(`File does not exist: ${path}`);
}
return buffer;
}
readdir(path) {
const dir = this.tree.getDir(path);
return [
...dir.subdirs,
...dir.subfiles,
];
}
lstat(path) {
const stat = statPath(this.tree, path);
if (stat === null) {
throw new Error(`File does not exist for "lstat": ${path}`);
}
return stat;
}
stat(path) {
const stat = statPath(this.tree, path);
if (stat === null) {
throw new Error(`File does not exist for "stat": ${path}`);
}
return stat;
}
realpath(filePath) {
return filePath;
}
getDefaultLibLocation() {
return 'node_modules/typescript/lib';
}
ensureDir(path) {
// Migrations should compute replacements and not write directly.
throw new Error('DevkitFilesystem#ensureDir is not supported.');
}
writeFile(path, data) {
// Migrations should compute replacements and not write directly.
throw new Error('DevkitFilesystem#writeFile is not supported.');
}
removeFile(path) {
// Migrations should compute replacements and not write directly.
throw new Error('DevkitFilesystem#removeFile is not supported.');
}
copyFile(from, to) {
// Migrations should compute replacements and not write directly.
throw new Error('DevkitFilesystem#copyFile is not supported.');
}
moveFile(from, to) {
// Migrations should compute replacements and not write directly.
throw new Error('DevkitFilesystem#moveFile is not supported.');
}
removeDeep(path) {
// Migrations should compute replacements and not write directly.
throw new Error('DevkitFilesystem#removeDeep is not supported.');
}
chdir(_path) {
throw new Error('FileSystem#chdir is not supported.');
}
symlink() {
throw new Error('FileSystem#symlink is not supported.');
}
}
/** Stats the given path in the virtual tree. */
function statPath(tree, path) {
let fileInfo = null;
let dirInfo = null;
try {
fileInfo = tree.get(path);
}
catch (e) {
if (e.constructor.name === 'PathIsDirectoryException') {
dirInfo = tree.getDir(path);
}
else {
throw e;
}
}
if (fileInfo !== null || dirInfo !== null) {
return {
isDirectory: () => dirInfo !== null,
isFile: () => fileInfo !== null,
isSymbolicLink: () => false,
};
}
return null;
}
/**
* Groups the given replacements per project relative
* file path.
*
* This allows for simple execution of the replacements
* against a given file. E.g. via {@link applyTextUpdates}.
*/
function groupReplacementsByFile(replacements) {
const result = new Map();
for (const { projectFile, update } of replacements) {
if (!result.has(projectFile.rootRelativePath)) {
result.set(projectFile.rootRelativePath, []);
}
result.get(projectFile.rootRelativePath).push(update);
}
return result;
}
/**
* Synchronously combines unit data for the given migration.
*
* Note: This helper is useful for testing and execution of
* Tsurge migrations in non-batchable environments. In general,
* prefer parallel execution of combining via e.g. Beam combiners.
*/
async function synchronouslyCombineUnitData(migration, unitDatas) {
if (unitDatas.length === 0) {
return null;
}
if (unitDatas.length === 1) {
return unitDatas[0];
}
let combined = unitDatas[0];
for (let i = 1; i < unitDatas.length; i++) {
const other = unitDatas[i];
combined = await migration.combine(combined, other);
}
return combined;
}
/** Whether we are executing inside Google */
function isGoogle3() {
return process.env['GOOGLE3_TSURGE'] === '1';
}
/**
* By default, Tsurge will always create an Angular compiler program
* for projects analyzed and migrated. This works perfectly fine in
* third-party where Tsurge migrations run in Angular CLI projects.
*
* In first party, when running against full Google3, creating an Angular
* program for e.g. plain `ts_library` targets is overly expensive and
* can result in out of memory issues for large TS targets. In 1P we can
* reliably distinguish between TS and Angular targets via the `angularCompilerOptions`.
*/
function google3UsePlainTsProgramIfNoKnownAngularOption() {
return process.env['GOOGLE3_TSURGE'] === '1';
}
/** Options that are good defaults for Tsurge migrations. */
const defaultMigrationTsOptions = {
// Avoid checking libraries to speed up migrations.
skipLibCheck: true,
skipDefaultLibCheck: true,
noEmit: true,
// Does not apply to g3 and externally is enforced when the app is built by the compiler.
disableTypeScriptVersionCheck: true,
};
/**
* Creates an instance of a TypeScript program for the given project.
*/
function createPlainTsProgram(tsHost, tsconfig, optionOverrides) {
const program = ts.createProgram({
rootNames: tsconfig.rootNames,
options: {
...tsconfig.options,
...defaultMigrationTsOptions,
...optionOverrides,
},
});
return {
ngCompiler: null,
program,
userOptions: tsconfig.options,
__programAbsoluteRootFileNames: tsconfig.rootNames,
host: tsHost,
};
}
/**
* Parses the configuration of the given TypeScript project and creates
* an instance of the Angular compiler for the project.
*/
function createNgtscProgram(tsHost, tsconfig, optionOverrides) {
const ngtscProgram = new index.NgtscProgram(tsconfig.rootNames, {
...tsconfig.options,
...defaultMigrationTsOptions,
...optionOverrides,
}, tsHost);
// Expose an easy way to debug-print ng semantic diagnostics.
if (process.env['DEBUG_NG_SEMANTIC_DIAGNOSTICS'] === '1') {
console.error(ts.formatDiagnosticsWithColorAndContext(ngtscProgram.getNgSemanticDiagnostics(), tsHost));
}
return {
ngCompiler: ngtscProgram.compiler,
program: ngtscProgram.getTsProgram(),
userOptions: tsconfig.options,
__programAbsoluteRootFileNames: tsconfig.rootNames,
host: tsHost,
};
}
/** Code of the error raised by TypeScript when a tsconfig doesn't match any files. */
const NO_INPUTS_ERROR_CODE = 18003;
/** Parses the given tsconfig file, supporting Angular compiler options. */
function parseTsconfigOrDie(absoluteTsconfigPath, fs) {
const tsconfig = readConfiguration(absoluteTsconfigPath, {}, fs);
// Skip the "No inputs found..." error since we don't want to interrupt the migration if a
// tsconfig doesn't match a file. This will result in an empty `Program` which is still valid.
const errors = tsconfig.errors.filter((diag) => diag.code !== NO_INPUTS_ERROR_CODE);
if (errors.length) {
throw new Error(`Tsconfig could not be parsed or is invalid:\n\n` + `${errors.map((e) => e.messageText)}`);
}
return tsconfig;
}
// Note: Try to keep mostly in sync with
// //depot/google3/javascript/angular2/tools/ngc_wrapped/tsc_plugin.ts
// TODO: Consider moving this logic into the 1P launcher.
const EXT = /(\.ts|\.d\.ts|\.js|\.jsx|\.tsx)$/;
function fileNameToModuleNameFactory(rootDirs, workspaceName) {
return (importedFilePath) => {
let relativePath = '';
for (const rootDir of rootDirs) {
const rel = path__namespace.posix.relative(rootDir, importedFilePath);
if (!rel.startsWith('.')) {
relativePath = rel;
break;
}
}
if (relativePath) {
return `${workspaceName}/${relativePath.replace(EXT, '')}`;
}
else {
return importedFilePath.replace(EXT, '');
}
};
}
/** Creates the base program info for the given tsconfig path. */
function createBaseProgramInfo(absoluteTsconfigPath, fs, optionOverrides = {}) {
// Make sure the FS becomes globally available. Some code paths
// of the Angular compiler, or tsconfig parsing aren't leveraging
// the specified file system.
project_tsconfig_paths.setFileSystem(fs);
const tsconfig = parseTsconfigOrDie(absoluteTsconfigPath, fs);
const tsHost = new NgtscCompilerHost(fs, tsconfig.options);
// When enabled, use a plain TS program if we are sure it's not
// an Angular project based on the `tsconfig.json`.
if (google3UsePlainTsProgramIfNoKnownAngularOption() &&
tsconfig.options['_useHostForImportGeneration'] === undefined) {
return createPlainTsProgram(tsHost, tsconfig, optionOverrides);
}
// The Angular program may try to emit references during analysis or migration.
// To replicate the Google3 import emission here, ensure the unified module resolution
// can be enabled by the compiler.
if (isGoogle3() && tsconfig.options.rootDirs) {
tsHost.fileNameToModuleName = fileNameToModuleNameFactory(tsconfig.options.rootDirs,
/* workspaceName*/ 'google3');
}
return createNgtscProgram(tsHost, tsconfig, optionOverrides);
}
/**
* Creates the {@link ProgramInfo} from the given base information.
*
* This function purely exists to support custom programs that are
* intended to be injected into Tsurge migrations. e.g. for language
* service refactorings.
*/
function getProgramInfoFromBaseInfo(baseInfo) {
const fullProgramSourceFiles = [...baseInfo.program.getSourceFiles()];
const sourceFiles = fullProgramSourceFiles.filter((f) => !f.isDeclarationFile &&
// Note `isShim` will work for the initial program, but for TCB programs, the shims are no longer annotated.
!project_tsconfig_paths.isShim(f) &&
!f.fileName.endsWith('.ngtypecheck.ts'));
// Sort it by length in reverse order (longest first). This speeds up lookups,
// since there's no need to keep going through the array once a match is found.
const sortedRootDirs = project_tsconfig_paths.getRootDirs(baseInfo.host, baseInfo.userOptions).sort((a, b) => b.length - a.length);
// TODO: Consider also following TS's logic here, finding the common source root.
// See: Program#getCommonSourceDirectory.
const primaryRoot = project_tsconfig_paths.absoluteFrom(baseInfo.userOptions.rootDir ?? sortedRootDirs.at(-1) ?? baseInfo.program.getCurrentDirectory());
return {
...baseInfo,
sourceFiles,
fullProgramSourceFiles,
sortedRootDirs,
projectRoot: primaryRoot,
};
}
/**
* @private
*
* Base class for the possible Tsurge migration variants.
*
* For example, this class exposes methods to conveniently create
* TypeScript programs, while also allowing migration authors to override.
*/
class TsurgeBaseMigration {
/**
* Creates the TypeScript program for a given compilation unit.
*
* By default:
* - In 3P: Ngtsc programs are being created.
* - In 1P: Ngtsc or TS programs are created based on the Blaze target.
*/
createProgram(tsconfigAbsPath, fs, optionsOverride) {
return getProgramInfoFromBaseInfo(createBaseProgramInfo(tsconfigAbsPath, fs, optionsOverride));
}
}
/**
* A simpler variant of a {@link TsurgeComplexMigration} that does not
* fan-out into multiple workers per compilation unit to compute
* the final migration replacements.
*
* This is faster and less resource intensive as workers and TS programs
* are only ever created once.
*
* This is commonly the case when migrations are refactored to eagerly
* compute replacements in the analyze stage, and then leverage the
* global unit data to filter replacements that turned out to be "invalid".
*/
class TsurgeFunnelMigration extends TsurgeBaseMigration {
}
/**
* Complex variant of a `Tsurge` migration.
*
* For example, every analyze worker may contribute to a list of TS
* references that are later combined. The migrate phase can then compute actual
* file updates for all individual compilation units, leveraging the global metadata
* to e.g. see if there are any references from other compilation units that may be
* problematic and prevent migration of a given file.
*/
class TsurgeComplexMigration extends TsurgeBaseMigration {
}
/*!
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
exports.MigrationStage = void 0;
(function (MigrationStage) {
/** The migration is analyzing an entrypoint */
MigrationStage[MigrationStage["Analysis"] = 0] = "Analysis";
/** The migration is about to migrate an entrypoint */
MigrationStage[MigrationStage["Migrate"] = 1] = "Migrate";
})(exports.MigrationStage || (exports.MigrationStage = {}));
/** Runs a Tsurge within an Angular Devkit context. */
async function runMigrationInDevkit(config) {
const { buildPaths, testPaths } = await project_tsconfig_paths.getProjectTsConfigPaths(config.tree);
if (!buildPaths.length && !testPaths.length) {
throw new schematics.SchematicsException('Could not find any tsconfig file. Cannot run the migration.');
}
const tsconfigPaths = [...buildPaths, ...testPaths];
const fs = new DevkitMigrationFilesystem(config.tree);
project_tsconfig_paths.setFileSystem(fs);
const migration = config.getMigration(fs);
const unitResults = [];
const isFunnelMigration = migration instanceof TsurgeFunnelMigration;
const compilationUnitAssignments = new Map();
for (const tsconfigPath of tsconfigPaths) {
config.beforeProgramCreation?.(tsconfigPath, exports.MigrationStage.Analysis);
const info = migration.createProgram(tsconfigPath, fs);
modifyProgramInfoToEnsureNonOverlappingFiles(tsconfigPath, info, compilationUnitAssignments);
config.afterProgramCreation?.(info, fs, exports.MigrationStage.Analysis);
config.beforeUnitAnalysis?.(tsconfigPath);
unitResults.push(await migration.analyze(info));
}
config.afterAllAnalyzed?.();
const combined = await synchronouslyCombineUnitData(migration, unitResults);
if (combined === null) {
config.afterAnalysisFailure?.();
return;
}
const globalMeta = await migration.globalMeta(combined);
let replacements;
if (isFunnelMigration) {
replacements = (await migration.migrate(globalMeta)).replacements;
}
else {
replacements = [];
for (const tsconfigPath of tsconfigPaths) {
config.beforeProgramCreation?.(tsconfigPath, exports.MigrationStage.Migrate);
const info = migration.createProgram(tsconfigPath, fs);
modifyProgramInfoToEnsureNonOverlappingFiles(tsconfigPath, info, compilationUnitAssignments);
config.afterProgramCreation?.(info, fs, exports.MigrationStage.Migrate);
const result = await migration.migrate(globalMeta, info);
replacements.push(...result.replacements);
}
}
const replacementsPerFile = new Map();
const changesPerFile = groupReplacementsByFile(replacements);
for (const [file, changes] of changesPerFile) {
if (!replacementsPerFile.has(file)) {
replacementsPerFile.set(file, changes);
}
}
for (const [file, changes] of replacementsPerFile) {
const recorder = config.tree.beginUpdate(file);
for (const c of changes) {
recorder
.remove(c.data.position, c.data.end - c.data.position)
.insertRight(c.data.position, c.data.toInsert);
}
config.tree.commitUpdate(recorder);
}
config.whenDone?.(await migration.stats(globalMeta));
}
/**
* Special logic for devkit migrations. In the Angular CLI, or in 3P precisely,
* projects can have tsconfigs with overlapping source files. i.e. two tsconfigs
* like e.g. build or test include the same `ts.SourceFile` (`.ts`). Migrations
* should never have 2+ compilation units with overlapping source files as this
* can result in duplicated replacements or analysis hence we only ever assign a
* source file to a compilation unit *once*.
*
* Note that this is fine as we expect Tsurge migrations to work together as
* isolated compilation units so it shouldn't matter if worst case a `.ts`
* file ends up in the e.g. test program.
*/
function modifyProgramInfoToEnsureNonOverlappingFiles(tsconfigPath, info, compilationUnitAssignments) {
const sourceFiles = [];
for (const sf of info.sourceFiles) {
const assignment = compilationUnitAssignments.get(sf.fileName);
// File is already assigned to a different compilation unit.
if (assignment !== undefined && assignment !== tsconfigPath) {
continue;
}
compilationUnitAssignments.set(sf.fileName, tsconfigPath);
sourceFiles.push(sf);
}
info.sourceFiles = sourceFiles;
}
/** A text replacement for the given file. */
class Replacement {
projectFile;
update;
constructor(projectFile, update) {
this.projectFile = projectFile;
this.update = update;
}
}
/** An isolated text update that may be applied to a file. */
class TextUpdate {
data;
constructor(data) {
this.data = data;
}
}
/** Confirms that the given data `T` is serializable. */
function confirmAsSerializable(data) {
return data;
}
/**
* Gets a project file instance for the given file.
*
* Use this helper for dealing with project paths throughout your
* migration. The return type is serializable.
*
* See {@link ProjectFile}.
*/
function projectFile(file, { sortedRootDirs, projectRoot }) {
const fs = project_tsconfig_paths.getFileSystem();
const filePath = fs.resolve(typeof file === 'string' ? file : file.fileName);
// Sorted root directories are sorted longest to shortest. First match
// is the appropriate root directory for ID computation.
for (const rootDir of sortedRootDirs) {
if (!isWithinBasePath(fs, rootDir, filePath)) {
continue;
}
return {
id: fs.relative(rootDir, filePath),
rootRelativePath: fs.relative(projectRoot, filePath),
};
}
// E.g. project directory may be `src/`, but files may be looked up
// from `node_modules/`. This is fine, but in those cases, no root
// directory matches.
const rootRelativePath = fs.relative(projectRoot, filePath);
return {
id: rootRelativePath,
rootRelativePath: rootRelativePath,
};
}
/**
* Whether `path` is a descendant of the `base`?
* E.g. `a/b/c` is within `a/b` but not within `a/x`.
*/
function isWithinBasePath(fs, base, path) {
return project_tsconfig_paths.isLocalRelativePath(fs.relative(base, path));
}
exports.Replacement = Replacement;
exports.TextUpdate = TextUpdate;
exports.TsurgeComplexMigration = TsurgeComplexMigration;
exports.TsurgeFunnelMigration = TsurgeFunnelMigration;
exports.confirmAsSerializable = confirmAsSerializable;
exports.projectFile = projectFile;
exports.runMigrationInDevkit = runMigrationInDevkit;
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
+3 -3
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
@@ -9,8 +9,8 @@
var schematics = require('@angular-devkit/schematics');
var fs = require('fs');
var p = require('path');
var compiler_host = require('./compiler_host-BGZcziuy.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
var compiler_host = require('./compiler_host-AFZotBLM.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
var ts = require('typescript');
var property_name = require('./property_name-BBwFuqMe.cjs');
require('os');
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
@@ -8,11 +8,11 @@
var ts = require('typescript');
require('os');
require('./project_tsconfig_paths-CaweCOep.cjs');
require('./index-BXjkzENj.cjs');
require('./project_tsconfig_paths-D2eb40pS.cjs');
require('./index-kR-YjYku.cjs');
require('path');
require('node:path');
var project_paths = require('./project_paths-Dr30Du8j.cjs');
var project_paths = require('./project_paths-Bq_k0pof.cjs');
var imports = require('./imports-CIX-JgAN.cjs');
var symbol = require('./symbol-VPWguRxr.cjs');
require('@angular-devkit/core');
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
@@ -8,11 +8,11 @@
var ts = require('typescript');
require('os');
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
require('./index-BXjkzENj.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
require('./index-kR-YjYku.cjs');
require('path');
require('node:path');
var project_paths = require('./project_paths-Dr30Du8j.cjs');
var project_paths = require('./project_paths-Bq_k0pof.cjs');
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
var property_name = require('./property_name-BBwFuqMe.cjs');
require('@angular-devkit/core');
+7 -7
View File
@@ -1,23 +1,23 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
'use strict';
var migrate_ts_type_references = require('./migrate_ts_type_references-7eTqUKA-.cjs');
var migrate_ts_type_references = require('./migrate_ts_type_references-BgYfSnnL.cjs');
var ts = require('typescript');
require('os');
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
var index$1 = require('./index-BXjkzENj.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
var index$1 = require('./index-kR-YjYku.cjs');
require('path');
require('node:path');
var project_paths = require('./project_paths-Dr30Du8j.cjs');
var index = require('./index-BmMfRg5d.cjs');
var project_paths = require('./project_paths-Bq_k0pof.cjs');
var index = require('./index-CD4aCRVu.cjs');
var assert$1 = require('assert');
var assert = require('node:assert');
var apply_import_manager = require('./apply_import_manager-CPOYeJ7t.cjs');
var apply_import_manager = require('./apply_import_manager-Clb1Y0Nb.cjs');
require('@angular-devkit/core');
require('node:path/posix');
require('./leading_space-D9nQ8UQC.cjs');
@@ -1,23 +1,23 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
'use strict';
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
var ts = require('typescript');
require('os');
var index$1 = require('./index-BXjkzENj.cjs');
var index$1 = require('./index-kR-YjYku.cjs');
require('path');
require('node:path');
var project_paths = require('./project_paths-Dr30Du8j.cjs');
var apply_import_manager = require('./apply_import_manager-CPOYeJ7t.cjs');
var migrate_ts_type_references = require('./migrate_ts_type_references-7eTqUKA-.cjs');
var project_paths = require('./project_paths-Bq_k0pof.cjs');
var apply_import_manager = require('./apply_import_manager-Clb1Y0Nb.cjs');
var migrate_ts_type_references = require('./migrate_ts_type_references-BgYfSnnL.cjs');
var assert = require('assert');
require('node:assert');
var index = require('./index-BmMfRg5d.cjs');
var index = require('./index-CD4aCRVu.cjs');
require('@angular-devkit/core');
require('node:path/posix');
require('fs');
+7 -7
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
@@ -10,7 +10,7 @@ var schematics = require('@angular-devkit/schematics');
var signalQueriesMigration = require('./signal-queries-migration.cjs');
var signalInputMigration = require('./signal-input-migration.cjs');
var outputMigration = require('./output-migration.cjs');
require('./project_tsconfig_paths-CaweCOep.cjs');
require('./project_tsconfig_paths-D2eb40pS.cjs');
require('typescript');
require('os');
require('fs');
@@ -18,14 +18,14 @@ require('module');
require('path');
require('url');
require('@angular-devkit/core');
require('./index-BXjkzENj.cjs');
require('./index-kR-YjYku.cjs');
require('node:path');
require('./project_paths-Dr30Du8j.cjs');
require('./project_paths-Bq_k0pof.cjs');
require('node:path/posix');
require('./apply_import_manager-CPOYeJ7t.cjs');
require('./migrate_ts_type_references-7eTqUKA-.cjs');
require('./apply_import_manager-Clb1Y0Nb.cjs');
require('./migrate_ts_type_references-BgYfSnnL.cjs');
require('assert');
require('./index-BmMfRg5d.cjs');
require('./index-CD4aCRVu.cjs');
require('./leading_space-D9nQ8UQC.cjs');
require('node:assert');
+4 -4
View File
@@ -1,18 +1,18 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
'use strict';
var schematics = require('@angular-devkit/schematics');
var index = require('./index-BXjkzENj.cjs');
var index = require('./index-kR-YjYku.cjs');
var fs = require('fs');
var p = require('path');
var ts = require('typescript');
var compiler_host = require('./compiler_host-BGZcziuy.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-CaweCOep.cjs');
var compiler_host = require('./compiler_host-AFZotBLM.cjs');
var project_tsconfig_paths = require('./project_tsconfig_paths-D2eb40pS.cjs');
var ng_decorators = require('./ng_decorators-B5HCqr20.cjs');
var nodes = require('./nodes-B16H9JUd.cjs');
var symbol = require('./symbol-VPWguRxr.cjs');
+1 -1
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
+4 -4
View File
@@ -1,6 +1,6 @@
'use strict';
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.io/
* License: MIT
*/
@@ -8,11 +8,11 @@
var ts = require('typescript');
require('os');
require('./project_tsconfig_paths-CaweCOep.cjs');
require('./index-BXjkzENj.cjs');
require('./project_tsconfig_paths-D2eb40pS.cjs');
require('./index-kR-YjYku.cjs');
require('path');
require('node:path');
var project_paths = require('./project_paths-Dr30Du8j.cjs');
var project_paths = require('./project_paths-Bq_k0pof.cjs');
var imports = require('./imports-CIX-JgAN.cjs');
var symbol = require('./symbol-VPWguRxr.cjs');
require('@angular-devkit/core');
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/
+1 -1
View File
@@ -1,5 +1,5 @@
/**
* @license Angular v20.3.11
* @license Angular v20.3.21
* (c) 2010-2025 Google LLC. https://angular.dev/
* License: MIT
*/