vite-plus 0.2.1 → 0.2.3

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 (69) hide show
  1. package/bin/oxfmt +6 -3
  2. package/bin/oxlint +6 -3
  3. package/bin/vpr +9 -0
  4. package/binding/index.cjs +53 -53
  5. package/binding/index.d.cts +86 -144
  6. package/dist/agent-D3nZAMGI.js +9456 -0
  7. package/dist/bin.js +10 -7
  8. package/dist/{cli-truncate-CWsmbK3p.js → cli-truncate-BVOlIIPy.js} +1 -1
  9. package/dist/config/bin.js +2 -2
  10. package/dist/{constants-CrfJQIUX.js → constants-CZ7Mnq-C.js} +7 -3
  11. package/dist/create/bin.js +800 -806
  12. package/dist/{define-config-2tfJoXr1.d.ts → define-config-BuMs_LKa.d.ts} +64 -9
  13. package/dist/{define-config-DJUehepE.js → define-config-D2jo1xVA.js} +43 -18
  14. package/dist/{define-config-BGSjF6Xp.cjs → define-config-Dut6XD42.cjs} +61 -22
  15. package/dist/define-config.cjs +2 -1
  16. package/dist/define-config.d.ts +2 -2
  17. package/dist/define-config.js +2 -2
  18. package/dist/{dist-Oxo16Y0q.js → dist-CKz3vcoG.js} +4 -4
  19. package/dist/dist-CtM2JRbM.js +3 -0
  20. package/dist/editor-D1BZiU1h.js +584 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/{json-Dn87fvjk.js → json-DiRs8ceZ.js} +13 -1
  25. package/dist/{log-update-lyIiuflf.js → log-update-DHZRyJ2m.js} +2 -2
  26. package/dist/migration/bin.d.ts +1 -10
  27. package/dist/migration/bin.js +531 -170
  28. package/dist/migration/compat/worker.d.ts +1 -0
  29. package/dist/migration/compat/worker.js +35 -0
  30. package/dist/{oxlint-plugin-config-q8a5PFch.js → oxlint-plugin-config-BSbv66Qn.js} +1 -1
  31. package/dist/oxlint-plugin.js +78 -9
  32. package/dist/pack-bin.js +1 -1
  33. package/dist/{package-BHirM1_v.js → package-Cpo2ei_V.js} +52 -3
  34. package/dist/protocol-D99W10Qi.js +4 -0
  35. package/dist/{report-BHSkWqRR.js → report-BS7ULx7A.js} +2 -0
  36. package/dist/{resolve-vite-config-CmdsfQzS.js → resolve-vite-config-DX2o0SWM.js} +14 -10
  37. package/dist/{rolldown-runtime-DnnnRqeS.js → rolldown-runtime-C7HZzL1F.js} +1 -1
  38. package/dist/staged/bin.js +23 -19
  39. package/dist/{tsconfig-BWQPmGKz.js → tsconfig-D6sTl0dN.js} +439 -208
  40. package/dist/version.js +2 -5
  41. package/dist/versions.js +5 -5
  42. package/dist/{wrap-ansi-k7Dn4VtV.js → wrap-ansi-DNjkuBEp.js} +1 -1
  43. package/dist/wrap-ansi-DUi52C6W.js +2 -0
  44. package/docs/_data/team.ts +9 -0
  45. package/docs/config/check.md +35 -0
  46. package/docs/config/index.md +2 -0
  47. package/docs/config/run.md +61 -12
  48. package/docs/guide/automatic-data-tracking.md +145 -0
  49. package/docs/guide/cache.md +14 -35
  50. package/docs/guide/check.md +16 -0
  51. package/docs/guide/ci.md +4 -0
  52. package/docs/guide/docker.md +175 -0
  53. package/docs/guide/env.md +13 -1
  54. package/docs/guide/github-actions-cache.md +165 -0
  55. package/docs/guide/install.md +12 -2
  56. package/docs/guide/migrate-rules.md +347 -0
  57. package/docs/guide/migrate.md +14 -0
  58. package/docs/guide/pack.md +8 -0
  59. package/docs/guide/run.md +33 -3
  60. package/docs/guide/troubleshooting.md +3 -3
  61. package/docs/guide/upgrade.md +43 -21
  62. package/docs/package.json +3 -2
  63. package/docs/vite.config.ts +17 -0
  64. package/package.json +19 -18
  65. package/dist/agent--cKmgD_n.js +0 -3341
  66. package/dist/compat-Cql3K40m.js +0 -14
  67. package/dist/dist-DRJUd9bL.js +0 -3
  68. package/dist/workspace-D0AVy4fu.js +0 -5830
  69. package/dist/wrap-ansi-CeQuiQ31.js +0 -2
