@o3r/create 11.6.13 → 11.6.15

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.
Files changed (2) hide show
  1. package/index.js +16 -0
  2. package/package.json +9 -9
package/index.js CHANGED
@@ -124,6 +124,7 @@ const ADD_O3R_CORE_ERROR_CODE = 3;
124
124
  const NPM_CONFIG_REGISTRY_ERROR_CODE = 4;
125
125
  const YARN_CONFIG_REGISTRY_ERROR_CODE = 5;
126
126
  const INSTALL_PROCESS_ERROR_CODE = 6;
127
+ const NPM_CONFIG_PEER_LEGACY_ERROR_CODE = 8;
127
128
  const exitProcessIfErrorInSpawnSync = (exitCode, { error, status }) => {
128
129
  if (error || status !== 0) {
129
130
  if (error) {
@@ -205,6 +206,9 @@ const prepareWorkspace = (relativeDirectory = '.', projectPackageManager = 'npm'
205
206
  exitProcessIfErrorInSpawnSync(YARN_CONFIG_REGISTRY_ERROR_CODE, (0, node_child_process_1.spawnSync)(runner, ['config', 'set', 'npmRegistryServer', registry], spawnSyncOpts));
206
207
  }
207
208
  }
209
+ if (projectPackageManager === 'npm') {
210
+ exitProcessIfErrorInSpawnSync(NPM_CONFIG_PEER_LEGACY_ERROR_CODE, (0, node_child_process_1.spawnSync)(runner, ['config', 'set', '-L', 'project', 'legacy-peer-deps', 'true'], spawnSyncOpts));
211
+ }
208
212
  exitProcessIfErrorInSpawnSync(INSTALL_PROCESS_ERROR_CODE, (0, node_child_process_1.spawnSync)(runner, ['install'], spawnSyncOpts));
209
213
  };
210
214
  const addOtterFramework = (relativeDirectory = '.', projectPackageManager = 'npm') => {
@@ -223,6 +227,18 @@ const addOtterFramework = (relativeDirectory = '.', projectPackageManager = 'npm
223
227
  }
224
228
  : undefined
225
229
  }));
230
+ if (projectPackageManager === 'npm') {
231
+ exitProcessIfErrorInSpawnSync(NPM_CONFIG_PEER_LEGACY_ERROR_CODE, (0, node_child_process_1.spawnSync)(runner, ['config', 'set', '-L', 'project', 'legacy-peer-deps', 'false'], {
232
+ stdio: 'inherit',
233
+ shell: true,
234
+ cwd
235
+ }));
236
+ exitProcessIfErrorInSpawnSync(INSTALL_PROCESS_ERROR_CODE, (0, node_child_process_1.spawnSync)(runner, ['install'], {
237
+ stdio: 'inherit',
238
+ cwd,
239
+ shell: true
240
+ }));
241
+ }
226
242
  };
227
243
  const projectFolder = argv._[0]?.replaceAll(' ', '-').toLowerCase() || '.';
228
244
  console.info(logo);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@o3r/create",
3
- "version": "11.6.13",
3
+ "version": "11.6.15",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -18,7 +18,7 @@
18
18
  "prepare:publish": "prepare-publish ./dist"
19
19
  },
20
20
  "peerDependencies": {
21
- "@o3r/telemetry": "^11.6.13"
21
+ "@o3r/telemetry": "^11.6.15"
22
22
  },
23
23
  "peerDependenciesMeta": {
24
24
  "@o3r/telemetry": {
@@ -31,7 +31,7 @@
31
31
  "minimist": "^1.2.6",
32
32
  "shell-quote": "^1.8.1",
33
33
  "tslib": "^2.6.2",
34
- "type-fest": "^4.10.2"
34
+ "type-fest": "^4.30.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@angular-devkit/architect": "~0.1802.0",
@@ -42,11 +42,11 @@
42
42
  "@nx/eslint-plugin": "~19.8.0",
43
43
  "@nx/jest": "~19.8.0",
44
44
  "@nx/js": "~19.8.0",
45
- "@o3r/build-helpers": "^11.6.13",
46
- "@o3r/eslint-config": "^11.6.13",
47
- "@o3r/eslint-plugin": "^11.6.13",
48
- "@o3r/schematics": "^11.6.13",
49
- "@o3r/test-helpers": "^11.6.13",
45
+ "@o3r/build-helpers": "^11.6.15",
46
+ "@o3r/eslint-config": "^11.6.15",
47
+ "@o3r/eslint-plugin": "^11.6.15",
48
+ "@o3r/schematics": "^11.6.15",
49
+ "@o3r/test-helpers": "^11.6.15",
50
50
  "@stylistic/eslint-plugin": "~2.7.0",
51
51
  "@types/jest": "~29.5.2",
52
52
  "@types/minimist": "^1.2.2",
@@ -75,7 +75,7 @@
75
75
  "rxjs": "^7.8.1",
76
76
  "semver": "^7.5.2",
77
77
  "ts-jest": "~29.2.0",
78
- "type-fest": "^4.10.2",
78
+ "type-fest": "^4.30.1",
79
79
  "typescript": "~5.5.4",
80
80
  "typescript-eslint": "~8.19.0"
81
81
  },