@o3r/workspace 12.1.0-prerelease.77 → 12.1.0-prerelease.78

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/migration.json CHANGED
@@ -5,6 +5,11 @@
5
5
  "version": "10.1.0-alpha.0",
6
6
  "description": "Updates of @o3r/workspace to v10.1.*",
7
7
  "factory": "./schematics/ng-update/index#updateV10_1"
8
+ },
9
+ "migration-v12_1": {
10
+ "version": "12.1.0-prerelease.0",
11
+ "description": "Updates of @o3r/workspace to v12.1.*",
12
+ "factory": "./schematics/ng-update/index#updateV12_1"
8
13
  }
9
14
  }
10
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/workspace",
3
- "version": "12.1.0-prerelease.77",
3
+ "version": "12.1.0-prerelease.78",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -42,7 +42,7 @@
42
42
  "@angular/common": "^19.0.0",
43
43
  "@angular/compiler-cli": "^19.0.0",
44
44
  "@angular/core": "^19.0.0",
45
- "@o3r/telemetry": "^12.1.0-prerelease.77",
45
+ "@o3r/telemetry": "^12.1.0-prerelease.78",
46
46
  "@schematics/angular": "^19.0.0",
47
47
  "ts-node": "~10.9.2",
48
48
  "type-fest": "^4.10.2",
@@ -60,7 +60,7 @@
60
60
  }
61
61
  },
