@o3r/schematics 11.0.0-prerelease.34 → 11.0.0-prerelease.35

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/schematics",
3
- "version": "11.0.0-prerelease.34",
3
+ "version": "11.0.0-prerelease.35",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -30,7 +30,7 @@
30
30
  "@angular-devkit/core": "~17.3.0",
31
31
  "@angular-devkit/schematics": "~17.3.0",
32
32
  "@angular/cli": "~17.3.0",
33
- "@o3r/telemetry": "^11.0.0-prerelease.34",
33
+ "@o3r/telemetry": "^11.0.0-prerelease.35",
34
34
  "@schematics/angular": "~17.3.0",
35
35
  "eslint": "^8.42.0",
36
36
  "rxjs": "^7.8.1",
@@ -85,9 +85,9 @@
85
85
  "@nx/eslint-plugin": "~18.3.0",
86
86
  "@nx/jest": "~18.3.0",
87
87
  "@nx/js": "~18.3.0",
88
- "@o3r/build-helpers": "^11.0.0-prerelease.34",
89
- "@o3r/eslint-plugin": "^11.0.0-prerelease.34",
90
- "@o3r/telemetry": "^11.0.0-prerelease.34",
88
+ "@o3r/build-helpers": "^11.0.0-prerelease.35",
89
+ "@o3r/eslint-plugin": "^11.0.0-prerelease.35",
90
+ "@o3r/telemetry": "^11.0.0-prerelease.35",
91
91
  "@schematics/angular": "~17.3.0",
92
92
  "@stylistic/eslint-plugin-ts": "^1.5.4",
93
93
  "@types/inquirer": "~8.2.10",
@@ -9,10 +9,10 @@ const path = require("node:path");
9
9
  */
