create-umi 4.0.64 → 4.0.65
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/dist/index.js
CHANGED
|
@@ -166,7 +166,14 @@ var src_default = async ({
|
|
|
166
166
|
const projectRoot = inMonorepo ? monorepoRoot : target;
|
|
167
167
|
const shouldInitGit = args.git !== false;
|
|
168
168
|
const withHusky = shouldInitGit && !inMonorepo;
|
|
169
|
+
let pnpmExtraNpmrc = "";
|
|
169
170
|
const isPnpm = npmClient === "pnpm" /* pnpm */;
|
|
171
|
+
if (isPnpm) {
|
|
172
|
+
const pnpmMajorVersion = await getPnpmMajorVersion();
|
|
173
|
+
if (pnpmMajorVersion === 7) {
|
|
174
|
+
pnpmExtraNpmrc = `strict-peer-dependencies=false`;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
170
177
|
const injectInternalTemplateFiles = async () => {
|
|
171
178
|
const generator = new import_utils.BaseGenerator({
|
|
172
179
|
path: (0, import_path.join)(__dirname, "..", "templates", appTemplate),
|
|
@@ -179,10 +186,7 @@ var src_default = async ({
|
|
|
179
186
|
author,
|
|
180
187
|
email,
|
|
181
188
|
withHusky,
|
|
182
|
-
|
|
183
|
-
// No need when `pnpm` > v7.13.5 , but we are forward compatible
|
|
184
|
-
// https://pnpm.io/npmrc#strict-peer-dependencies
|
|
185
|
-
extraNpmrc: isPnpm ? `strict-peer-dependencies=false` : "",
|
|
189
|
+
extraNpmrc: isPnpm ? pnpmExtraNpmrc : "",
|
|
186
190
|
pluginName
|
|
187
191
|
}
|
|
188
192
|
});
|
|
@@ -254,5 +258,13 @@ async function removeHusky(opts) {
|
|
|
254
258
|
await import_utils.fsExtra.remove(dir);
|
|
255
259
|
}
|
|
256
260
|
}
|
|
261
|
+
async function getPnpmMajorVersion() {
|
|
262
|
+
try {
|
|
263
|
+
const { stdout } = await import_utils.execa.execa("pnpm", ["--version"]);
|
|
264
|
+
return parseInt(stdout.trim().split(".")[0], 10);
|
|
265
|
+
} catch (e) {
|
|
266
|
+
throw new Error("Please install pnpm first", { cause: e });
|
|
267
|
+
}
|
|
268
|
+
}
|
|
257
269
|
// Annotate the CommonJS export names for ESM import in node:
|
|
258
270
|
0 && (module.exports = {});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-umi",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.65",
|
|
4
4
|
"description": "create-umi",
|
|
5
5
|
"homepage": "https://github.com/umijs/umi/tree/master/packages/create-umi#readme",
|
|
6
6
|
"bugs": "https://github.com/umijs/umi/issues",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"templates"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@umijs/utils": "4.0.
|
|
22
|
+
"@umijs/utils": "4.0.65"
|
|
23
23
|
},
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
"start": "npm run dev"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@ant-design/icons": "^
|
|
15
|
-
"@ant-design/pro-components": "^2.
|
|
14
|
+
"@ant-design/icons": "^5.0.1",
|
|
15
|
+
"@ant-design/pro-components": "^2.4.4",
|
|
16
16
|
"@umijs/max": "{{{ version }}}",
|
|
17
|
-
"antd": "^5.
|
|
17
|
+
"antd": "^5.4.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@types/react": "^18.0.
|
|
21
|
-
"@types/react-dom": "^18.0.
|
|
22
|
-
"husky": "^8.0.
|
|
23
|
-
"lint-staged": "^13.0
|
|
24
|
-
"prettier": "^2.7
|
|
25
|
-
"prettier-plugin-organize-imports": "^2",
|
|
26
|
-
"prettier-plugin-packagejson": "^2",
|
|
27
|
-
"typescript": "^5.0.
|
|
20
|
+
"@types/react": "^18.0.33",
|
|
21
|
+
"@types/react-dom": "^18.0.11",{{#withHusky}}
|
|
22
|
+
"husky": "^8.0.3",{{/withHusky}}
|
|
23
|
+
"lint-staged": "^13.2.0",
|
|
24
|
+
"prettier": "^2.8.7",
|
|
25
|
+
"prettier-plugin-organize-imports": "^3.2.2",
|
|
26
|
+
"prettier-plugin-packagejson": "^2.4.3",
|
|
27
|
+
"typescript": "^5.0.3"
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
"start": "npm run dev"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"vue": "^3.2.
|
|
11
|
+
"vue": "^3.2.47",
|
|
12
12
|
"umi": "{{{ version }}}"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"typescript": "^5.0.
|
|
15
|
+
"typescript": "^5.0.3",
|
|
16
16
|
"@umijs/preset-vue": "{{{ version }}}"
|
|
17
17
|
}
|
|
18
18
|
}
|