@angular/upgrade 14.0.0-next.9 → 14.0.0-rc.0
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
package/fesm2020/upgrade.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v14.0.0-
|
|
2
|
+
* @license Angular v14.0.0-rc.0
|
|
3
3
|
* (c) 2010-2022 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -19,7 +19,7 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
|
19
19
|
/**
|
|
20
20
|
* @publicApi
|
|
21
21
|
*/
|
|
22
|
-
const VERSION = new Version('14.0.0-
|
|
22
|
+
const VERSION = new Version('14.0.0-rc.0');
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
@@ -227,7 +227,7 @@ function getDowngradedModuleCount($injector) {
|
|
|
227
227
|
}
|
|
228
228
|
function getUpgradeAppType($injector) {
|
|
229
229
|
return $injector.has(UPGRADE_APP_TYPE_KEY) ? $injector.get(UPGRADE_APP_TYPE_KEY) :
|
|
230
|
-
0 /* None */;
|
|
230
|
+
0 /* UpgradeAppType.None */;
|
|
231
231
|
}
|
|
232
232
|
function isFunction(value) {
|
|
233
233
|
return typeof value === 'function';
|
|
@@ -244,15 +244,15 @@ function validateInjectionKey($injector, downgradedModule, injectionKey, attempt
|
|
|
244
244
|
const downgradedModuleCount = getDowngradedModuleCount($injector);
|
|
245
245
|
// Check for common errors.
|
|
246
246
|
switch (upgradeAppType) {
|
|
247
|
-
case 1 /* Dynamic */:
|
|
248
|
-
case 2 /* Static */:
|
|
247
|
+
case 1 /* UpgradeAppType.Dynamic */:
|
|
248
|
+
case 2 /* UpgradeAppType.Static */:
|
|
249
249
|
if (downgradedModule) {
|
|
250
250
|
throw new Error(`Error while ${attemptedAction}: 'downgradedModule' unexpectedly specified.\n` +
|
|
251
251
|
'You should not specify a value for \'downgradedModule\', unless you are downgrading ' +
|
|
252
252
|
'more than one Angular module (via \'downgradeModule()\').');
|
|
253
253
|
}
|
|
254
254
|
break;
|
|
255
|
-
case 3 /* Lite */:
|
|
255
|
+
case 3 /* UpgradeAppType.Lite */:
|
|
256
256
|
if (!downgradedModule && (downgradedModuleCount >= 2)) {
|
|
257
257
|
throw new Error(`Error while ${attemptedAction}: 'downgradedModule' not specified.\n` +
|
|
258
258
|
'This application contains more than one downgraded Angular module, thus you need to ' +
|
|
@@ -704,7 +704,7 @@ function downgradeComponent(info) {
|
|
|
704
704
|
// NOTE: This is not needed, when using `UpgradeModule`, because `$digest()` will be run
|
|
705
705
|
// inside the Angular zone (except if explicitly escaped, in which case we shouldn't
|
|
706
706
|
// force it back in).
|
|
707
|
-
const isNgUpgradeLite = getUpgradeAppType($injector) === 3 /* Lite */;
|
|
707
|
+
const isNgUpgradeLite = getUpgradeAppType($injector) === 3 /* UpgradeAppType.Lite */;
|
|
708
708
|
const wrapCallback = !isNgUpgradeLite ? cb => cb : cb => () => NgZone.isInAngularZone() ? cb() : ngZone.run(cb);
|
|
709
709
|
let ngZone;
|
|
710
710
|
// When downgrading multiple modules, special handling is needed wrt injectors.
|
|
@@ -1360,9 +1360,9 @@ class UpgradeNg1ComponentAdapter {
|
|
|
1360
1360
|
this.destinationObj[this.propertyMap[name]] = value;
|
|
1361
1361
|
}
|
|
1362
1362
|
}
|
|
1363
|
-
UpgradeNg1ComponentAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-
|
|
1364
|
-
UpgradeNg1ComponentAdapter.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-
|
|
1363
|
+
UpgradeNg1ComponentAdapter.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.0-rc.0", ngImport: i0, type: UpgradeNg1ComponentAdapter, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive });
|
|
1364
|
+
UpgradeNg1ComponentAdapter.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.0-rc.0", type: UpgradeNg1ComponentAdapter, usesOnChanges: true, ngImport: i0 });
|
|
1365
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.0-rc.0", ngImport: i0, type: UpgradeNg1ComponentAdapter, decorators: [{
|
|
1366
1366
|
type: Directive
|
|
1367
1367
|
}], ctorParameters: function () { return [{ type: UpgradeHelper }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }, { type: undefined }]; } });
|
|
1368
1368
|
|
|
@@ -1848,7 +1848,7 @@ class UpgradeAdapter {
|
|
|
1848
1848
|
const platformRef = platformBrowserDynamic();
|
|
1849
1849
|
this.ngZone = new NgZone({ enableLongStackTrace: Zone.hasOwnProperty('longStackTraceZoneSpec') });
|
|
1850
1850
|
this.ng2BootstrapDeferred = new Deferred();
|
|
1851
|
-
ng1Module.constant(UPGRADE_APP_TYPE_KEY, 1 /* Dynamic */)
|
|
1851
|
+
ng1Module.constant(UPGRADE_APP_TYPE_KEY, 1 /* UpgradeAppType.Dynamic */)
|
|
1852
1852
|
.factory(INJECTOR_KEY, () => this.moduleRef.injector.get(Injector))
|
|
1853
1853
|
.factory(LAZY_MODULE_REF, [INJECTOR_KEY, (injector) => ({ injector })])
|
|
1854
1854
|
.constant(NG_ZONE_KEY, this.ngZone)
|