package/dist/bin.js CHANGED
@@ -1,9 +1,9 @@
1
- import { d as resolve$1, f as resolveBundled, n as BASEURL_TSCONFIG_WARNING, o as VITE_PLUS_NAME, r as DEFAULT_ENVS } from "./constants-CrfJQIUX.js";
2
- import { r as createDefaultVitePlusLintConfig } from "./oxlint-plugin-config-q8a5PFch.js";
3
- import { I as runCommandSilently, i as hasBaseUrlInTsconfig, r as fixBaseUrlInTsconfig } from "./tsconfig-BWQPmGKz.js";
1
+ import { f as resolve$1, i as DEFAULT_ENVS, n as BASEURL_TSCONFIG_WARNING, p as resolveBundled, r as CONFIG_METADATA_ENV, s as VITE_PLUS_NAME } from "./constants-CZ7Mnq-C.js";
2
+ import { r as createDefaultVitePlusLintConfig } from "./oxlint-plugin-config-BSbv66Qn.js";
3
+ import { B as runCommandSilently, i as hasBaseUrlInTsconfig, r as fixBaseUrlInTsconfig } from "./tsconfig-D6sTl0dN.js";
4
4
  import { n as errorMsg, r as log, s as warnMsg, t as accent } from "./terminal-uTv0ZaMr.js";
5
5
  import { t as resolveTsgolintExecutable } from "./tsgolint-path-B-yOos8p.js";
6
- import { i as resolveUniversalViteConfig } from "./resolve-vite-config-CmdsfQzS.js";
6
+ import { i as resolveUniversalViteConfig } from "./resolve-vite-config-DX2o0SWM.js";
7
7
  import path, { dirname, join } from "node:path";
8
8
  import { hasConfigKey, mergeJsonConfig, run } from "../binding/index.js";
9
9
  import fs, { readFileSync } from "node:fs";
@@ -34,7 +34,10 @@ import { fileURLToPath } from "node:url";
34
34
  async function fmt() {
35
35
  return {
36
36
  binPath: join(dirname(dirname(resolve$1("oxfmt"))), "bin", "oxfmt"),
37
- envs: { ...DEFAULT_ENVS }
37
+ envs: {
38
+ ...DEFAULT_ENVS,
39
+ [CONFIG_METADATA_ENV]: "1"
40
+ }
38
41
  };
39
42
  }
40
43
  //#endregion
@@ -269,7 +272,8 @@ async function lint() {
269
272
  binPath,
270
273
  envs: {
271
274
  ...DEFAULT_ENVS,
272
- OXLINT_TSGOLINT_PATH: oxlintTsgolintPath
275
+ OXLINT_TSGOLINT_PATH: oxlintTsgolintPath,
276
+ [CONFIG_METADATA_ENV]: "1"
273
277
  }
274
278
  };
275
279
  }
@@ -401,7 +405,6 @@ if (args[0] === "help" && args[1]) {
401
405
  process.argv = process.argv.slice(0, 2).concat(args);
402
406
  }
403
407
  const command = args[0];
404
- process.env.VP_COMMAND = command ?? "";
405
408
  if (command === "create") await import("./create/bin.js");
406
409
  else if (command === "migrate") await import("./migration/bin.js");
407
410
  else if (command === "config") await import("./config/bin.js");