62
62
  "dependencies": {
63
- "@o3r/schematics": "^12.1.0-prerelease.77",
63
+ "@o3r/schematics": "^12.1.0-prerelease.78",
64
64
  "commander": "^13.0.0",
65
65
  "globby": "^11.1.0",
66
66
  "semver": "^7.5.2",
@@ -93,12 +93,12 @@
93
93
  "@nx/jest": "~20.4.0",
94
94
  "@nx/js": "~20.4.0",
95
95
  "@nx/workspace": "~20.4.0",
96
- "@o3r/build-helpers": "^12.1.0-prerelease.77",
97
- "@o3r/core": "^12.1.0-prerelease.77",
98
- "@o3r/eslint-plugin": "^12.1.0-prerelease.77",
99
- "@o3r/schematics": "^12.1.0-prerelease.77",
100
- "@o3r/telemetry": "^12.1.0-prerelease.77",
101
- "@o3r/test-helpers": "^12.1.0-prerelease.77",
96
+ "@o3r/build-helpers": "^12.1.0-prerelease.78",
97
+ "@o3r/core": "^12.1.0-prerelease.78",
98
+ "@o3r/eslint-plugin": "^12.1.0-prerelease.78",
99
+ "@o3r/schematics": "^12.1.0-prerelease.78",
100
+ "@o3r/telemetry": "^12.1.0-prerelease.78",
101
+ "@o3r/test-helpers": "^12.1.0-prerelease.78",
102
102
  "@schematics/angular": "~19.2.0",
103
103
  "@stylistic/eslint-plugin": "~3.1.0",
104
104
  "@types/jest": "~29.5.2",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../schematics/ng-add/helpers/renovate/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EAKL,MAAM,4BAA4B,CAAC;AAMpC;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAgB7D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../schematics/ng-add/helpers/renovate/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,IAAI,EAKL,MAAM,4BAA4B,CAAC;AASpC;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAmB7D"}
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.generateRenovateConfig = generateRenovateConfig;
4
+ const fs = require("node:fs");
5
+ const path = require("node:path");
4
6
  const schematics_1 = require("@angular-devkit/schematics");
5
7
  const schematics_2 = require("@o3r/schematics");
6
8
  /**
@@ -8,6 +10,7 @@ const schematics_2 = require("@o3r/schematics");
8
10
  * @param rootPath @see RuleFactory.rootPath
9
11
  */
10
12
  function generateRenovateConfig(rootPath) {
13
+ const ownPackageJsonContent = JSON.parse(fs.readFileSync(path.resolve(__dirname, '..', '..', '..', '..', 'package.json'), { encoding: 'utf8' }));
11
14
  return (tree, context) => {
12
15
  if (tree.exists('.renovaterc.json')) {
13
16
  return tree;
@@ -15,6 +18,7 @@ function generateRenovateConfig(rootPath) {
15
18
  const templateSource = (0, schematics_1.apply)((0, schematics_1.url)((0, schematics_2.getTemplateFolder)(rootPath, __dirname)), [
16
19
  (0, schematics_1.template)({
17
20
  dot: '.',
21
+ version: ownPackageJsonContent.version,
18
22
  packageManager: (0, schematics_2.getPackageManager)()
19
23
  }),
20
24
  (0, schematics_1.renameTemplateFiles)()
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/ng-add/helpers/renovate/index.ts"],"names":[],"mappings":";;AAoBA,wDAgBC;AApCD,2DAUoC;AACpC,gDAGyB;AAEzB;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,QAAgB;IACrD,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,IAAI,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACpC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,cAAc,GAAG,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,IAAA,8BAAiB,EAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,EAAE;YACxE,IAAA,qBAAQ,EAAC;gBACP,GAAG,EAAE,GAAG;gBACR,cAAc,EAAE,IAAA,8BAAiB,GAAE;aACpC,CAAC;YACF,IAAA,gCAAmB,GAAE;SACtB,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,IAAA,sBAAS,EAAC,cAAc,EAAE,0BAAa,CAAC,SAAS,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7B,CAAC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../schematics/ng-add/helpers/renovate/index.ts"],"names":[],"mappings":";;AAyBA,wDAmBC;AA5CD,8BAA8B;AAC9B,kCAAkC;AAClC,2DAUoC;AACpC,gDAGyB;AAKzB;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,QAAgB;IACrD,MAAM,qBAAqB,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAgB,CAAC;IAEhK,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC/C,IAAI,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACpC,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,cAAc,GAAG,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,IAAA,8BAAiB,EAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,EAAE;YACxE,IAAA,qBAAQ,EAAC;gBACP,GAAG,EAAE,GAAG;gBACR,OAAO,EAAE,qBAAqB,CAAC,OAAO;gBACtC,cAAc,EAAE,IAAA,8BAAiB,GAAE;aACpC,CAAC;YACF,IAAA,gCAAmB,GAAE;SACtB,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,IAAA,sBAAS,EAAC,cAAc,EAAE,0BAAa,CAAC,SAAS,CAAC,CAAC;QAChE,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7B,CAAC,CAAC;AACJ,CAAC"}
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
3
  "extends": [
4
- "github>AmadeusITGroup/otter//tools/renovate/base",<% if (packageManager == 'yarn') { %>
5
- "github>AmadeusITGroup/otter//tools/renovate/otter-project"<% } else { %>
6
- "github>AmadeusITGroup/otter//tools/renovate/group/otter",
7
- "github>AmadeusITGroup/otter//tools/renovate/tasks/base",
8
- "github>AmadeusITGroup/otter//tools/renovate/tasks/otter-ng-update(npm)"<% } %>
4
+ "github>AmadeusITGroup/otter//tools/renovate/base#<%= version %>",<% if (packageManager == 'yarn') { %>
5
+ "github>AmadeusITGroup/otter//tools/renovate/otter-project#<%= version %>"<% } else { %>
6
+ "github>AmadeusITGroup/otter//tools/renovate/group/otter#<%= version %>",
7
+ "github>AmadeusITGroup/otter//tools/renovate/tasks/base#<%= version %>",
8
+ "github>AmadeusITGroup/otter//tools/renovate/tasks/otter-ng-update(npm)#<%= version %>"<% } %>
9
9
  ]
10
10
  }
@@ -3,4 +3,8 @@ import { type Rule } from '@angular-devkit/schematics';
3
3
  * Update of Otter Workspace V10.1
4
4
  */
5
5
  export declare const updateV10_1: (options: any) => Rule;
6
+ /**
7
+ * Update of Otter Workspace V12.1
8
+ */
9
+ export declare const updateV12_1: (options: any) => Rule;
6
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-update/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;AAmBpC;;GAEG;AAEH,eAAO,MAAM,WAAW,wBAAsC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-update/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,IAAI,EACV,MAAM,4BAA4B,CAAC;AAsBpC;;GAEG;AAEH,eAAO,MAAM,WAAW,wBAAsC,CAAC;AAa/D;;GAEG;AAEH,eAAO,MAAM,WAAW,wBAAsC,CAAC"}
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateV10_1 = void 0;
3
+ exports.updateV12_1 = exports.updateV10_1 = void 0;
4
4
  const schematics_1 = require("@angular-devkit/schematics");
5
5
  const schematics_2 = require("@o3r/schematics");
6
6
  const add_presets_renovate_1 = require("./v10.1/add-presets-renovate");
7
+ const renovate_version_1 = require("./v12.1/renovate-version");
7
8
  /**
8
9
  * Update of Otter Workspace V10.1
9
10
  */
@@ -19,4 +20,19 @@ function updateV10_1Fn() {
19
20
  */
20
21
  // eslint-disable-next-line @typescript-eslint/naming-convention -- function name contains the version number
21
22
  exports.updateV10_1 = (0, schematics_2.createOtterSchematic)(updateV10_1Fn);
23
+ /**
24
+ * Update of Otter Workspace V12.1
25
+ */
26
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- function name contains the version number
27
+ function updateV12_1Fn() {
28
+ const updateRules = [
29
+ (0, renovate_version_1.updateRenovateVersion)()
30
+ ];
31
+ return (0, schematics_1.chain)(updateRules);
32
+ }
33
+ /**
34
+ * Update of Otter Workspace V12.1
35
+ */
36
+ // eslint-disable-next-line @typescript-eslint/naming-convention -- function name contains the version number
37
+ exports.updateV12_1 = (0, schematics_2.createOtterSchematic)(updateV12_1Fn);
22
38
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-update/index.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,gDAEyB;AACzB,uEAEsC;AAEtC;;GAEG;AACH,6GAA6G;AAC7G,SAAS,aAAa;IACpB,MAAM,WAAW,GAAW;QAC1B,IAAA,yCAAkB,GAAE;KACrB,CAAC;IACF,OAAO,IAAA,kBAAK,EAAC,WAAW,CAAC,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,6GAA6G;AAChG,QAAA,WAAW,GAAG,IAAA,iCAAoB,EAAC,aAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../schematics/ng-update/index.ts"],"names":[],"mappings":";;;AAAA,2DAGoC;AACpC,gDAEyB;AACzB,uEAEsC;AACtC,+DAEkC;AAElC;;GAEG;AACH,6GAA6G;AAC7G,SAAS,aAAa;IACpB,MAAM,WAAW,GAAW;QAC1B,IAAA,yCAAkB,GAAE;KACrB,CAAC;IACF,OAAO,IAAA,kBAAK,EAAC,WAAW,CAAC,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,6GAA6G;AAChG,QAAA,WAAW,GAAG,IAAA,iCAAoB,EAAC,aAAa,CAAC,CAAC;AAE/D;;GAEG;AACH,6GAA6G;AAC7G,SAAS,aAAa;IACpB,MAAM,WAAW,GAAW;QAC1B,IAAA,wCAAqB,GAAE;KACxB,CAAC;IACF,OAAO,IAAA,kBAAK,EAAC,WAAW,CAAC,CAAC;AAC5B,CAAC;AAED;;GAEG;AACH,6GAA6G;AAChG,QAAA,WAAW,GAAG,IAAA,iCAAoB,EAAC,aAAa,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ export declare const updateRenovateVersion: () => Rule;
3
+ //# sourceMappingURL=renovate-version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renovate-version.d.ts","sourceRoot":"","sources":["../../../../schematics/ng-update/v12.1/renovate-version.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;AAMpC,eAAO,MAAM,qBAAqB,QAAO,IAsBxC,CAAC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateRenovateVersion = void 0;
4
+ const node_fs_1 = require("node:fs");
5
+ const node_path_1 = require("node:path");
6
+ const otterRenovatePathPrefix = 'github>AmadeusITGroup/otter//';
7
+ const withVersionPattern = /#[0-9.]+(?:-.+)?$/;
8
+ const supportedRenovateFiles = ['.renovaterc.json', 'renovaterc.json', 'renovate.json'];
9
+ const updateRenovateVersion = () => {
10
+ const version = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.resolve)(__dirname, '..', '..', '..', 'package.json'), { encoding: 'utf8' })).version;
11
+ return (tree, context) => {
12
+ if (!version) {
13
+ context.logger.warn('No Otter version detected');
14
+ return tree;
15
+ }
16
+ supportedRenovateFiles
17
+ .filter((renovateFile) => tree.exists(renovateFile))
18
+ .forEach((renovateFile) => {
19
+ const renovateConfig = tree.readJson(renovateFile);
20
+ renovateConfig.extends = renovateConfig.extends?.map((extensionPath) => {
21
+ if (!extensionPath.startsWith(otterRenovatePathPrefix) || withVersionPattern.test(extensionPath)) {
22
+ return extensionPath;
23
+ }
24
+ return `${extensionPath}#${version}`;
25
+ });
26
+ tree.overwrite(renovateFile, JSON.stringify(renovateConfig, null, 2));
27
+ });
28
+ return tree;
29
+ };
30
+ };
31
+ exports.updateRenovateVersion = updateRenovateVersion;
32
+ //# sourceMappingURL=renovate-version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renovate-version.js","sourceRoot":"","sources":["../../../../schematics/ng-update/v12.1/renovate-version.ts"],"names":[],"mappings":";;;AAAA,qCAEiB;AACjB,yCAEmB;AAKnB,MAAM,uBAAuB,GAAG,+BAA+B,CAAC;AAChE,MAAM,kBAAkB,GAAG,mBAAmB,CAAC;AAC/C,MAAM,sBAAsB,GAAG,CAAC,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,CAAC,CAAC;AAEjF,MAAM,qBAAqB,GAAG,GAAS,EAAE;IAC9C,MAAM,OAAO,GAAuB,IAAI,CAAC,KAAK,CAAC,IAAA,sBAAY,EAAC,IAAA,mBAAO,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;IACjJ,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;QACvB,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;YACjD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,sBAAsB;aACnB,MAAM,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;aACnD,OAAO,CAAC,CAAC,YAAY,EAAE,EAAE;YACxB,MAAM,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAQ,CAAC;YAC1D,cAAc,CAAC,OAAO,GAAG,cAAc,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,aAAqB,EAAE,EAAE;gBAC7E,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,uBAAuB,CAAC,IAAI,kBAAkB,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;oBACjG,OAAO,aAAa,CAAC;gBACvB,CAAC;gBAED,OAAO,GAAG,aAAa,IAAI,OAAO,EAAE,CAAC;YACvC,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACxE,CAAC,CAAC,CAAC;QACL,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC,CAAC;AAtBW,QAAA,qBAAqB,yBAsBhC"}