@angular/upgrade 19.1.0-next.1 → 19.1.0-next.2
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/static/testing.mjs +9 -11
- package/fesm2022/static/testing.mjs.map +1 -1
- package/fesm2022/static.mjs +9 -9
- package/fesm2022/static.mjs.map +1 -1
- package/fesm2022/upgrade.mjs +6 -6
- package/fesm2022/upgrade.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/package.json +5 -5
- package/static/index.d.ts +1 -1
- package/static/testing/index.d.ts +5 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v19.1.0-next.
|
|
2
|
+
* @license Angular v19.1.0-next.2
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -18,11 +18,11 @@ class AngularTestingModule {
|
|
|
18
18
|
constructor(i) {
|
|
19
19
|
injector = i;
|
|
20
20
|
}
|
|
21
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.
|
|
22
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0-next.
|
|
23
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0-next.
|
|
21
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: AngularTestingModule, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
22
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0-next.2", ngImport: i0, type: AngularTestingModule });
|
|
23
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: AngularTestingModule, providers: [{ provide: ɵconstants.$INJECTOR, useFactory: $injectorFactory }] });
|
|
24
24
|
}
|
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.
|
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: AngularTestingModule, decorators: [{
|
|
26
26
|
type: NgModule,
|
|
27
27
|
args: [{ providers: [{ provide: ɵconstants.$INJECTOR, useFactory: $injectorFactory }] }]
|
|
28
28
|
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
@@ -40,7 +40,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.1",
|
|
|
40
40
|
* The `Ng2AppModule` is the Angular part of our hybrid application and the `ng1AppModule` is the
|
|
41
41
|
* AngularJS part.
|
|
42
42
|
*
|
|
43
|
-
*
|
|
43
|
+
* {@example upgrade/static/ts/full/module.spec.ts region='angular-setup'}
|
|
44
44
|
*
|
|
45
45
|
* Once this is done we can get hold of services via the Angular `Injector` as normal.
|
|
46
46
|
* Services that are (or have dependencies on) an upgraded AngularJS service, will be instantiated
|
|
@@ -49,7 +49,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.1",
|
|
|
49
49
|
* In the following code snippet, `HeroesService` is an Angular service that depends upon an
|
|
50
50
|
* AngularJS service, `titleCase`.
|
|
51
51
|
*
|
|
52
|
-
*
|
|
52
|
+
* {@example upgrade/static/ts/full/module.spec.ts region='angular-spec'}
|
|
53
53
|
*
|
|
54
54
|
* <div class="docs-alert docs-alert-important">
|
|
55
55
|
*
|
|
@@ -116,8 +116,7 @@ function createAngularTestingModule(angularJSModules, strictDi) {
|
|
|
116
116
|
* The AngularJS `ng1AppModule`, which is the AngularJS part of our hybrid application and the
|
|
117
117
|
* `Ng2AppModule`, which is the Angular part.
|
|
118
118
|
*
|
|
119
|
-
*
|
|
120
|
-
* region="angularjs-setup"></code-example>
|
|
119
|
+
* {@example upgrade/static/ts/full/module.spec.ts region='angularjs-setup'}
|
|
121
120
|
*
|
|
122
121
|
* Once this is done we can get hold of services via the AngularJS `$injector` as normal.
|
|
123
122
|
* Services that are (or have dependencies on) a downgraded Angular service, will be instantiated as
|
|
@@ -126,8 +125,7 @@ function createAngularTestingModule(angularJSModules, strictDi) {
|
|
|
126
125
|
* In the following code snippet, `heroesService` is a downgraded Angular service that we are
|
|
127
126
|
* accessing from AngularJS.
|
|
128
127
|
*
|
|
129
|
-
*
|
|
130
|
-
* region="angularjs-spec"></code-example>
|
|
128
|
+
* {@example upgrade/static/ts/full/module.spec.ts region='angularjs-spec'}
|
|
131
129
|
*
|
|
132
130
|
* <div class="docs-alert docs-alert-important">
|
|
133
131
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../../../packages/upgrade/static/testing/src/create_angular_testing_module.ts","../../../../../../../packages/upgrade/static/testing/src/create_angularjs_testing_module.ts","../../../../../../../packages/upgrade/static/testing/testing.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 {Injector, NgModule, Type} from '@angular/core';\nimport {ɵangular1 as angular, ɵconstants} from '@angular/upgrade/static';\n\nimport {UpgradeAppType} from '../../../src/common/src/util';\n\nlet $injector: angular.IInjectorService | null = null;\nlet injector: Injector;\n\nexport function $injectorFactory() {\n return $injector;\n}\n\n@NgModule({providers: [{provide: ɵconstants.$INJECTOR, useFactory: $injectorFactory}]})\nexport class AngularTestingModule {\n constructor(i: Injector) {\n injector = i;\n }\n}\n\n/**\n * A helper function to use when unit testing Angular services that depend upon upgraded AngularJS\n * services.\n *\n * This function returns an `NgModule` decorated class that is configured to wire up the Angular\n * and AngularJS injectors without the need to actually bootstrap a hybrid application.\n * This makes it simpler and faster to unit test services.\n *\n * Use the returned class as an \"import\" when configuring the `TestBed`.\n *\n * In the following code snippet, we are configuring the TestBed with two imports.\n * The `Ng2AppModule` is the Angular part of our hybrid application and the `ng1AppModule` is the\n * AngularJS part.\n *\n *
|
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../../../packages/upgrade/static/testing/src/create_angular_testing_module.ts","../../../../../../../packages/upgrade/static/testing/src/create_angularjs_testing_module.ts","../../../../../../../packages/upgrade/static/testing/testing.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 {Injector, NgModule, Type} from '@angular/core';\nimport {ɵangular1 as angular, ɵconstants} from '@angular/upgrade/static';\n\nimport {UpgradeAppType} from '../../../src/common/src/util';\n\nlet $injector: angular.IInjectorService | null = null;\nlet injector: Injector;\n\nexport function $injectorFactory() {\n return $injector;\n}\n\n@NgModule({providers: [{provide: ɵconstants.$INJECTOR, useFactory: $injectorFactory}]})\nexport class AngularTestingModule {\n constructor(i: Injector) {\n injector = i;\n }\n}\n\n/**\n * A helper function to use when unit testing Angular services that depend upon upgraded AngularJS\n * services.\n *\n * This function returns an `NgModule` decorated class that is configured to wire up the Angular\n * and AngularJS injectors without the need to actually bootstrap a hybrid application.\n * This makes it simpler and faster to unit test services.\n *\n * Use the returned class as an \"import\" when configuring the `TestBed`.\n *\n * In the following code snippet, we are configuring the TestBed with two imports.\n * The `Ng2AppModule` is the Angular part of our hybrid application and the `ng1AppModule` is the\n * AngularJS part.\n *\n * {@example upgrade/static/ts/full/module.spec.ts region='angular-setup'}\n *\n * Once this is done we can get hold of services via the Angular `Injector` as normal.\n * Services that are (or have dependencies on) an upgraded AngularJS service, will be instantiated\n * as needed by the AngularJS `$injector`.\n *\n * In the following code snippet, `HeroesService` is an Angular service that depends upon an\n * AngularJS service, `titleCase`.\n *\n * {@example upgrade/static/ts/full/module.spec.ts region='angular-spec'}\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * This helper is for testing services not Components.\n * For Component testing you must still bootstrap a hybrid app. See `UpgradeModule` or\n * `downgradeModule` for more information.\n *\n * </div>\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * The resulting configuration does not wire up AngularJS digests to Zone hooks. It is the\n * responsibility of the test writer to call `$rootScope.$apply`, as necessary, to trigger\n * AngularJS handlers of async events from Angular.\n *\n * </div>\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * The helper sets up global variables to hold the shared Angular and AngularJS injectors.\n *\n * * Only call this helper once per spec.\n * * Do not use `createAngularTestingModule` in the same spec as `createAngularJSTestingModule`.\n *\n * </div>\n *\n * Here is the example application and its unit tests that use `createAngularTestingModule`\n * and `createAngularJSTestingModule`.\n *\n * <code-tabs>\n * <code-pane header=\"module.spec.ts\" path=\"upgrade/static/ts/full/module.spec.ts\"></code-pane>\n * <code-pane header=\"module.ts\" path=\"upgrade/static/ts/full/module.ts\"></code-pane>\n * </code-tabs>\n *\n *\n * @param angularJSModules a collection of the names of AngularJS modules to include in the\n * configuration.\n * @param [strictDi] whether the AngularJS injector should have `strictDI` enabled.\n *\n * @publicApi\n */\nexport function createAngularTestingModule(\n angularJSModules: string[],\n strictDi?: boolean,\n): Type<any> {\n angular\n .module_('$$angularJSTestingModule', angularJSModules)\n .constant(ɵconstants.UPGRADE_APP_TYPE_KEY, UpgradeAppType.Static)\n .factory(ɵconstants.INJECTOR_KEY, () => injector);\n $injector = angular.injector(['ng', '$$angularJSTestingModule'], strictDi);\n return AngularTestingModule;\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\nimport {Injector} from '@angular/core';\nimport {TestBed} from '@angular/core/testing';\nimport {ɵangular1 as ng, ɵconstants} from '@angular/upgrade/static';\n\nimport {UpgradeAppType} from '../../../src/common/src/util';\n\n/**\n * A helper function to use when unit testing AngularJS services that depend upon downgraded Angular\n * services.\n *\n * This function returns an AngularJS module that is configured to wire up the AngularJS and Angular\n * injectors without the need to actually bootstrap a hybrid application.\n * This makes it simpler and faster to unit test services.\n *\n * Use the returned AngularJS module in a call to\n * [`angular.mocks.module`](https://docs.angularjs.org/api/ngMock/function/angular.mock.module) to\n * include this module in the unit test injector.\n *\n * In the following code snippet, we are configuring the `$injector` with two modules:\n * The AngularJS `ng1AppModule`, which is the AngularJS part of our hybrid application and the\n * `Ng2AppModule`, which is the Angular part.\n *\n * {@example upgrade/static/ts/full/module.spec.ts region='angularjs-setup'}\n *\n * Once this is done we can get hold of services via the AngularJS `$injector` as normal.\n * Services that are (or have dependencies on) a downgraded Angular service, will be instantiated as\n * needed by the Angular root `Injector`.\n *\n * In the following code snippet, `heroesService` is a downgraded Angular service that we are\n * accessing from AngularJS.\n *\n * {@example upgrade/static/ts/full/module.spec.ts region='angularjs-spec'}\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * This helper is for testing services not components.\n * For Component testing you must still bootstrap a hybrid app. See `UpgradeModule` or\n * `downgradeModule` for more information.\n *\n * </div>\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * The resulting configuration does not wire up AngularJS digests to Zone hooks. It is the\n * responsibility of the test writer to call `$rootScope.$apply`, as necessary, to trigger\n * AngularJS handlers of async events from Angular.\n *\n * </div>\n *\n * <div class=\"docs-alert docs-alert-important\">\n *\n * The helper sets up global variables to hold the shared Angular and AngularJS injectors.\n *\n * * Only call this helper once per spec.\n * * Do not use `createAngularJSTestingModule` in the same spec as `createAngularTestingModule`.\n *\n * </div>\n *\n * Here is the example application and its unit tests that use `createAngularTestingModule`\n * and `createAngularJSTestingModule`.\n *\n * <code-tabs>\n * <code-pane header=\"module.spec.ts\" path=\"upgrade/static/ts/full/module.spec.ts\"></code-pane>\n * <code-pane header=\"module.ts\" path=\"upgrade/static/ts/full/module.ts\"></code-pane>\n * </code-tabs>\n *\n *\n * @param angularModules a collection of Angular modules to include in the configuration.\n *\n * @publicApi\n */\nexport function createAngularJSTestingModule(angularModules: any[]): string {\n return ng\n .module_('$$angularJSTestingModule', [])\n .constant(ɵconstants.UPGRADE_APP_TYPE_KEY, UpgradeAppType.Static)\n .factory(ɵconstants.INJECTOR_KEY, [\n ɵconstants.$INJECTOR,\n ($injector: ng.IInjectorService) => {\n TestBed.configureTestingModule({\n imports: angularModules,\n providers: [{provide: ɵconstants.$INJECTOR, useValue: $injector}],\n });\n return TestBed.inject(Injector);\n },\n ]).name;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["angular","ng"],"mappings":";;;;;;;;;;;AAaA,IAAI,SAAS,GAAoC,IAAI,CAAA;AACrD,IAAI,QAAkB,CAAA;SAEN,gBAAgB,GAAA;AAC9B,IAAA,OAAO,SAAS,CAAA;AAClB,CAAA;MAGa,oBAAoB,CAAA;AAC/B,IAAA,WAAA,CAAY,CAAW,EAAA;QACrB,QAAQ,GAAG,CAAC,CAAA;KACd;kHAHW,oBAAoB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,QAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;mHAApB,oBAAoB,EAAA,CAAA,CAAA;AAApB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,EADX,SAAA,EAAA,CAAC,EAAC,OAAO,EAAE,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAC,CAAC,EAAA,CAAA,CAAA;;sGACxE,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA,EAAC,SAAS,EAAE,CAAC,EAAC,OAAO,EAAE,UAAU,CAAC,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAC,CAAC,EAAC,CAAA;;AAOtF;;;;;;;;;;;;;;;;;;;;;;;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Angular v19.1.0-next.
|
|
2
|
+
* @license Angular v19.1.0-next.2
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -952,7 +952,7 @@ function downgradeInjectable(token, downgradedModule = '') {
|
|
|
952
952
|
/**
|
|
953
953
|
* @publicApi
|
|
954
954
|
*/
|
|
955
|
-
const VERSION = new Version('19.1.0-next.
|
|
955
|
+
const VERSION = new Version('19.1.0-next.2');
|
|
956
956
|
|
|
957
957
|
/**
|
|
958
958
|
* The Trusted Types policy, or null if Trusted Types are not
|
|
@@ -1716,10 +1716,10 @@ class UpgradeComponent {
|
|
|
1716
1716
|
bindingDestination.$onChanges(changes);
|
|
1717
1717
|
}
|
|
1718
1718
|
}
|
|
1719
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.
|
|
1720
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-next.
|
|
1719
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: UpgradeComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
1720
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.0-next.2", type: UpgradeComponent, isStandalone: true, usesOnChanges: true, ngImport: i0 });
|
|
1721
1721
|
}
|
|
1722
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.
|
|
1722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: UpgradeComponent, decorators: [{
|
|
1723
1723
|
type: Directive
|
|
1724
1724
|
}], ctorParameters: () => [{ type: undefined }, { type: i0.ElementRef }, { type: i0.Injector }] });
|
|
1725
1725
|
|
|
@@ -2003,11 +2003,11 @@ class UpgradeModule {
|
|
|
2003
2003
|
}
|
|
2004
2004
|
return returnValue;
|
|
2005
2005
|
}
|
|
2006
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.
|
|
2007
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0-next.
|
|
2008
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0-next.
|
|
2006
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: UpgradeModule, deps: [{ token: i0.Injector }, { token: i0.NgZone }, { token: i0.PlatformRef }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2007
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.0-next.2", ngImport: i0, type: UpgradeModule });
|
|
2008
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: UpgradeModule, providers: [angular1Providers] });
|
|
2009
2009
|
}
|
|
2010
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.
|
|
2010
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.0-next.2", ngImport: i0, type: UpgradeModule, decorators: [{
|
|
2011
2011
|
type: NgModule,
|
|
2012
2012
|
args: [{ providers: [angular1Providers] }]
|
|
2013
2013
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: i0.NgZone }, { type: i0.PlatformRef }] });
|