@o3r/create 12.5.0-prerelease.9 → 13.0.0-next.0
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 +8 -8
package/index.js
CHANGED
@@ -104,6 +104,7 @@ 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
106
|
const YARN_SET_PACKAGE_EXTENSIONS = 7;
|
107
|
+
const NPM_CONFIG_PEER_LEGACY_ERROR_CODE = 8;
|
107
108
|
const exitProcessIfErrorInSpawnSync = (exitCode, { error, status }) => {
|
108
109
|
if (error || status !== 0) {
|
109
110
|
if (error) {
|
@@ -188,6 +189,9 @@ const prepareWorkspace = (relativeDirectory = '.', projectPackageManager = 'npm'
|
|
188
189
|
exitProcessIfErrorInSpawnSync(YARN_CONFIG_REGISTRY_ERROR_CODE, (0, node_child_process_1.spawnSync)(runner, ['config', 'set', 'npmRegistryServer', registry], spawnSyncOpts));
|
189
190
|
}
|
190
191
|
}
|
192
|
+
if (projectPackageManager === 'npm') {
|
193
|
+
exitProcessIfErrorInSpawnSync(NPM_CONFIG_PEER_LEGACY_ERROR_CODE, (0, node_child_process_1.spawnSync)(runner, ['config', 'set', '-L', 'project', 'legacy-peer-deps', 'true'], spawnSyncOpts));
|
194
|
+
}
|
191
195
|
(0, node_fs_1.writeFileSync)((0, node_path_1.resolve)(cwd, '.gitattributes'), [
|
192
196
|
'* text eol=lf',
|
193
197
|
'',
|
@@ -217,6 +221,18 @@ const addOtterFramework = (relativeDirectory = '.', projectPackageManager = 'npm
|
|
217
221
|
}
|
218
222
|
: undefined
|
219
223
|
}));
|
224
|
+
if (projectPackageManager === 'npm') {
|
225
|
+
exitProcessIfErrorInSpawnSync(NPM_CONFIG_PEER_LEGACY_ERROR_CODE, (0, node_child_process_1.spawnSync)(runner, ['config', 'set', '-L', 'project', 'legacy-peer-deps', 'false'], {
|
226
|
+
stdio: 'inherit',
|
227
|
+
shell: true,
|
228
|
+
cwd
|
229
|
+
}));
|
230
|
+
exitProcessIfErrorInSpawnSync(INSTALL_PROCESS_ERROR_CODE, (0, node_child_process_1.spawnSync)(runner, ['install'], {
|
231
|
+
stdio: 'inherit',
|
232
|
+
cwd,
|
233
|
+
shell: true
|
234
|
+
}));
|
235
|
+
}
|
220
236
|
};
|
221
237
|
const projectFolder = argv._[0]?.replaceAll(' ', '-').toLowerCase() || '.';
|
222
238
|
console.info(logo);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@o3r/create",
|
3
|
-
"version": "
|
3
|
+
"version": "13.0.0-next.0",
|
4
4
|
"publishConfig": {
|
5
5
|
"access": "public"
|
6
6
|
},
|
@@ -17,7 +17,7 @@
|
|
17
17
|
"postbuild": "cpy package.json dist/"
|
18
18
|
},
|
19
19
|
"peerDependencies": {
|
20
|
-
"@o3r/telemetry": "^
|
20
|
+
"@o3r/telemetry": "^13.0.0-next.0"
|
21
21
|
},
|
22
22
|
"peerDependenciesMeta": {
|
23
23
|
"@o3r/telemetry": {
|
@@ -41,11 +41,11 @@
|
|
41
41
|
"@nx/eslint-plugin": "~20.8.0",
|
42
42
|
"@nx/jest": "~20.8.0",
|
43
43
|
"@nx/js": "~20.8.0",
|
44
|
-
"@o3r/build-helpers": "^
|
45
|
-
"@o3r/eslint-config": "^
|
46
|
-
"@o3r/eslint-plugin": "^
|
47
|
-
"@o3r/schematics": "^
|
48
|
-
"@o3r/test-helpers": "^
|
44
|
+
"@o3r/build-helpers": "^13.0.0-next.0",
|
45
|
+
"@o3r/eslint-config": "^13.0.0-next.0",
|
46
|
+
"@o3r/eslint-plugin": "^13.0.0-next.0",
|
47
|
+
"@o3r/schematics": "^13.0.0-next.0",
|
48
|
+
"@o3r/test-helpers": "^13.0.0-next.0",
|
49
49
|
"@stylistic/eslint-plugin": "~3.1.0",
|
50
50
|
"@types/jest": "~29.5.2",
|
51
51
|
"@types/minimist": "^1.2.2",
|
@@ -59,7 +59,7 @@
|
|
59
59
|
"eslint-import-resolver-typescript": "~3.10.0",
|
60
60
|
"eslint-plugin-import": "~2.31.0",
|
61
61
|
"eslint-plugin-import-newlines": "~1.4.0",
|
62
|
-
"eslint-plugin-jest": "~28.
|
62
|
+
"eslint-plugin-jest": "~28.14.0",
|
63
63
|
"eslint-plugin-jsdoc": "~50.8.0",
|
64
64
|
"eslint-plugin-prefer-arrow": "~1.2.3",
|
65
65
|
"eslint-plugin-unicorn": "~56.0.0",
|