@angular-devkit/schematics-cli 17.0.0-rc.3 → 17.0.0-rc.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/bin/schematics.js CHANGED
@@ -429,6 +429,10 @@ if (require.main === module) {
429
429
  throw e;
430
430
  });
431
431
  }
432
+ /**
433
+ * Lazily compiled dynamic import loader function.
434
+ */
435
+ let load;
432
436
  /**
433
437
  * This uses a dynamic import to load a module which may be ESM.
434
438
  * CommonJS code can load ESM code via a dynamic import. Unfortunately, TypeScript
@@ -442,6 +446,7 @@ if (require.main === module) {
442
446
  * @returns A Promise that resolves to the dynamically imported module.
443
447
  */
444
448
  function loadEsmModule(modulePath) {
445
- return new Function('modulePath', `return import(modulePath);`)(modulePath);
449
+ load ??= new Function('modulePath', `return import(modulePath);`);
450
+ return load(modulePath);
446
451
  }
447
452
  exports.loadEsmModule = loadEsmModule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular-devkit/schematics-cli",
3
- "version": "17.0.0-rc.3",
3
+ "version": "17.0.0-rc.5",
4
4
  "description": "Angular Schematics - CLI",
5
5
  "homepage": "https://github.com/angular/angular-cli",
6
6
  "bin": {
@@ -21,8 +21,8 @@
21
21
  ],
22
22
  "schematics": "./collection.json",
23
23
  "dependencies": {
24
- "@angular-devkit/core": "17.0.0-rc.3",
25
- "@angular-devkit/schematics": "17.0.0-rc.3",
24
+ "@angular-devkit/core": "17.0.0-rc.5",
25
+ "@angular-devkit/schematics": "17.0.0-rc.5",
26
26
  "ansi-colors": "4.1.3",
27
27
  "inquirer": "9.2.11",
28
28
  "symbol-observable": "4.0.0",