@angular/core 22.0.0-next.4 → 22.0.0-next.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/_attribute-chunk.mjs +1 -1
- package/fesm2022/_debug_node-chunk.mjs +96 -11
- package/fesm2022/_debug_node-chunk.mjs.map +1 -1
- package/fesm2022/_effect-chunk.mjs +1 -1
- package/fesm2022/_not_found-chunk.mjs +1 -1
- package/fesm2022/_pending_tasks-chunk.mjs +2 -2
- package/fesm2022/_pending_tasks-chunk.mjs.map +1 -1
- package/fesm2022/_resource-chunk.mjs +1 -1
- package/fesm2022/_resource-chunk.mjs.map +1 -1
- package/fesm2022/_untracked-chunk.mjs +1 -1
- package/fesm2022/_weak_ref-chunk.mjs +1 -1
- package/fesm2022/core.mjs +40 -17
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/primitives-di.mjs +1 -1
- package/fesm2022/primitives-event-dispatch.mjs +1 -1
- package/fesm2022/primitives-signals.mjs +1 -1
- package/fesm2022/rxjs-interop.mjs +1 -1
- package/fesm2022/testing.mjs +1 -1
- package/fesm2022/testing.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/bundles/apply_import_manager-CxA_YYgB.cjs +1 -1
- package/schematics/bundles/change-detection-eager.cjs +1 -1
- package/schematics/bundles/cleanup-unused-imports.cjs +1 -1
- package/schematics/bundles/common-to-standalone-migration.cjs +1 -1
- package/schematics/bundles/compiler_host-CY14HvaP.cjs +1 -1
- package/schematics/bundles/control-flow-migration.cjs +1 -1
- package/schematics/bundles/http-xhr-backend.cjs +1 -1
- package/schematics/bundles/imports-CKV-ITqD.cjs +1 -1
- package/schematics/bundles/index-BtLcQH8g.cjs +1 -1
- package/schematics/bundles/inject-migration.cjs +26 -18
- package/schematics/bundles/leading_space-BTPRV0wu.cjs +1 -1
- package/schematics/bundles/migrate_ts_type_references-Dp33iyGx.cjs +1 -1
- package/schematics/bundles/ng_component_template-DPAF1aEA.cjs +1 -1
- package/schematics/bundles/ng_decorators-IVztR9rk.cjs +1 -1
- package/schematics/bundles/ngclass-to-class-migration.cjs +1 -1
- package/schematics/bundles/ngstyle-to-style-migration.cjs +1 -1
- package/schematics/bundles/nodes-ZSQ7WZRB.cjs +1 -1
- package/schematics/bundles/output-migration.cjs +1 -1
- package/schematics/bundles/parse_html-C8eKA9px.cjs +1 -1
- package/schematics/bundles/project_paths-D2V-Uh2L.cjs +1 -1
- package/schematics/bundles/project_tsconfig_paths-DkkMibv-.cjs +1 -1
- package/schematics/bundles/property_name-BCpALNpZ.cjs +1 -1
- package/schematics/bundles/route-lazy-loading.cjs +1 -1
- package/schematics/bundles/router-testing-module-migration.cjs +1 -1
- package/schematics/bundles/self-closing-tags-migration.cjs +1 -1
- package/schematics/bundles/signal-input-migration.cjs +1 -1
- package/schematics/bundles/signal-queries-migration.cjs +1 -1
- package/schematics/bundles/signals.cjs +1 -1
- package/schematics/bundles/standalone-migration.cjs +1 -1
- package/types/_api-chunk.d.ts +7 -2
- package/types/_chrome_dev_tools_performance-chunk.d.ts +1 -1
- package/types/_debug_node-chunk.d.ts +13 -12
- package/types/_effect-chunk.d.ts +1 -1
- package/types/_event_dispatcher-chunk.d.ts +1 -1
- package/types/_formatter-chunk.d.ts +1 -1
- package/types/_weak_ref-chunk.d.ts +1 -1
- package/types/core.d.ts +13 -21
- package/types/primitives-di.d.ts +1 -1
- package/types/primitives-event-dispatch.d.ts +1 -1
- package/types/primitives-signals.d.ts +1 -1
- package/types/rxjs-interop.d.ts +1 -1
- package/types/testing.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/core",
|
|
3
|
-
"version": "22.0.0-next.
|
|
3
|
+
"version": "22.0.0-next.5",
|
|
4
4
|
"description": "Angular - the core framework",
|
|
5
5
|
"author": "angular",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"tslib": "^2.3.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@angular/compiler": "22.0.0-next.
|
|
49
|
+
"@angular/compiler": "22.0.0-next.5",
|
|
50
50
|
"rxjs": "^6.5.3 || ^7.4.0",
|
|
51
51
|
"zone.js": "~0.15.0 || ~0.16.0"
|
|
52
52
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
|
-
* @license Angular v22.0.0-next.
|
|
3
|
+
* @license Angular v22.0.0-next.5
|
|
4
4
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
@@ -1321,31 +1321,37 @@ function isStringType(node, checker) {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
|
|
1323
1323
|
function migrate(options) {
|
|
1324
|
-
return async (tree) => {
|
|
1325
|
-
const { buildPaths, testPaths } = await project_tsconfig_paths.getProjectTsConfigPaths(tree);
|
|
1324
|
+
return async (tree, context) => {
|
|
1326
1325
|
const basePath = process.cwd();
|
|
1326
|
+
let pathToMigrate;
|
|
1327
|
+
if (options.path) {
|
|
1328
|
+
if (options.path.startsWith('..')) {
|
|
1329
|
+
throw new schematics.SchematicsException('Cannot run inject migration outside of the current project.');
|
|
1330
|
+
}
|
|
1331
|
+
pathToMigrate = compiler_host.normalizePath(path.join(basePath, options.path));
|
|
1332
|
+
}
|
|
1333
|
+
const { buildPaths, testPaths } = await project_tsconfig_paths.getProjectTsConfigPaths(tree);
|
|
1327
1334
|
const allPaths = [...buildPaths, ...testPaths];
|
|
1328
|
-
const pathToMigrate = compiler_host.normalizePath(path.join(basePath, options.path));
|
|
1329
1335
|
if (!allPaths.length) {
|
|
1330
|
-
|
|
1336
|
+
context.logger.warn('Could not find any tsconfig file. Cannot run the inject migration.');
|
|
1337
|
+
return;
|
|
1331
1338
|
}
|
|
1339
|
+
let sourceFilesCount = 0;
|
|
1332
1340
|
for (const tsconfigPath of allPaths) {
|
|
1333
|
-
|
|
1341
|
+
const program = compiler_host.createMigrationProgram(tree, tsconfigPath, basePath);
|
|
1342
|
+
const sourceFiles = program
|
|
1343
|
+
.getSourceFiles()
|
|
1344
|
+
.filter((sourceFile) => (pathToMigrate ? sourceFile.fileName.startsWith(pathToMigrate) : true) &&
|
|
1345
|
+
compiler_host.canMigrateFile(basePath, sourceFile, program));
|
|
1346
|
+
sourceFilesCount += runInjectMigration(tree, sourceFiles, basePath, options);
|
|
1347
|
+
}
|
|
1348
|
+
if (sourceFilesCount === 0) {
|
|
1349
|
+
context.logger.warn('Inject migration did not find any files to migrate');
|
|
1334
1350
|
}
|
|
1335
1351
|
};
|
|
1336
1352
|
}
|
|
1337
|
-
function runInjectMigration(tree,
|
|
1338
|
-
|
|
1339
|
-
throw new schematics.SchematicsException('Cannot run inject migration outside of the current project.');
|
|
1340
|
-
}
|
|
1341
|
-
const program = compiler_host.createMigrationProgram(tree, tsconfigPath, basePath);
|
|
1342
|
-
const sourceFiles = program
|
|
1343
|
-
.getSourceFiles()
|
|
1344
|
-
.filter((sourceFile) => sourceFile.fileName.startsWith(pathToMigrate) &&
|
|
1345
|
-
compiler_host.canMigrateFile(basePath, sourceFile, program));
|
|
1346
|
-
if (sourceFiles.length === 0) {
|
|
1347
|
-
throw new schematics.SchematicsException(`Could not find any files to migrate under the path ${pathToMigrate}. Cannot run the inject migration.`);
|
|
1348
|
-
}
|
|
1353
|
+
function runInjectMigration(tree, sourceFiles, basePath, schematicOptions) {
|
|
1354
|
+
let migratedFiles = 0;
|
|
1349
1355
|
for (const sourceFile of sourceFiles) {
|
|
1350
1356
|
const changes = migrateFile(sourceFile, schematicOptions);
|
|
1351
1357
|
if (changes.length > 0) {
|
|
@@ -1357,8 +1363,10 @@ function runInjectMigration(tree, tsconfigPath, basePath, pathToMigrate, schemat
|
|
|
1357
1363
|
update.insertRight(change.start, change.text);
|
|
1358
1364
|
}
|
|
1359
1365
|
tree.commitUpdate(update);
|
|
1366
|
+
migratedFiles++;
|
|
1360
1367
|
}
|
|
1361
1368
|
}
|
|
1369
|
+
return migratedFiles;
|
|
1362
1370
|
}
|
|
1363
1371
|
|
|
1364
1372
|
exports.migrate = migrate;
|
package/types/_api-chunk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v22.0.0-next.
|
|
2
|
+
* @license Angular v22.0.0-next.5
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -349,6 +349,11 @@ interface DebouncedOptions<T> {
|
|
|
349
349
|
/** The equality function to use for comparing values. */
|
|
350
350
|
equal?: ValueEqualityFn<T>;
|
|
351
351
|
}
|
|
352
|
+
/**
|
|
353
|
+
* Represents the wait condition for item debouncing.
|
|
354
|
+
* Can be a number of milliseconds or a function that returns a Promise.
|
|
355
|
+
*/
|
|
356
|
+
type DebounceTimer<T> = number | ((value: T, lastValue: ResourceSnapshot<T>) => Promise<void> | void);
|
|
352
357
|
|
|
353
358
|
export { OutputEmitterRef, ResourceDependencyError, ResourceParamsStatus, getOutputDestroyRef, output };
|
|
354
|
-
export type { BaseResourceOptions, DebouncedOptions, OutputOptions, PromiseResourceOptions, Resource, ResourceLoader, ResourceLoaderParams, ResourceOptions, ResourceParamsContext, ResourceRef, ResourceSnapshot, ResourceStatus, ResourceStreamItem, ResourceStreamingLoader, StreamingResourceOptions, WritableResource };
|
|
359
|
+
export type { BaseResourceOptions, DebounceTimer, DebouncedOptions, OutputOptions, PromiseResourceOptions, Resource, ResourceLoader, ResourceLoaderParams, ResourceOptions, ResourceParamsContext, ResourceRef, ResourceSnapshot, ResourceStatus, ResourceStreamItem, ResourceStreamingLoader, StreamingResourceOptions, WritableResource };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v22.0.0-next.
|
|
2
|
+
* @license Angular v22.0.0-next.5
|
|
3
3
|
* (c) 2010-2026 Google LLC. https://angular.dev/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -2337,13 +2337,6 @@ type FactoryFn<T> = {
|
|
|
2337
2337
|
(t?: undefined): T;
|
|
2338
2338
|
};
|
|
2339
2339
|
|
|
2340
|
-
/** Flags describing an input for a directive. */
|
|
2341
|
-
declare enum InputFlags {
|
|
2342
|
-
None = 0,
|
|
2343
|
-
SignalBased = 1,
|
|
2344
|
-
HasDecoratorInputTransform = 2
|
|
2345
|
-
}
|
|
2346
|
-
|
|
2347
2340
|
/**
|
|
2348
2341
|
* A control directive definition that captures control-related behavior for a directive.
|
|
2349
2342
|
*
|
|
@@ -2491,7 +2484,7 @@ interface DirectiveDef<T> {
|
|
|
2491
2484
|
*/
|
|
2492
2485
|
readonly inputs: Record<string, [
|
|
2493
2486
|
minifiedName: string,
|
|
2494
|
-
flags:
|
|
2487
|
+
flags: number,
|
|
2495
2488
|
transform: InputTransformFunction | null
|
|
2496
2489
|
]>;
|
|
2497
2490
|
/**
|
|
@@ -2499,7 +2492,7 @@ interface DirectiveDef<T> {
|
|
|
2499
2492
|
* used to do further processing after the `inputs` have been inverted.
|
|
2500
2493
|
*/
|
|
2501
2494
|
readonly inputConfig: {
|
|
2502
|
-
[P in keyof T]?: string | [
|
|
2495
|
+
[P in keyof T]?: string | [number, string, string?, InputTransformFunction?];
|
|
2503
2496
|
};
|
|
2504
2497
|
/**
|
|
2505
2498
|
* @deprecated This is only here because `NgOnChanges` incorrectly uses declared name instead of
|
|
@@ -2616,6 +2609,11 @@ interface DirectiveDef<T> {
|
|
|
2616
2609
|
*/
|
|
2617
2610
|
hostDirectives: (HostDirectiveDef | (() => HostDirectiveConfig[]))[] | null;
|
|
2618
2611
|
controlDef: ControlDirectiveDef | null;
|
|
2612
|
+
/**
|
|
2613
|
+
* Cache of inputs that this custom control directive covers,
|
|
2614
|
+
* used by the signal forms system.
|
|
2615
|
+
*/
|
|
2616
|
+
signalFormsInputPresence: Record<string, boolean> | null;
|
|
2619
2617
|
setInput: (<U extends T>(this: DirectiveDef<U>, instance: U, inputSignalNode: null | InputSignalNode<unknown, unknown>, value: any, publicName: string, privateName: string) => void) | null;
|
|
2620
2618
|
}
|
|
2621
2619
|
/**
|
|
@@ -6627,6 +6625,9 @@ interface ComponentDecorator {
|
|
|
6627
6625
|
* life-cycle hooks. For more information, see the
|
|
6628
6626
|
* [Lifecycle Hooks](guide/components/lifecycle) guide.
|
|
6629
6627
|
*
|
|
6628
|
+
* HELPFUL: You may not use this interface to describe a class that is a component. Decorators do not affect the typing of the decorated classes.
|
|
6629
|
+
* Use `Type<unknown>` instead of `Type<Component>`.
|
|
6630
|
+
*
|
|
6630
6631
|
* @usageNotes
|
|
6631
6632
|
*
|
|
6632
6633
|
* ### Setting component inputs
|
|
@@ -6961,7 +6962,7 @@ interface InputDecorator {
|
|
|
6961
6962
|
* class BankAccount {
|
|
6962
6963
|
* // This property is bound using its original name.
|
|
6963
6964
|
* // Defining argument required as true inside the Input Decorator
|
|
6964
|
-
* // makes this property
|
|
6965
|
+
* // makes this property declaration as mandatory
|
|
6965
6966
|
* @Input({ required: true }) bankName!: string;
|
|
6966
6967
|
* // Argument alias makes this property value is bound to a different property name
|
|
6967
6968
|
* // when this component is instantiated in a template.
|
|
@@ -7575,5 +7576,5 @@ declare function getDebugNode(nativeNode: any): DebugNode | null;
|
|
|
7575
7576
|
*/
|
|
7576
7577
|
type Predicate<T> = (value: T) => boolean;
|
|
7577
7578
|
|
|
7578
|
-
export { ANIMATIONS_DISABLED, APP_BOOTSTRAP_LISTENER, AfterRenderManager, AnimationRendererType, ApplicationRef, AttributeMarker, COMPILER_OPTIONS, CONTAINER_HEADER_OFFSET, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionScheduler, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, DebugElement, DebugEventListener, DebugNode, DeferBlockBehavior, DeferBlockState, Directive, EffectScheduler, ElementRef, EmbeddedViewRef, EnvironmentInjector, EventEmitter, HostBinding, HostListener, INJECTOR_SCOPE, Input,
|
|
7579
|
+
export { ANIMATIONS_DISABLED, APP_BOOTSTRAP_LISTENER, AfterRenderManager, AnimationRendererType, ApplicationRef, AttributeMarker, COMPILER_OPTIONS, CONTAINER_HEADER_OFFSET, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionScheduler, ChangeDetectionStrategy, ChangeDetectorRef, Compiler, CompilerFactory, Component, ComponentFactory, ComponentFactoryResolver, ComponentRef, DebugElement, DebugEventListener, DebugNode, DeferBlockBehavior, DeferBlockState, Directive, EffectScheduler, ElementRef, EmbeddedViewRef, EnvironmentInjector, EventEmitter, HostBinding, HostListener, INJECTOR_SCOPE, Input, MAX_ANIMATION_TIMEOUT, ModuleWithComponentFactories, NG_INJ_DEF, NG_PROV_DEF, NO_ERRORS_SCHEMA, NavigateEvent, Navigation, NavigationCurrentEntryChangeEvent, NavigationDestination, NavigationHistoryEntry, NavigationTransition, NgModule, NgModuleFactory, NgModuleRef, NgZone, NoopNgZone, NotificationSource, Output, PROVIDED_ZONELESS, Pipe, PlatformRef, QueryList, R3Injector, RenderFlags, Renderer2, RendererFactory2, RendererStyleFlags2, Sanitizer, SecurityContext, TDeferDetailsFlags, TracingAction, TracingService, ViewEncapsulation, ViewRef, ZONELESS_ENABLED, asNativeElements, effect, getDebugNode, getDeferBlocks, getInjectableDef, injectChangeDetectorRef, inputBinding, isBoundToModule, isInjectable, outputBinding, twoWayBinding, ɵɵdefineInjectable, ɵɵdefineInjector };
|
|
7579
7580
|
export type { AfterRenderRef, AnimationCallbackEvent, AnimationClassBindingFn, AnimationFunction, Binding, BootstrapOptions, ClassDebugInfo, CompilerOptions, ComponentDecorator, ComponentDef, ComponentDefFeature, ComponentTemplate, ComponentType, ContentQueriesFunction, ControlDirectiveHost, CreateEffectOptions, CssSelectorList, DeferBlockConfig, DeferBlockDependencyInterceptor, DeferBlockDetails, DehydratedDeferBlock, DependencyResolverFn, DependencyTypeList, DirectiveDecorator, DirectiveDef, DirectiveDefFeature, DirectiveType, DirectiveWithBindings, EffectCleanupFn, EffectCleanupRegisterFn, EffectRef, GlobalTargetResolver, HostBindingDecorator, HostBindingsFunction, HostDirectiveConfig, HostListenerDecorator, InjectableType, InjectorType, InputDecorator, InputSignalNode, InputTransformFunction, InternalNgModuleRef, LContainer, LView, ListenerOptions, LocalRefExtractor, NavigationInterceptOptions, NavigationNavigateOptions, NavigationOptions, NavigationReloadOptions, NavigationResult, NavigationTypeString, NavigationUpdateCurrentEntryOptions, NgModuleDecorator, NgModuleScopeInfoFromDecorator, OpaqueViewState, OutputDecorator, PipeDecorator, PipeDef, PipeType, Predicate, RElement, RNode, RawScopeInfoFromDecorator, RendererType2, SanitizerFn, SchemaMetadata, TAttributes, TDeferBlockDetails, TNode, TView, TracingSnapshot, TrustedHTML, TrustedScript, TrustedScriptURL, TypeDecorator, TypeOrFactory, ViewQueriesFunction, ɵɵComponentDeclaration, ɵɵDirectiveDeclaration, ɵɵFactoryDeclaration, ɵɵInjectableDeclaration, ɵɵInjectorDeclaration, ɵɵInjectorDef, ɵɵNgModuleDeclaration, ɵɵPipeDeclaration };
|
package/types/_effect-chunk.d.ts
CHANGED