10
10
  function ngAddFn(options) {
11
11
  const schematicsDependencies = ['@angular-devkit/architect', '@angular-devkit/schematics', '@angular-devkit/core', '@schematics/angular', 'globby'];
12
- return async () => {
12
+ return async (_, context) => {
13
13
  const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json');
14
14
  const { getExternalDependenciesVersionRange, setupDependencies } = await Promise.resolve().then(() => require('@o3r/schematics'));
15
- const dependencies = Object.entries(getExternalDependenciesVersionRange(schematicsDependencies, packageJsonPath)).reduce((acc, [dep, range]) => {
15
+ const dependencies = Object.entries(getExternalDependenciesVersionRange(schematicsDependencies, packageJsonPath, context.logger)).reduce((acc, [dep, range]) => {
16
16
  acc[dep] = {
17
17
  inManifest: [{
18
18
  range,
@@ -21,7 +21,7 @@ function ngAddFn(options) {
21
21
  };
22
22
  return acc;
23
23
  }, {});
24
- Object.entries(getExternalDependenciesVersionRange(schematicsDependencies, packageJsonPath))
24
+ Object.entries(getExternalDependenciesVersionRange(schematicsDependencies, packageJsonPath, context.logger))
25
25
  .forEach(([dep, range]) => {
26
26
  dependencies[dep] = {
27
27
  inManifest: [{
@@ -12,6 +12,7 @@ export declare function ngAddPackages(packages: string[], options?: Omit<NgAddPa
12
12
  }, packageJsonPath?: string): Rule;
13
13
  /**
14
14
  * Look for the peer dependencies and run ng add on the package requested version
15
+ * TODO: Remove this method in v11. No longer used
15
16
  * @param packages list of the name of the packages needed
16
17
  * @param packageJsonPath path to package json that needs the peer to be resolved
17
18
  * @param type how to install the dependency (dev, peer for a library or default for an application)
@@ -1 +1 @@
1
- {"version":3,"file":"ng-add.helpers.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/ng-add.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,IAAI,EAA+B,MAAM,4BAA4B,CAAC;AAG/G,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAK9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAA;CAAE,EAAE,eAAe,SAAkB,GAAG,IAAI,CA0HzL;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,gCAAiD,EAC5I,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,CAAC,EAAE,MAAM,QAgBzD"}
1
+ {"version":3,"file":"ng-add.helpers.d.ts","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/ng-add.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,IAAI,EAA+B,MAAM,4BAA4B,CAAC;AAG/G,OAAO,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAK9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAG7D;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAAA;CAAE,EAAE,eAAe,SAAkB,GAAG,IAAI,CA0HzL;AAED;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,gCAAiD,EAC5I,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,CAAC,EAAE,MAAM,QAgBzD"}
@@ -138,6 +138,7 @@ function ngAddPackages(packages, options, packageJsonPath = '/package.json') {
138
138
  exports.ngAddPackages = ngAddPackages;
139
139
  /**
140
140
  * Look for the peer dependencies and run ng add on the package requested version
141
+ * TODO: Remove this method in v11. No longer used
141
142
  * @param packages list of the name of the packages needed
142
143
  * @param packageJsonPath path to package json that needs the peer to be resolved
143
144
  * @param type how to install the dependency (dev, peer for a library or default for an application)
@@ -1 +1 @@
1
- {"version":3,"file":"ng-add.helpers.js","sourceRoot":"","sources":["../../../../src/rule-factories/ng-add/ng-add.helpers.ts"],"names":[],"mappings":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AI,CACL,CAAC;IACF,OAAO,aAAa,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE;QACzD,GAAG,OAAO;QACV,gBAAgB,EAAE,IAAI;QACtB,OAAO,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC;QACnD,iBAAiB;QACjB,cAAc,EAAE,IAAI;QACpB,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;KAC3C,CAAC,CAAC;AACL,CAAC;AAjBD,kEAiBC"}
@@ -1,11 +1,14 @@
1
1
  import { NodeDependency, NodeDependencyType } from '@schematics/angular/utility/dependencies';
2
+ import { logging } from '@angular-devkit/core';
2
3
  /**
3
- * Method to extract the provided package version range from a package.json file
4
- * @param packageNames list of package we want to retrieve the version
5
- * @param packageJsonPath Path to the package.json to refer to
6
- * @returns The version range value retrieved from the provided package.json file
4
+ * TODO make logger parameter mandatory in v11 and remove the console fallback.
5
+ * Method to extract the provided package version range from a package.json file
6
+ * @param packageNames list of package we want to retrieve the version
7
+ * @param packageJsonPath Path to the package.json to refer to
8
+ * @param logger logger
9
+ * @returns The version range value retrieved from the provided package.json file
7
10
  */
8
- export declare function getExternalDependenciesVersionRange<T extends string>(packageNames: T[], packageJsonPath: string): Record<T, string>;
11
+ export declare function getExternalDependenciesVersionRange<T extends string>(packageNames: T[], packageJsonPath: string, logger?: logging.LoggerApi): Record<T, string>;
9
12
  /**
10
13
  * Method used to build the list of node dependencies to be installed
11
14
  * @param dependenciesVersions map of dependency and its associated required version
@@ -1 +1 @@
1
- {"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../../src/utility/dependencies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAE9F;;;;;GAKG;AACH,wBAAgB,mCAAmC,CAAC,CAAC,SAAS,MAAM,EAAE,YAAY,EAAE,CAAC,EAAE,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAMnI;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,MAAM,EAAE,oBAAoB,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,kBAAkB,GAAG,cAAc,EAAE,CAE3I"}
1
+ {"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../../src/utility/dependencies.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAC9F,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAG/C;;;;;;;GAOG;AACH,wBAAgB,mCAAmC,CAAC,CAAC,SAAS,MAAM,EAAE,YAAY,EAAE,CAAC,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAc/J;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,MAAM,EAAE,oBAAoB,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,kBAAkB,GAAG,cAAc,EAAE,CAE3I"}
@@ -3,15 +3,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getNodeDependencyList = exports.getExternalDependenciesVersionRange = void 0;
4
4
  const fs = require("node:fs");
5
5
  /**
6
- * Method to extract the provided package version range from a package.json file
7
- * @param packageNames list of package we want to retrieve the version
8
- * @param packageJsonPath Path to the package.json to refer to
9
- * @returns The version range value retrieved from the provided package.json file
6
+ * TODO make logger parameter mandatory in v11 and remove the console fallback.
7
+ * Method to extract the provided package version range from a package.json file
8
+ * @param packageNames list of package we want to retrieve the version
9
+ * @param packageJsonPath Path to the package.json to refer to
10
+ * @param logger logger
11
+ * @returns The version range value retrieved from the provided package.json file
10
12
  */
11
- function getExternalDependenciesVersionRange(packageNames, packageJsonPath) {
13
+ function getExternalDependenciesVersionRange(packageNames, packageJsonPath, logger) {
12
14
  const packageJsonContent = JSON.parse(fs.readFileSync(packageJsonPath, { encoding: 'utf-8' }));
13
15
  return packageNames.reduce((acc, packageName) => {
14
- acc[packageName] = packageJsonContent.peerDependencies?.[packageName] || packageJsonContent.generatorDependencies?.[packageName] || packageJsonContent.dependencies?.[packageName] || 'latest';
16
+ acc[packageName] =
17
+ packageJsonContent.generatorDependencies?.[packageName] ||
18
+ packageJsonContent.peerDependencies?.[packageName] ||
19
+ packageJsonContent.dependencies?.[packageName] ||
20
+ packageJsonContent.devDependencies?.[packageName];
21
+ if (!acc[packageName]) {
22
+ (logger || console).warn(`Unable to retrieve version for ${packageName} in ${packageJsonPath}. Version set to "latest".`);
23
+ acc[packageName] = 'latest';
24
+ }
15
25
  return acc;
16
26
  }, {});
17
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dependencies.js","sourceRoot":"","sources":["../../../src/utility/dependencies.ts"],"names":[],"mappings":";;;AAAA,8BAA8B;AAG9B;;;;;GAKG;AACH,SAAgB,mCAAmC,CAAmB,YAAiB,EAAE,eAAuB;IAC9G,MAAM,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,EAAC,QAAQ,EAAE,OAAO,EAAC,CAAC,CAAC,CAAC;IAC7F,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC,GAA+B,EAAE,WAAW,EAAE,EAAE;QAC1E,GAAG,CAAC,WAAW,CAAC,GAAG,kBAAkB,CAAC,gBAAgB,EAAE,CAAC,WAAW,CAAC,IAAI,kBAAkB,CAAC,qBAAqB,EAAE,CAAC,WAAW,CAAC,IAAI,kBAAkB,CAAC,YAAY,EAAE,CAAC,WAAW,CAAC,IAAI,QAAQ,CAAC;QAC/L,OAAO,GAAG,CAAC;IACb,CAAC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