@@ -9,7 +9,7 @@ const C1_ST_CODE_POINT = 156;
9
9
  const C1_OSC_CODE_POINT = 157;
10
10
  const C1_PM_CODE_POINT = 158;
11
11
  const C1_APC_CODE_POINT = 159;
12
- const ESCAPES = new Set([
12
+ const ESCAPES = /* @__PURE__ */ new Set([
13
13
  ESCAPE_CODE_POINT,
14
14
  C1_DCS_CODE_POINT,
15
15
  C1_SOS_CODE_POINT,
@@ -1,7 +1,7 @@
1
- import { d as promptGitHooks, l as defaultInteractive } from "../tsconfig-BWQPmGKz.js";
1
+ import { f as promptGitHooks, u as defaultInteractive } from "../tsconfig-D6sTl0dN.js";
2
2
  import { a as printHeader, r as log } from "../terminal-uTv0ZaMr.js";
3
3
  import { t as lib_default } from "../lib-L3DWSRQp.js";
4
- import { E as hasStagedConfigInViteConfig, S as ensurePreCommitHook, o as updateExistingAgentInstructions } from "../agent--cKmgD_n.js";
4
+ import { o as updateExistingAgentInstructions, v as ensurePreCommitHook, x as hasStagedConfigInViteConfig } from "../agent-D3nZAMGI.js";
5
5
  import { t as renderCliDoc } from "../help-YP84FSEz.js";
6
6
  import { join } from "node:path";
7
7
  import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
@@ -1,10 +1,13 @@
1
1
  import { createRequire } from "node:module";
2
+ //#region package.json
3
+ var version = "0.2.3";
4
+ //#endregion
2
5
  //#region src/utils/constants.ts
3
6
  const VITE_PLUS_NAME = "vite-plus";
4
- const VITE_PLUS_VERSION = process.env.VP_VERSION || "latest";
7
+ const VITE_PLUS_VERSION = process.env.VP_VERSION || version;
5
8
  const VITEST_VERSION = "4.1.9";
6
9
  const VITE_PLUS_OVERRIDE_PACKAGES = process.env.VP_OVERRIDE_PACKAGES ? JSON.parse(process.env.VP_OVERRIDE_PACKAGES) : {
7
- vite: "npm:@voidzero-dev/vite-plus-core@latest",
10
+ vite: `npm:@voidzero-dev/vite-plus-core@${VITE_PLUS_VERSION}`,
8
11
  vitest: VITEST_VERSION
9
12
  };
10
13
  /**
@@ -62,5 +65,6 @@ const DEFAULT_ENVS = {
62
65
  JS_RUNTIME_NAME: process.release.name,
63
66
  NODE_PACKAGE_MANAGER: "vite-plus"
64
67
  };
68
+ const CONFIG_METADATA_ENV = "VP_RESOLVING_CONFIG_METADATA";
65
69
  //#endregion
66
- export { VITEST_VERSION as a, VITE_PLUS_VERSION as c, resolve as d, resolveBundled as f, VITEST_AGE_GATE_EXEMPT_PACKAGES as i, createBaseUrlTsconfigFixArgs as l, BASEURL_TSCONFIG_WARNING as n, VITE_PLUS_NAME as o, DEFAULT_ENVS as r, VITE_PLUS_OVERRIDE_PACKAGES as s, BASEURL_TSCONFIG_FIX_PACKAGE as t, isForceOverrideMode as u };
70
+ export { VITEST_AGE_GATE_EXEMPT_PACKAGES as a, VITE_PLUS_OVERRIDE_PACKAGES as c, isForceOverrideMode as d, resolve as f, DEFAULT_ENVS as i, VITE_PLUS_VERSION as l, version as m, BASEURL_TSCONFIG_WARNING as n, VITEST_VERSION as o, resolveBundled as p, CONFIG_METADATA_ENV as r, VITE_PLUS_NAME as s, BASEURL_TSCONFIG_FIX_PACKAGE as t, createBaseUrlTsconfigFixArgs as u };