@angular/upgrade 14.0.0-next.13 → 14.0.0-next.16
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/esm2020/src/common/src/downgrade_component.mjs +2 -2
- package/esm2020/src/common/src/util.mjs +5 -5
- package/esm2020/src/common/src/version.mjs +1 -1
- package/esm2020/src/dynamic/src/upgrade_adapter.mjs +2 -2
- package/esm2020/src/dynamic/src/upgrade_ng1_adapter.mjs +3 -3
- package/esm2020/static/src/downgrade_module.mjs +2 -2
- package/esm2020/static/src/upgrade_component.mjs +3 -3
- package/esm2020/static/src/upgrade_module.mjs +6 -6
- package/esm2020/static/testing/src/create_angular_testing_module.mjs +6 -6
- package/esm2020/static/testing/src/create_angularjs_testing_module.mjs +2 -2
- package/fesm2015/static/testing.mjs +7 -7
- package/fesm2015/static/testing.mjs.map +1 -1
- package/fesm2015/static.mjs +16 -16
- package/fesm2015/static.mjs.map +1 -1
- package/fesm2015/upgrade.mjs +11 -11
- package/fesm2015/upgrade.mjs.map +1 -1
- package/fesm2020/static/testing.mjs +7 -7
- package/fesm2020/static/testing.mjs.map +1 -1
- package/fesm2020/static.mjs +16 -16
- package/fesm2020/static.mjs.map +1 -1
- package/fesm2020/upgrade.mjs +11 -11
- package/fesm2020/upgrade.mjs.map +1 -1
- package/{upgrade.d.ts → index.d.ts} +470 -469
- package/package.json +9 -9
- package/static/{static.d.ts → index.d.ts} +653 -652
- package/static/testing/{testing.d.ts → index.d.ts} +142 -141
- package/static/package.json +0 -10
- package/static/testing/package.json +0 -9
|
@@ -1,146 +1,147 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-next.
|
|
2
|
+
* @license Angular v14.0.0-next.16
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
* services
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* `
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
* *
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* and `
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* <code-pane header="module.ts" path="upgrade/static/ts/full/module.ts"></code-pane>
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
* services
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
* *
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* and `
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
* <code-pane header="module.ts" path="upgrade/static/ts/full/module.ts"></code-pane>
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
7
|
+
|
|
8
|
+
import { Type } from '@angular/core';
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A helper function to use when unit testing AngularJS services that depend upon downgraded Angular
|
|
13
|
+
* services.
|
|
14
|
+
*
|
|
15
|
+
* This function returns an AngularJS module that is configured to wire up the AngularJS and Angular
|
|
16
|
+
* injectors without the need to actually bootstrap a hybrid application.
|
|
17
|
+
* This makes it simpler and faster to unit test services.
|
|
18
|
+
*
|
|
19
|
+
* Use the returned AngularJS module in a call to
|
|
20
|
+
* [`angular.mocks.module`](https://docs.angularjs.org/api/ngMock/function/angular.mock.module) to
|
|
21
|
+
* include this module in the unit test injector.
|
|
22
|
+
*
|
|
23
|
+
* In the following code snippet, we are configuring the `$injector` with two modules:
|
|
24
|
+
* The AngularJS `ng1AppModule`, which is the AngularJS part of our hybrid application and the
|
|
25
|
+
* `Ng2AppModule`, which is the Angular part.
|
|
26
|
+
*
|
|
27
|
+
* <code-example path="upgrade/static/ts/full/module.spec.ts"
|
|
28
|
+
* region="angularjs-setup"></code-example>
|
|
29
|
+
*
|
|
30
|
+
* Once this is done we can get hold of services via the AngularJS `$injector` as normal.
|
|
31
|
+
* Services that are (or have dependencies on) a downgraded Angular service, will be instantiated as
|
|
32
|
+
* needed by the Angular root `Injector`.
|
|
33
|
+
*
|
|
34
|
+
* In the following code snippet, `heroesService` is a downgraded Angular service that we are
|
|
35
|
+
* accessing from AngularJS.
|
|
36
|
+
*
|
|
37
|
+
* <code-example path="upgrade/static/ts/full/module.spec.ts"
|
|
38
|
+
* region="angularjs-spec"></code-example>
|
|
39
|
+
*
|
|
40
|
+
* <div class="alert is-important">
|
|
41
|
+
*
|
|
42
|
+
* This helper is for testing services not components.
|
|
43
|
+
* For Component testing you must still bootstrap a hybrid app. See `UpgradeModule` or
|
|
44
|
+
* `downgradeModule` for more information.
|
|
45
|
+
*
|
|
46
|
+
* </div>
|
|
47
|
+
*
|
|
48
|
+
* <div class="alert is-important">
|
|
49
|
+
*
|
|
50
|
+
* The resulting configuration does not wire up AngularJS digests to Zone hooks. It is the
|
|
51
|
+
* responsibility of the test writer to call `$rootScope.$apply`, as necessary, to trigger
|
|
52
|
+
* AngularJS handlers of async events from Angular.
|
|
53
|
+
*
|
|
54
|
+
* </div>
|
|
55
|
+
*
|
|
56
|
+
* <div class="alert is-important">
|
|
57
|
+
*
|
|
58
|
+
* The helper sets up global variables to hold the shared Angular and AngularJS injectors.
|
|
59
|
+
*
|
|
60
|
+
* * Only call this helper once per spec.
|
|
61
|
+
* * Do not use `createAngularJSTestingModule` in the same spec as `createAngularTestingModule`.
|
|
62
|
+
*
|
|
63
|
+
* </div>
|
|
64
|
+
*
|
|
65
|
+
* Here is the example application and its unit tests that use `createAngularTestingModule`
|
|
66
|
+
* and `createAngularJSTestingModule`.
|
|
67
|
+
*
|
|
68
|
+
* <code-tabs>
|
|
69
|
+
* <code-pane header="module.spec.ts" path="upgrade/static/ts/full/module.spec.ts"></code-pane>
|
|
70
|
+
* <code-pane header="module.ts" path="upgrade/static/ts/full/module.ts"></code-pane>
|
|
71
|
+
* </code-tabs>
|
|
72
|
+
*
|
|
73
|
+
*
|
|
74
|
+
* @param angularModules a collection of Angular modules to include in the configuration.
|
|
75
|
+
*
|
|
76
|
+
* @publicApi
|
|
77
|
+
*/
|
|
78
|
+
export declare function createAngularJSTestingModule(angularModules: any[]): string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* A helper function to use when unit testing Angular services that depend upon upgraded AngularJS
|
|
82
|
+
* services.
|
|
83
|
+
*
|
|
84
|
+
* This function returns an `NgModule` decorated class that is configured to wire up the Angular
|
|
85
|
+
* and AngularJS injectors without the need to actually bootstrap a hybrid application.
|
|
86
|
+
* This makes it simpler and faster to unit test services.
|
|
87
|
+
*
|
|
88
|
+
* Use the returned class as an "import" when configuring the `TestBed`.
|
|
89
|
+
*
|
|
90
|
+
* In the following code snippet, we are configuring the TestBed with two imports.
|
|
91
|
+
* The `Ng2AppModule` is the Angular part of our hybrid application and the `ng1AppModule` is the
|
|
92
|
+
* AngularJS part.
|
|
93
|
+
*
|
|
94
|
+
* <code-example path="upgrade/static/ts/full/module.spec.ts" region="angular-setup"></code-example>
|
|
95
|
+
*
|
|
96
|
+
* Once this is done we can get hold of services via the Angular `Injector` as normal.
|
|
97
|
+
* Services that are (or have dependencies on) an upgraded AngularJS service, will be instantiated
|
|
98
|
+
* as needed by the AngularJS `$injector`.
|
|
99
|
+
*
|
|
100
|
+
* In the following code snippet, `HeroesService` is an Angular service that depends upon an
|
|
101
|
+
* AngularJS service, `titleCase`.
|
|
102
|
+
*
|
|
103
|
+
* <code-example path="upgrade/static/ts/full/module.spec.ts" region="angular-spec"></code-example>
|
|
104
|
+
*
|
|
105
|
+
* <div class="alert is-important">
|
|
106
|
+
*
|
|
107
|
+
* This helper is for testing services not Components.
|
|
108
|
+
* For Component testing you must still bootstrap a hybrid app. See `UpgradeModule` or
|
|
109
|
+
* `downgradeModule` for more information.
|
|
110
|
+
*
|
|
111
|
+
* </div>
|
|
112
|
+
*
|
|
113
|
+
* <div class="alert is-important">
|
|
114
|
+
*
|
|
115
|
+
* The resulting configuration does not wire up AngularJS digests to Zone hooks. It is the
|
|
116
|
+
* responsibility of the test writer to call `$rootScope.$apply`, as necessary, to trigger
|
|
117
|
+
* AngularJS handlers of async events from Angular.
|
|
118
|
+
*
|
|
119
|
+
* </div>
|
|
120
|
+
*
|
|
121
|
+
* <div class="alert is-important">
|
|
122
|
+
*
|
|
123
|
+
* The helper sets up global variables to hold the shared Angular and AngularJS injectors.
|
|
124
|
+
*
|
|
125
|
+
* * Only call this helper once per spec.
|
|
126
|
+
* * Do not use `createAngularTestingModule` in the same spec as `createAngularJSTestingModule`.
|
|
127
|
+
*
|
|
128
|
+
* </div>
|
|
129
|
+
*
|
|
130
|
+
* Here is the example application and its unit tests that use `createAngularTestingModule`
|
|
131
|
+
* and `createAngularJSTestingModule`.
|
|
132
|
+
*
|
|
133
|
+
* <code-tabs>
|
|
134
|
+
* <code-pane header="module.spec.ts" path="upgrade/static/ts/full/module.spec.ts"></code-pane>
|
|
135
|
+
* <code-pane header="module.ts" path="upgrade/static/ts/full/module.ts"></code-pane>
|
|
136
|
+
* </code-tabs>
|
|
137
|
+
*
|
|
138
|
+
*
|
|
139
|
+
* @param angularJSModules a collection of the names of AngularJS modules to include in the
|
|
140
|
+
* configuration.
|
|
141
|
+
* @param [strictDi] whether the AngularJS injector should have `strictDI` enabled.
|
|
142
|
+
*
|
|
143
|
+
* @publicApi
|
|
144
|
+
*/
|
|
145
|
+
export declare function createAngularTestingModule(angularJSModules: string[], strictDi?: boolean): Type<any>;
|
|
146
|
+
|
|
147
|
+
export { }
|
package/static/package.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@angular/upgrade/static",
|
|
3
|
-
"sideEffects": false,
|
|
4
|
-
"fesm2020": "../fesm2020/static.mjs",
|
|
5
|
-
"fesm2015": "../fesm2015/static.mjs",
|
|
6
|
-
"esm2020": "../esm2020/static/static.mjs",
|
|
7
|
-
"typings": "./static.d.ts",
|
|
8
|
-
"module": "../fesm2015/static.mjs",
|
|
9
|
-
"es2020": "../fesm2020/static.mjs"
|
|
10
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@angular/upgrade/static/testing",
|
|
3
|
-
"fesm2020": "../../fesm2020/static/testing.mjs",
|
|
4
|
-
"fesm2015": "../../fesm2015/static/testing.mjs",
|
|
5
|
-
"esm2020": "../../esm2020/static/testing/testing.mjs",
|
|
6
|
-
"typings": "./testing.d.ts",
|
|
7
|
-
"module": "../../fesm2015/static/testing.mjs",
|
|
8
|
-
"es2020": "../../fesm2020/static/testing.mjs"
|
|
9
|
-
}
|