@o3r/workspace 10.1.6 → 10.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/workspace",
3
- "version": "10.1.6",
3
+ "version": "10.1.8",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,7 +38,7 @@
38
38
  }
39
39
  },
40
40
  "dependencies": {
41
- "@o3r/schematics": "^10.1.6",
41
+ "@o3r/schematics": "^10.1.8",
42
42
  "commander": "^12.0.0",
43
43
  "globby": "^11.1.0",
44
44
  "semver": "^7.5.2",
@@ -69,11 +69,11 @@
69
69
  "@nx/eslint-plugin": "~18.0.2",
70
70
  "@nx/jest": "~18.0.2",
71
71
  "@nx/js": "~18.0.2",
72
- "@o3r/build-helpers": "^10.1.6",
73
- "@o3r/core": "^10.1.6",
74
- "@o3r/eslint-plugin": "^10.1.6",
75
- "@o3r/schematics": "^10.1.6",
76
- "@o3r/test-helpers": "^10.1.6",
72
+ "@o3r/build-helpers": "^10.1.8",
73
+ "@o3r/core": "^10.1.8",
74
+ "@o3r/eslint-plugin": "^10.1.8",
75
+ "@o3r/schematics": "^10.1.8",
76
+ "@o3r/test-helpers": "^10.1.8",
77
77
  "@schematics/angular": "~17.2.0",
78
78
  "@stylistic/eslint-plugin-ts": "^1.5.4",
79
79
  "@types/jest": "~29.5.2",
@@ -1,4 +1,4 @@
1
- import type { Rule } from '@angular-devkit/schematics';
1
+ import { type Rule } from '@angular-devkit/schematics';
2
2
  /**
3
3
  * Clean files generated to standalone SDK
4
4
  * @param targetPath Path where the SDK has been generated
@@ -1 +1 @@
1
- {"version":3,"file":"clean-standalone.rule.d.ts","sourceRoot":"","sources":["../../../../schematics/sdk/rules/clean-standalone.rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAIvD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAwB7D"}
1
+ {"version":3,"file":"clean-standalone.rule.d.ts","sourceRoot":"","sources":["../../../../schematics/sdk/rules/clean-standalone.rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAc9D;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CA2B7D"}
@@ -1,32 +1,45 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cleanStandaloneFiles = void 0;
4
+ const schematics_1 = require("@angular-devkit/schematics");
4
5
  const node_path_1 = require("node:path");
6
+ const deleteIfExists = (paths) => (tree, context) => {
7
+ paths.forEach((path) => {
8
+ if (tree.exists(path)) {
9
+ tree.delete(path);
10
+ }
11
+ else {
12
+ context.logger.warn(`Tried to delete ${path} but file does not exist.`);
13
+ }
14
+ });
15
+ };
5
16
  /**
6
17
  * Clean files generated to standalone SDK
7
18
  * @param targetPath Path where the SDK has been generated
8
19
  */
9
20
  function cleanStandaloneFiles(targetPath) {
10
- return (tree) => {
11
- tree.delete(node_path_1.posix.join(targetPath, '.renovaterc.json'));
12
- tree.delete(node_path_1.posix.join(targetPath, '.vscode', 'settings.json'));
13
- tree.delete(node_path_1.posix.join(targetPath, '.editorconfig'));
14
- tree.delete(node_path_1.posix.join(targetPath, '.versionrc.json'));
15
- tree.delete(node_path_1.posix.join(targetPath, '.commitlintrc.json'));
16
- tree.delete(node_path_1.posix.join(targetPath, 'CONTRIBUTING.md'));
17
- tree.delete(node_path_1.posix.join(targetPath, '.husky', 'commit-msg'));
18
- tree.delete(node_path_1.posix.join(targetPath, '.husky', 'pre-commit'));
19
- const packageJson = tree.readJson(node_path_1.posix.join(targetPath, 'package.json'));
20
- if (packageJson.scripts) {
21
- const excludedScripts = ['postinstall', 'set:version'];
22
- packageJson.scripts = Object.fromEntries(Object.entries(packageJson.scripts).filter(([scriptName]) => !excludedScripts.includes(scriptName)));
23
- }
24
- if (packageJson.devDependencies) {
25
- packageJson.devDependencies = Object.fromEntries(Object.entries(packageJson.devDependencies).filter(([depName, _]) => depName !== '@o3r/workspace'));
21
+ return (0, schematics_1.chain)([
22
+ deleteIfExists([
23
+ node_path_1.posix.join(targetPath, '.renovaterc.json'),
24
+ node_path_1.posix.join(targetPath, '.vscode', 'settings.json'),
25
+ node_path_1.posix.join(targetPath, '.editorconfig'),
26
+ node_path_1.posix.join(targetPath, '.versionrc.json'),
27
+ node_path_1.posix.join(targetPath, '.commitlintrc.json'),
28
+ node_path_1.posix.join(targetPath, 'CONTRIBUTING.md')
29
+ ]),
30
+ (tree) => {
31
+ const packageJson = tree.readJson(node_path_1.posix.join(targetPath, 'package.json'));
32
+ if (packageJson.scripts) {
33
+ const excludedScripts = ['postinstall', 'set:version'];
34
+ packageJson.scripts = Object.fromEntries(Object.entries(packageJson.scripts).filter(([scriptName]) => !excludedScripts.includes(scriptName)));
35
+ }
36
+ if (packageJson.devDependencies) {
37
+ packageJson.devDependencies = Object.fromEntries(Object.entries(packageJson.devDependencies).filter(([depName]) => depName !== '@o3r/workspace'));
38
+ }
39
+ tree.overwrite(node_path_1.posix.join(targetPath, 'package.json'), JSON.stringify(packageJson, null, 2));
40
+ return tree;
26
41
  }
27
- tree.overwrite(node_path_1.posix.join(targetPath, 'package.json'), JSON.stringify(packageJson, null, 2));
28
- return tree;
29
- };
42
+ ]);
30
43
  }
31
44
  exports.cleanStandaloneFiles = cleanStandaloneFiles;
32
45
  //# sourceMappingURL=clean-standalone.rule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"clean-standalone.rule.js","sourceRoot":"","sources":["../../../../schematics/sdk/rules/clean-standalone.rule.ts"],"names":[],"mappings":";;;AACA,yCAAkC;AAGlC;;;GAGG;AACH,SAAgB,oBAAoB,CAAC,UAAkB;IACrD,OAAO,CAAC,IAAI,EAAE,EAAE;QACd,IAAI,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