@o3r/create 12.0.12 → 12.0.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.
- package/index.js +16 -0
- package/package.json +7 -7
package/index.js
CHANGED
|
@@ -103,6 +103,7 @@ const ADD_O3R_CORE_ERROR_CODE = 3;
|
|
|
103
103
|
const NPM_CONFIG_REGISTRY_ERROR_CODE = 4;
|
|
104
104
|
const YARN_CONFIG_REGISTRY_ERROR_CODE = 5;
|
|
105
105
|
const INSTALL_PROCESS_ERROR_CODE = 6;
|
|
106
|
+
const NPM_CONFIG_PEER_LEGACY_ERROR_CODE = 8;
|
|
106
107
|
const exitProcessIfErrorInSpawnSync = (exitCode, { error, status }) => {
|
|
107
108
|
if (error || status !== 0) {
|
|
108
109
|
if (error) {
|
|
@@ -184,6 +185,9 @@ const prepareWorkspace = (relativeDirectory = '.', projectPackageManager = 'npm'
|
|
|
184
185
|
exitProcessIfErrorInSpawnSync(YARN_CONFIG_REGISTRY_ERROR_CODE, (0, node_child_process_1.spawnSync)(runner, ['config', 'set', 'npmRegistryServer', registry], spawnSyncOpts));
|
|
185
186
|
}
|
|
186
187
|
}
|
|
188
|
+
if (projectPackageManager === 'npm') {
|
|
189
|
+
exitProcessIfErrorInSpawnSync(NPM_CONFIG_PEER_LEGACY_ERROR_CODE, (0, node_child_process_1.spawnSync)(runner, ['config', 'set', '-L', 'project', 'legacy-peer-deps', 'true'], spawnSyncOpts));
|
|
190
|
+
}
|
|
187
191
|
(0, node_fs_1.writeFileSync)((0, node_path_1.resolve)(cwd, '.gitattributes'), [
|
|
188
192
|
'* text eol=lf',
|
|
189
193
|
'',
|
|
@@ -213,6 +217,18 @@ const addOtterFramework = (relativeDirectory = '.', projectPackageManager = 'npm
|
|
|
213
217
|
}
|
|
214
218
|
: undefined
|
|
215
219
|
}));
|
|
220
|
+
if (projectPackageManager === 'npm') {
|
|
221
|
+
exitProcessIfErrorInSpawnSync(NPM_CONFIG_PEER_LEGACY_ERROR_CODE, (0, node_child_process_1.spawnSync)(runner, ['config', 'set', '-L', 'project', 'legacy-peer-deps', 'false'], {
|
|
222
|
+
stdio: 'inherit',
|
|
223
|
+
shell: true,
|
|
224
|
+
cwd
|
|
225
|
+
}));
|
|
226
|
+
exitProcessIfErrorInSpawnSync(INSTALL_PROCESS_ERROR_CODE, (0, node_child_process_1.spawnSync)(runner, ['install'], {
|
|
227
|
+
stdio: 'inherit',
|
|
228
|
+
cwd,
|
|
229
|
+
shell: true
|
|
230
|
+
}));
|
|
231
|
+
}
|
|
216
232
|
};
|
|
217
233
|
const projectFolder = argv._[0]?.replaceAll(' ', '-').toLowerCase() || '.';
|
|
218
234
|
console.info(logo);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@o3r/create",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.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": "^12.0.
|
|
21
|
+
"@o3r/telemetry": "^12.0.15"
|
|
22
22
|
},
|
|
23
23
|
"peerDependenciesMeta": {
|
|
24
24
|
"@o3r/telemetry": {
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
"@nx/eslint-plugin": "~20.2.0",
|
|
43
43
|
"@nx/jest": "~20.2.0",
|
|
44
44
|
"@nx/js": "~20.2.0",
|
|
45
|
-
"@o3r/build-helpers": "^12.0.
|
|
46
|
-
"@o3r/eslint-config": "^12.0.
|
|
47
|
-
"@o3r/eslint-plugin": "^12.0.
|
|
48
|
-
"@o3r/schematics": "^12.0.
|
|
49
|
-
"@o3r/test-helpers": "^12.0.
|
|
45
|
+
"@o3r/build-helpers": "^12.0.15",
|
|
46
|
+
"@o3r/eslint-config": "^12.0.15",
|
|
47
|
+
"@o3r/eslint-plugin": "^12.0.15",
|
|
48
|
+
"@o3r/schematics": "^12.0.15",
|
|
49
|
+
"@o3r/test-helpers": "^12.0.15",
|
|
50
50
|
"@stylistic/eslint-plugin": "~3.0.0",
|
|
51
51
|
"@types/jest": "~29.5.2",
|
|
52
52
|
"@types/minimist": "^1.2.2",
|