create-weapp-vite 2.0.43 → 2.0.45

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.
@@ -5,10 +5,10 @@ import fs2 from "fs-extra";
5
5
  import path2 from "pathe";
6
6
 
7
7
  // ../weapp-vite/package.json
8
- var version = "6.7.3";
8
+ var version = "6.7.5";
9
9
 
10
10
  // ../wevu/package.json
11
- var version2 = "6.7.3";
11
+ var version2 = "6.7.5";
12
12
 
13
13
  // src/enums.ts
14
14
  var TemplateName = /* @__PURE__ */ ((TemplateName2) => {
@@ -34,10 +34,10 @@ var TEMPLATE_CATALOG = {
34
34
  "@mini-types/alipay": "^3.0.14",
35
35
  "@tailwindcss/postcss": "^4.2.1",
36
36
  "@tailwindcss/vite": "^4.2.1",
37
- "@types/node": "^25.3.3",
37
+ "@types/node": "^25.4.0",
38
38
  "@types/semver": "^7.7.1",
39
39
  "@vant/weapp": "^1.11.7",
40
- "@vue/compiler-core": "^3.5.29",
40
+ "@vue/compiler-core": "^3.5.30",
41
41
  "@vue/language-core": "^3.2.5",
42
42
  "antd-mini": "^3.4.3",
43
43
  "bundle-require": "^5.1.0",
@@ -74,8 +74,8 @@ var TEMPLATE_CATALOG = {
74
74
  tailwindcss: "^3.4.19",
75
75
  tslib: "^2.8.1",
76
76
  typescript: "^5.9.3",
77
- vite: "8.0.0-beta.16",
78
- vue: "^3.5.29",
77
+ vite: "8.0.0-beta.18",
78
+ vue: "^3.5.30",
79
79
  zod: "^4.3.6"
80
80
  };
81
81
  var TEMPLATE_NAMED_CATALOG = {
@@ -178,8 +178,9 @@ dist-plugin
178
178
  dist-web
179
179
  dist/web
180
180
  vite.config.ts.timestamp-*.mjs`;
181
+ var CRLF_RE = /\r\n/g;
181
182
  function normalizeLineEndings(value) {
182
- return value.replace(/\r\n/g, "\n");
183
+ return value.replace(CRLF_RE, "\n");
183
184
  }
184
185
  function trimTrailingBlankLines(lines) {
185
186
  let end = lines.length;
@@ -196,7 +197,7 @@ function mergeGitignore(existing) {
196
197
  const normalizedExisting = normalizeLineEndings(existing ?? "");
197
198
  const existingLines = normalizedExisting.length ? normalizedExisting.split("\n") : [];
198
199
  const merged = [...existingLines];
199
- while (merged.length > 0 && merged[merged.length - 1] === "") {
200
+ while (merged.length > 0 && merged.at(-1) === "") {
200
201
  merged.pop();
201
202
  }
202
203
  const seen = new Set(merged);
@@ -204,7 +205,7 @@ function mergeGitignore(existing) {
204
205
  for (const line of DEFAULT_GITIGNORE.split("\n")) {
205
206
  const isBlank = line.length === 0;
206
207
  if (isBlank) {
207
- if (merged.length === 0 || merged[merged.length - 1] === "") {
208
+ if (merged.length === 0 || merged.at(-1) === "") {
208
209
  continue;
209
210
  }
210
211
  merged.push("");
@@ -213,7 +214,7 @@ function mergeGitignore(existing) {
213
214
  if (seen.has(line)) {
214
215
  continue;
215
216
  }
216
- if (!appendedNonBlank && merged.length > 0 && merged[merged.length - 1] !== "") {
217
+ if (!appendedNonBlank && merged.length > 0 && merged.at(-1) !== "") {
217
218
  merged.push("");
218
219
  }
219
220
  merged.push(line);
@@ -282,6 +283,7 @@ async function updateGitIgnore(options) {
282
283
  }
283
284
 
284
285
  // src/createProject.ts
286
+ var DIGIT_RE = /\d/;
285
287
  var moduleDir = path2.dirname(fileURLToPath(import.meta.url));
286
288
  var templateCatalogMap = { ...TEMPLATE_CATALOG };
287
289
  var templateNamedCatalogMap = Object.fromEntries(
@@ -368,7 +370,7 @@ function normalizeTemplateDependencySpecs(pkgJson) {
368
370
  deps[name] = resolveCatalogSpec(name, spec);
369
371
  } else if (spec.startsWith("workspace:")) {
370
372
  const workspaceSpec = spec.slice("workspace:".length);
371
- if (workspaceSpec && /\d/.test(workspaceSpec)) {
373
+ if (workspaceSpec && DIGIT_RE.test(workspaceSpec)) {
372
374
  deps[name] = workspaceSpec;
373
375
  continue;
374
376
  }
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createProject
3
- } from "./chunk-F2BZLZRW.js";
3
+ } from "./chunk-63PZBDL6.js";
4
4
 
5
5
  // src/cli.ts
6
6
  import path from "path";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  TemplateName,
3
3
  createProject
4
- } from "./chunk-F2BZLZRW.js";
4
+ } from "./chunk-63PZBDL6.js";
5
5
  export {
6
6
  TemplateName,
7
7
  createProject
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-weapp-vite",
3
3
  "type": "module",
4
- "version": "2.0.43",
4
+ "version": "2.0.45",
5
5
  "description": "create-weapp-vite",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -47,6 +47,7 @@
47
47
  "build": "tsup",
48
48
  "test": "vitest run",
49
49
  "test:dev": "vitest",
50
+ "typecheck": "tsc --noEmit",
50
51
  "release": "pnpm publish",
51
52
  "lint": "eslint .",
52
53
  "lint:fix": "eslint . --fix"