vite-plus 0.3.3 → 1.0.0-rc.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.
Files changed (138) hide show
  1. package/LICENSE +35 -146
  2. package/README.md +3 -3
  3. package/binding/index.cjs +57 -54
  4. package/binding/index.d.cts +9 -0
  5. package/dist/{agent-Cu6-tXIP.js → agent-Dinpyd-k.js} +6 -5
  6. package/dist/bin.js +48 -18
  7. package/dist/config/bin.js +2 -2
  8. package/dist/constants-CiKwrA0v.js +356 -0
  9. package/dist/create/bin.js +18 -12
  10. package/dist/{define-config-DPNEJxPz.d.ts → define-config-B9usMnEa.d.ts} +51 -10
  11. package/dist/{define-config-D0mevyb3.cjs → define-config-CBccpane.cjs} +173 -44
  12. package/dist/{define-config-IgzmnvvV.js → define-config-jhuYJ7Tb.js} +158 -42
  13. package/dist/define-config.cjs +1 -1
  14. package/dist/define-config.d.ts +1 -1
  15. package/dist/define-config.js +1 -1
  16. package/dist/documentation-DqcZSthV.js +11 -0
  17. package/dist/{editor-4sjlHmUh.js → editor-DMBczTdj.js} +205 -152
  18. package/dist/index.cjs +1 -1
  19. package/dist/index.d.ts +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/{json-cULBl7Pi.js → json-JP24qHUF.js} +14 -6
  22. package/dist/lint-plugins.cjs +1 -1
  23. package/dist/migration/bin.js +3122 -15
  24. package/dist/{oxlint-plugin-config-BVqEe9KY.js → oxlint-plugin-config-BgsDA6ua.js} +1 -1
  25. package/dist/oxlint-plugin.js +9 -7
  26. package/dist/pack-bin.js +1 -1
  27. package/dist/{package-CHH8jWan.js → package-B85H2Nw0.js} +6 -2
  28. package/dist/{vitest-ecosystem-BiRqcaRI.js → package-overrides-Dpn4scvN.js} +1 -7
  29. package/dist/{prompts-k14KgthC.js → prompts-CQobX7uP.js} +2 -2
  30. package/dist/{resolve-vite-config-BqvS2P98.js → resolve-vite-config-BUFUmi8h.js} +2 -2
  31. package/dist/{resolve-vite-config-CTOTuqTi.js → resolve-vite-config-I8fmpR7I.js} +1 -1
  32. package/dist/staged/bin.js +1205 -3317
  33. package/dist/sync-versions/bin.js +3 -2
  34. package/dist/sync-versions/bin.mjs +17 -2
  35. package/dist/test/browser/context.js +1 -1
  36. package/dist/test/browser/providers/playwright/context.js +1 -1
  37. package/dist/test/browser/providers/preview/context.js +1 -1
  38. package/dist/test/browser-playwright/context.js +1 -1
  39. package/dist/test/browser-preview/context.js +1 -1
  40. package/dist/test/context.d.ts +2 -942
  41. package/dist/test/context.js +1 -1
  42. package/dist/test/internal/traces.js +1 -0
  43. package/dist/test/locators.d.ts +2 -294
  44. package/dist/test/matchers.d.ts +2 -29
  45. package/dist/test/mocker.d.ts +2 -0
  46. package/dist/test/mocker.js +1 -0
  47. package/dist/test/{browser-webdriverio/context.js → plugins/browser-context.d.ts} +1 -0
  48. package/dist/test/plugins/browser-context.js +1 -1
  49. package/dist/test/plugins/browser-locators.d.ts +2 -0
  50. package/dist/test/plugins/browser-playwright.d.ts +2 -0
  51. package/dist/test/plugins/browser-preview.d.ts +2 -0
  52. package/dist/test/plugins/browser.d.ts +2 -0
  53. package/dist/test/plugins/mocker-automock.d.ts +2 -0
  54. package/dist/test/plugins/mocker-browser.d.ts +2 -0
  55. package/dist/test/plugins/mocker-node.d.ts +2 -0
  56. package/dist/test/plugins/mocker-redirect.d.ts +2 -0
  57. package/dist/test/plugins/mocker-register.d.ts +2 -0
  58. package/dist/test/plugins/mocker-transforms.d.ts +2 -0
  59. package/dist/test/plugins/mocker.d.ts +2 -0
  60. package/dist/test/plugins/pretty-format.d.ts +2 -0
  61. package/dist/test/plugins/snapshot-environment.d.ts +2 -0
  62. package/dist/test/plugins/snapshot-manager.d.ts +2 -0
  63. package/dist/test/plugins/snapshot.d.ts +2 -0
  64. package/dist/test/plugins/spy.d.ts +2 -0
  65. package/dist/test/plugins/utils-constants.d.ts +2 -0
  66. package/dist/test/plugins/utils-diff.d.ts +2 -0
  67. package/dist/test/plugins/utils-display.d.ts +2 -0
  68. package/dist/test/plugins/utils-error.d.ts +2 -0
  69. package/dist/test/plugins/utils-helpers.d.ts +2 -0
  70. package/dist/test/plugins/utils-offset.d.ts +2 -0
  71. package/dist/test/plugins/utils-resolver.d.ts +2 -0
  72. package/dist/test/plugins/utils-serialize.d.ts +2 -0
  73. package/dist/test/plugins/utils-source-map-node.d.ts +2 -0
  74. package/dist/test/plugins/utils-source-map.d.ts +2 -0
  75. package/dist/test/plugins/utils-timers.d.ts +2 -0
  76. package/dist/test/plugins/utils.d.ts +2 -0
  77. package/dist/toolchain.js +8 -8
  78. package/dist/toolchain.json +8 -8
  79. package/dist/{tsconfig-C3h9CVTA.js → tsconfig-Buo0RSzz.js} +8 -4
  80. package/dist/{tsconfig-euB-GmIE.js → tsconfig-C1VeTG9k.js} +1 -1
  81. package/dist/version.js +5 -3
  82. package/dist/versions.js +4 -4
  83. package/dist/vitest-ecosystem-BU0AqZq-.js +23 -0
  84. package/dist/vitest-v5-entry-points-DthU1e_O.js +25 -0
  85. package/docs/config/fmt.md +2 -2
  86. package/docs/config/lint.md +2 -2
  87. package/docs/config/run.md +1 -1
  88. package/docs/guide/check.md +2 -0
  89. package/docs/guide/commit-hooks.md +8 -1
  90. package/docs/guide/env.md +18 -13
  91. package/docs/guide/fmt.md +4 -2
  92. package/docs/guide/index.md +1 -1
  93. package/docs/guide/install.md +1 -1
  94. package/docs/guide/lint.md +3 -1
  95. package/docs/guide/local-cli.md +3 -3
  96. package/docs/guide/migrate-rules.md +16 -12
  97. package/docs/guide/migrate.md +86 -20
  98. package/docs/guide/monorepo.md +5 -1
  99. package/docs/guide/test.md +2 -0
  100. package/docs/guide/troubleshooting.md +3 -3
  101. package/docs/guide/vitest-v5.md +221 -0
  102. package/package.json +64 -87
  103. package/bin/oxfmt +0 -33
  104. package/bin/oxlint +0 -38
  105. package/dist/cli-truncate-Bg3RDXpi.js +0 -865
  106. package/dist/constants-C2dTOTe-.js +0 -80
  107. package/dist/is-fullwidth-code-point-BUNlIICg.js +0 -8
  108. package/dist/log-update-CoW8Z4Dl.js +0 -491
  109. package/dist/strip-ansi-C3wrWz9t.js +0 -853
  110. package/dist/test/browser/providers/webdriverio/context.d.ts +0 -1
  111. package/dist/test/browser/providers/webdriverio/context.js +0 -1
  112. package/dist/test/browser/providers/webdriverio.d.ts +0 -77
  113. package/dist/test/browser/providers/webdriverio.js +0 -1
  114. package/dist/test/browser-webdriverio/context.d.ts +0 -1
  115. package/dist/test/browser-webdriverio.d.ts +0 -77
  116. package/dist/test/browser-webdriverio.js +0 -1
  117. package/dist/test/coverage.d.ts +0 -2
  118. package/dist/test/coverage.js +0 -1
  119. package/dist/test/environments.d.ts +0 -2
  120. package/dist/test/environments.js +0 -1
  121. package/dist/test/plugins/browser-webdriverio.js +0 -1
  122. package/dist/test/plugins/expect.js +0 -1
  123. package/dist/test/plugins/runner-types.js +0 -1
  124. package/dist/test/plugins/runner-utils.js +0 -1
  125. package/dist/test/plugins/runner.js +0 -1
  126. package/dist/test/reporters.d.ts +0 -2
  127. package/dist/test/reporters.js +0 -1
  128. package/dist/test/runners.d.ts +0 -2
  129. package/dist/test/runners.js +0 -1
  130. package/dist/test/snapshot.d.ts +0 -2
  131. package/dist/test/snapshot.js +0 -1
  132. package/dist/test/suite.d.ts +0 -2
  133. package/dist/test/suite.js +0 -1
  134. package/dist/tsgolint-path-CbDReEOx.js +0 -34
  135. package/dist/tsgolint-path.d.ts +0 -7
  136. package/dist/tsgolint-path.js +0 -2
  137. package/dist/wrap-ansi-DNjkuBEp.js +0 -157
  138. package/dist/wrap-ansi-DUi52C6W.js +0 -2
@@ -1,6 +1,6 @@
1
1
  import { i as log, n as errorMsg } from "../terminal-MKGAuy-p.js";
2
- import { i as promptGitHooks, n as defaultInteractive } from "../prompts-k14KgthC.js";
3
- import { o as updateExistingAgentInstructions } from "../agent-Cu6-tXIP.js";
2
+ import { i as promptGitHooks, n as defaultInteractive } from "../prompts-CQobX7uP.js";
3
+ import { o as updateExistingAgentInstructions } from "../agent-Dinpyd-k.js";
4
4
  import { t as require_dist } from "../dist-BDYZP12R.js";
5
5
  import { a as install, c as resolveHooksLocation, o as isGitHooksEnvDisabled, s as isHooksUserDisabled } from "../hooks-C-4gykWR.js";
6
6
  import { t as unwrapCliParseOutcome } from "../cli-parse-DHE8NrBU.js";
@@ -0,0 +1,356 @@
1
+ import { createRequire } from "node:module";
2
+ //#region package.json
3
+ var version = "1.0.0-rc.0";
4
+ var exports = {
5
+ ".": {
6
+ "types": "./dist/index.d.ts",
7
+ "import": "./dist/index.js",
8
+ "require": "./dist/index.cjs"
9
+ },
10
+ "./client": { "types": "./dist/client.d.ts" },
11
+ "./module-runner": {
12
+ "types": "./dist/module-runner.d.ts",
13
+ "default": "./dist/module-runner.js"
14
+ },
15
+ "./internal": {
16
+ "types": "./dist/internal.d.ts",
17
+ "default": "./dist/internal.js"
18
+ },
19
+ "./dist/client/*": "./dist/client/*",
20
+ "./types/internal/*": null,
21
+ "./types/*": { "types": "./dist/types/*" },
22
+ "./bin": { "import": "./dist/bin.js" },
23
+ "./fmt": {
24
+ "types": "./dist/fmt.d.ts",
25
+ "import": "./dist/fmt.js"
26
+ },
27
+ "./lint": {
28
+ "types": "./dist/lint.d.ts",
29
+ "import": "./dist/lint.js"
30
+ },
31
+ "./lint/plugins": {
32
+ "types": "./dist/lint-plugins.d.ts",
33
+ "import": "./dist/lint-plugins.js",
34
+ "require": "./dist/lint-plugins.cjs"
35
+ },
36
+ "./lint/plugins-dev": {
37
+ "types": "./dist/lint-plugins-dev.d.ts",
38
+ "default": "./dist/lint-plugins-dev.js"
39
+ },
40
+ "./oxlint-plugin": {
41
+ "module-sync": "./dist/oxlint-plugin.js",
42
+ "node": "./dist/oxlint-plugin.js",
43
+ "import": "./dist/oxlint-plugin.js",
44
+ "default": "./dist/oxlint-plugin.js",
45
+ "types": "./dist/oxlint-plugin.d.ts"
46
+ },
47
+ "./package.json": "./package.json",
48
+ "./pack": {
49
+ "types": "./dist/pack.d.ts",
50
+ "import": "./dist/pack.js"
51
+ },
52
+ "./pack/client": { "types": "./dist/pack-client.d.ts" },
53
+ "./toolchain": {
54
+ "types": "./dist/toolchain.d.ts",
55
+ "default": "./dist/toolchain.js"
56
+ },
57
+ "./versions": {
58
+ "types": "./dist/versions.d.ts",
59
+ "default": "./dist/versions.js"
60
+ },
61
+ "./test": {
62
+ "import": {
63
+ "types": "./dist/test/index.d.ts",
64
+ "default": "./dist/test/index.js"
65
+ },
66
+ "require": {
67
+ "types": "./dist/test/index.d.cts",
68
+ "default": "./dist/test/index.cjs"
69
+ }
70
+ },
71
+ "./test/browser": {
72
+ "types": "./dist/test/browser.d.ts",
73
+ "default": "./dist/test/browser.js"
74
+ },
75
+ "./test/optional-types.js": { "types": "./dist/test/optional-types.js.d.ts" },
76
+ "./test/optional-runtime-types.js": { "types": "./dist/test/optional-runtime-types.js.d.ts" },
77
+ "./test/globals": { "types": "./dist/test/globals.d.ts" },
78
+ "./test/jsdom": { "types": "./dist/test/jsdom.d.ts" },
79
+ "./test/importMeta": { "types": "./dist/test/importMeta.d.ts" },
80
+ "./test/import-meta": { "types": "./dist/test/import-meta.d.ts" },
81
+ "./test/node": {
82
+ "types": "./dist/test/node.d.ts",
83
+ "default": "./dist/test/node.js"
84
+ },
85
+ "./test/internal/browser": {
86
+ "types": "./dist/test/internal/browser.d.ts",
87
+ "default": "./dist/test/internal/browser.js"
88
+ },
89
+ "./test/internal/traces": { "default": "./dist/test/internal/traces.js" },
90
+ "./test/config": {
91
+ "types": "./dist/test/config.d.ts",
92
+ "require": "./dist/test/config.cjs",
93
+ "default": "./dist/test/config.js"
94
+ },
95
+ "./test/runtime": {
96
+ "types": "./dist/test/runtime.d.ts",
97
+ "default": "./dist/test/runtime.js"
98
+ },
99
+ "./test/worker": {
100
+ "types": "./dist/test/worker.d.ts",
101
+ "default": "./dist/test/worker.js"
102
+ },
103
+ "./test/mocker": {
104
+ "types": "./dist/test/mocker.d.ts",
105
+ "default": "./dist/test/mocker.js"
106
+ },
107
+ "./test/browser-playwright": {
108
+ "types": "./dist/test/browser-playwright.d.ts",
109
+ "default": "./dist/test/browser-playwright.js"
110
+ },
111
+ "./test/browser/providers/playwright": {
112
+ "types": "./dist/test/browser/providers/playwright.d.ts",
113
+ "default": "./dist/test/browser/providers/playwright.js"
114
+ },
115
+ "./test/browser-playwright/context": {
116
+ "types": "./dist/test/browser-playwright/context.d.ts",
117
+ "default": "./dist/test/browser-playwright/context.js"
118
+ },
119
+ "./test/browser/providers/playwright/context": {
120
+ "types": "./dist/test/browser/providers/playwright/context.d.ts",
121
+ "default": "./dist/test/browser/providers/playwright/context.js"
122
+ },
123
+ "./test/browser-preview": {
124
+ "types": "./dist/test/browser-preview.d.ts",
125
+ "default": "./dist/test/browser-preview.js"
126
+ },
127
+ "./test/browser/providers/preview": {
128
+ "types": "./dist/test/browser/providers/preview.d.ts",
129
+ "default": "./dist/test/browser/providers/preview.js"
130
+ },
131
+ "./test/browser-preview/context": {
132
+ "types": "./dist/test/browser-preview/context.d.ts",
133
+ "default": "./dist/test/browser-preview/context.js"
134
+ },
135
+ "./test/browser/providers/preview/context": {
136
+ "types": "./dist/test/browser/providers/preview/context.d.ts",
137
+ "default": "./dist/test/browser/providers/preview/context.js"
138
+ },
139
+ "./test/browser/context": {
140
+ "types": "./dist/test/browser/context.d.ts",
141
+ "default": "./dist/test/browser/context.js"
142
+ },
143
+ "./test/client": { "default": "./dist/test/client.js" },
144
+ "./test/context": {
145
+ "types": "./dist/test/context.d.ts",
146
+ "default": "./dist/test/context.js"
147
+ },
148
+ "./test/locators": {
149
+ "types": "./dist/test/locators.d.ts",
150
+ "default": "./dist/test/locators.js"
151
+ },
152
+ "./test/matchers": {
153
+ "types": "./dist/test/matchers.d.ts",
154
+ "default": "./dist/test/matchers.js"
155
+ },
156
+ "./test/utils": { "default": "./dist/test/utils.js" },
157
+ "./test/browser-compat": {
158
+ "types": "./dist/test/browser-compat.d.ts",
159
+ "default": "./dist/test/browser-compat.js"
160
+ },
161
+ "./test/plugins/utils": {
162
+ "types": "./dist/test/plugins/utils.d.ts",
163
+ "default": "./dist/test/plugins/utils.js"
164
+ },
165
+ "./test/plugins/utils-source-map": {
166
+ "types": "./dist/test/plugins/utils-source-map.d.ts",
167
+ "default": "./dist/test/plugins/utils-source-map.js"
168
+ },
169
+ "./test/plugins/utils-source-map-node": {
170
+ "types": "./dist/test/plugins/utils-source-map-node.d.ts",
171
+ "default": "./dist/test/plugins/utils-source-map-node.js"
172
+ },
173
+ "./test/plugins/utils-error": {
174
+ "types": "./dist/test/plugins/utils-error.d.ts",
175
+ "default": "./dist/test/plugins/utils-error.js"
176
+ },
177
+ "./test/plugins/utils-helpers": {
178
+ "types": "./dist/test/plugins/utils-helpers.d.ts",
179
+ "default": "./dist/test/plugins/utils-helpers.js"
180
+ },
181
+ "./test/plugins/utils-display": {
182
+ "types": "./dist/test/plugins/utils-display.d.ts",
183
+ "default": "./dist/test/plugins/utils-display.js"
184
+ },
185
+ "./test/plugins/utils-timers": {
186
+ "types": "./dist/test/plugins/utils-timers.d.ts",
187
+ "default": "./dist/test/plugins/utils-timers.js"
188
+ },
189
+ "./test/plugins/utils-offset": {
190
+ "types": "./dist/test/plugins/utils-offset.d.ts",
191
+ "default": "./dist/test/plugins/utils-offset.js"
192
+ },
193
+ "./test/plugins/utils-resolver": {
194
+ "types": "./dist/test/plugins/utils-resolver.d.ts",
195
+ "default": "./dist/test/plugins/utils-resolver.js"
196
+ },
197
+ "./test/plugins/utils-serialize": {
198
+ "types": "./dist/test/plugins/utils-serialize.d.ts",
199
+ "default": "./dist/test/plugins/utils-serialize.js"
200
+ },
201
+ "./test/plugins/utils-constants": {
202
+ "types": "./dist/test/plugins/utils-constants.d.ts",
203
+ "default": "./dist/test/plugins/utils-constants.js"
204
+ },
205
+ "./test/plugins/utils-diff": {
206
+ "types": "./dist/test/plugins/utils-diff.d.ts",
207
+ "default": "./dist/test/plugins/utils-diff.js"
208
+ },
209
+ "./test/plugins/spy": {
210
+ "types": "./dist/test/plugins/spy.d.ts",
211
+ "default": "./dist/test/plugins/spy.js"
212
+ },
213
+ "./test/plugins/snapshot": {
214
+ "types": "./dist/test/plugins/snapshot.d.ts",
215
+ "default": "./dist/test/plugins/snapshot.js"
216
+ },
217
+ "./test/plugins/snapshot-environment": {
218
+ "types": "./dist/test/plugins/snapshot-environment.d.ts",
219
+ "default": "./dist/test/plugins/snapshot-environment.js"
220
+ },
221
+ "./test/plugins/snapshot-manager": {
222
+ "types": "./dist/test/plugins/snapshot-manager.d.ts",
223
+ "default": "./dist/test/plugins/snapshot-manager.js"
224
+ },
225
+ "./test/plugins/mocker": {
226
+ "types": "./dist/test/plugins/mocker.d.ts",
227
+ "default": "./dist/test/plugins/mocker.js"
228
+ },
229
+ "./test/plugins/mocker-node": {
230
+ "types": "./dist/test/plugins/mocker-node.d.ts",
231
+ "default": "./dist/test/plugins/mocker-node.js"
232
+ },
233
+ "./test/plugins/mocker-browser": {
234
+ "types": "./dist/test/plugins/mocker-browser.d.ts",
235
+ "default": "./dist/test/plugins/mocker-browser.js"
236
+ },
237
+ "./test/plugins/mocker-redirect": {
238
+ "types": "./dist/test/plugins/mocker-redirect.d.ts",
239
+ "default": "./dist/test/plugins/mocker-redirect.js"
240
+ },
241
+ "./test/plugins/mocker-transforms": {
242
+ "types": "./dist/test/plugins/mocker-transforms.d.ts",
243
+ "default": "./dist/test/plugins/mocker-transforms.js"
244
+ },
245
+ "./test/plugins/mocker-automock": {
246
+ "types": "./dist/test/plugins/mocker-automock.d.ts",
247
+ "default": "./dist/test/plugins/mocker-automock.js"
248
+ },
249
+ "./test/plugins/mocker-register": {
250
+ "types": "./dist/test/plugins/mocker-register.d.ts",
251
+ "default": "./dist/test/plugins/mocker-register.js"
252
+ },
253
+ "./test/plugins/pretty-format": {
254
+ "types": "./dist/test/plugins/pretty-format.d.ts",
255
+ "default": "./dist/test/plugins/pretty-format.js"
256
+ },
257
+ "./test/plugins/browser": {
258
+ "types": "./dist/test/plugins/browser.d.ts",
259
+ "default": "./dist/test/plugins/browser.js"
260
+ },
261
+ "./test/plugins/browser-context": {
262
+ "types": "./dist/test/plugins/browser-context.d.ts",
263
+ "default": "./dist/test/plugins/browser-context.js"
264
+ },
265
+ "./test/plugins/browser-client": { "default": "./dist/test/plugins/browser-client.js" },
266
+ "./test/plugins/browser-locators": {
267
+ "types": "./dist/test/plugins/browser-locators.d.ts",
268
+ "default": "./dist/test/plugins/browser-locators.js"
269
+ },
270
+ "./test/plugins/browser-playwright": {
271
+ "types": "./dist/test/plugins/browser-playwright.d.ts",
272
+ "default": "./dist/test/plugins/browser-playwright.js"
273
+ },
274
+ "./test/plugins/browser-preview": {
275
+ "types": "./dist/test/plugins/browser-preview.d.ts",
276
+ "default": "./dist/test/plugins/browser-preview.js"
277
+ }
278
+ };
279
+ var engines = { "node": "^22.18.0 || ^24.11.0 || >=26.0.0" };
280
+ //#endregion
281
+ //#region src/utils/constants.ts
282
+ const VITE_PLUS_NAME = "vite-plus";
283
+ const VITE_PLUS_VERSION = process.env.VP_VERSION || version;
284
+ const VITE_CONFIG_FILES = [
285
+ "vite.config.js",
286
+ "vite.config.mjs",
287
+ "vite.config.ts",
288
+ "vite.config.cjs",
289
+ "vite.config.mts",
290
+ "vite.config.cts"
291
+ ];
292
+ const VITEST_VERSION = "5.0.1";
293
+ const SETUP_VP_VERSION = "v1.21.1";
294
+ const TSDOWN_MIGRATION_SKILL_URL = "https://github.com/rolldown/tsdown/blob/main/skills/tsdown-migrate/SKILL.md";
295
+ const VITE_PLUS_OVERRIDE_PACKAGES = process.env.VP_OVERRIDE_PACKAGES ? JSON.parse(process.env.VP_OVERRIDE_PACKAGES) : {
296
+ vite: `npm:@voidzero-dev/vite-plus-core@${VITE_PLUS_VERSION}`,
297
+ vitest: VITEST_VERSION
298
+ };
299
+ /**
300
+ * Package-name patterns the migrator exempts from a package manager's
301
+ * "minimum release age" gate (pnpm `minimumReleaseAgeExclude` / Yarn
302
+ * `npmPreapprovedPackages`).
303
+ *
304
+ * Vite+ pins `vitest` to an exact, sometimes freshly published version, and the
305
+ * in-tree `@vitest/*` siblings install transitively at that same version, so an
306
+ * age gate would otherwise quarantine the Vite+-managed family and break
307
+ * `vp install`. The `@vitest/*` glob also covers the optional `@vitest/browser-*`
308
+ * peers the migrator pins for browser projects. This does NOT pin or manage any
309
+ * package — it only lets the chosen versions through the user's gate, including
310
+ * the `@vitest/coverage-*` version the coverage guard asks the user to align to
311
+ * the bundled vitest.
312
+ */
313
+ const VITEST_AGE_GATE_EXEMPT_PACKAGES = ["vitest", "@vitest/*"];
314
+ /**
315
+ * When VP_FORCE_MIGRATE is set, force full dependency rewriting
316
+ * even for projects already using vite-plus. Used by ecosystem CI to
317
+ * override dependencies with locally built tgz packages.
318
+ */
319
+ function isForceOverrideMode() {
320
+ return process.env.VP_FORCE_MIGRATE === "1";
321
+ }
322
+ const require = createRequire(import.meta.url);
323
+ function resolve(path) {
324
+ return require.resolve(path, { paths: [process.cwd(), import.meta.dirname] });
325
+ }
326
+ /**
327
+ * Like {@link resolve}, but prefers the copy shipped with the CLI
328
+ * (`import.meta.dirname`) over the project's (`process.cwd()`).
329
+ *
330
+ * Use this for runtime modules that MUST match what `vite-plus/test*`
331
+ * imports resolve to — chiefly the Vitest runner binary. The `vite-plus/test`
332
+ * shims `export * from 'vitest'`, which Node resolves to vite-plus's own
333
+ * bundled (pinned) Vitest. If `vp test` instead spawned a project-local
334
+ * Vitest (a different physical copy/version), the runner and the imported
335
+ * `vi`/`expect`/runner internals would come from two distinct Vitest
336
+ * modules — a classic source of Vitest internal-state and mock-hoisting
337
+ * mismatches. `process.cwd()` stays as a fallback for layouts where the
338
+ * bundled copy is somehow unreachable, so this is never worse than {@link resolve}.
339
+ */
340
+ function resolveBundled(path) {
341
+ return require.resolve(path, { paths: [import.meta.dirname, process.cwd()] });
342
+ }
343
+ const BASEURL_TSCONFIG_WARNING = "Skipped typeAware/typeCheck: a tsconfig file contains baseUrl which is not yet supported by the oxlint type checker.\n Run `vp dlx @andrewbranch/ts5to6 --fixBaseUrl <tsconfig path>` to remove baseUrl from your tsconfig.";
344
+ const BASEURL_TSCONFIG_FIX_PACKAGE = "@andrewbranch/ts5to6";
345
+ const BASEURL_TSCONFIG_FIX_FLAG = "--fixBaseUrl";
346
+ function createBaseUrlTsconfigFixArgs(target = ".") {
347
+ return [BASEURL_TSCONFIG_FIX_FLAG, target];
348
+ }
349
+ const DEFAULT_ENVS = {
350
+ JS_RUNTIME_VERSION: process.versions.node,
351
+ JS_RUNTIME_NAME: process.release.name,
352
+ NODE_PACKAGE_MANAGER: "vite-plus"
353
+ };
354
+ const CONFIG_METADATA_ENV = "VP_RESOLVING_CONFIG_METADATA";
355
+ //#endregion
356
+ export { engines as _, SETUP_VP_VERSION as a, VITEST_VERSION as c, VITE_PLUS_OVERRIDE_PACKAGES as d, VITE_PLUS_VERSION as f, resolveBundled as g, resolve as h, DEFAULT_ENVS as i, VITE_CONFIG_FILES as l, isForceOverrideMode as m, BASEURL_TSCONFIG_WARNING as n, TSDOWN_MIGRATION_SKILL_URL as o, createBaseUrlTsconfigFixArgs as p, CONFIG_METADATA_ENV as r, VITEST_AGE_GATE_EXEMPT_PACKAGES as s, BASEURL_TSCONFIG_FIX_PACKAGE as t, VITE_PLUS_NAME as u, exports as v, version as y };
@@ -1,14 +1,15 @@
1
1
  import { r as __toESM, t as __commonJSMin } from "../rolldown-runtime-CMFfr-1z.js";
2
+ import { t as documentationUrl$1 } from "../documentation-DqcZSthV.js";
2
3
  import { t as renderCliDoc } from "../help-BmKpeOP9.js";
3
4
  import { a as muted, i as log, o as printHeader, r as formatDuration, s as success, t as accent } from "../terminal-MKGAuy-p.js";
4
- import { u as VITE_PLUS_NAME } from "../constants-C2dTOTe-.js";
5
- import { i as readJsonFile, n as editJsonFile } from "../json-cULBl7Pi.js";
6
- import { o as fetchNpmResource, r as getScopeFromPackageName, s as getNpmRegistry, t as checkNpmPackageExists } from "../package-CHH8jWan.js";
7
- import { i as hasViteConfig, o as resolveViteConfig, r as findWorkspaceRoot, t as findViteConfig } from "../resolve-vite-config-BqvS2P98.js";
8
- import { C as multiselect, D as text, E as spinner, O as require_picocolors, S as log$1, T as select, a as resolveGitInit, c as selectPackageManager, d as readYamlFile, h as resolveApproveBuildTargets, i as promptGitHooks, k as isCancel, m as detectGatedBuilds, n as defaultInteractive, o as runViteFmt, p as approveBuilds, r as downloadPackageManager$1, s as runViteInstall, t as cancelAndExit, u as editYamlFile, v as DependencyType, x as intro, y as PackageManager } from "../prompts-k14KgthC.js";
5
+ import { u as VITE_PLUS_NAME } from "../constants-CiKwrA0v.js";
6
+ import { i as readJsonFile, n as editJsonFile } from "../json-JP24qHUF.js";
7
+ import { o as fetchNpmResource, r as getScopeFromPackageName, s as getNpmRegistry, t as checkNpmPackageExists } from "../package-B85H2Nw0.js";
8
+ import { i as hasViteConfig, o as resolveViteConfig, r as findWorkspaceRoot, t as findViteConfig } from "../resolve-vite-config-BUFUmi8h.js";
9
+ import { C as multiselect, D as text, E as spinner, O as require_picocolors, S as log$1, T as select, a as resolveGitInit, c as selectPackageManager, d as readYamlFile, h as resolveApproveBuildTargets, i as promptGitHooks, k as isCancel, m as detectGatedBuilds, n as defaultInteractive, o as runViteFmt, p as approveBuilds, r as downloadPackageManager$1, s as runViteInstall, t as cancelAndExit, u as editYamlFile, v as DependencyType, x as intro, y as PackageManager } from "../prompts-CQobX7uP.js";
9
10
  import { t as require_semver } from "../semver-CaDAb8vV.js";
10
- import { a as selectAgentTargets, c as writeCopilotSetupWorkflow, d as templatesDir, l as displayRelative, r as detectExistingAgentTargetPaths, s as writeAgentInstructions, t as COPILOT_AGENT_ID } from "../agent-Cu6-tXIP.js";
11
- import { F as addFrameworkShim, I as detectFramework, K as promptPrettierMigration, L as hasFrameworkShim, M as isBingoTemplate, N as updatePackageJsonWithDeps, P as updateWorkspaceConfig, Q as promptEslintMigration, S as injectCreateDefaultTemplate, V as promptTsupMigration, W as detectPrettierProject, Y as detectEslintProject, _ as installGitHooks, a as selectEditors, b as findGitRoot, c as rewriteMonorepoProject, h as setPackageManager, j as detectWorkspace$1, l as rewriteStandaloneProject, n as detectExistingEditors, o as writeEditorConfigs, s as rewriteMonorepo, x as initGitRepository, y as shouldSkipStagedMigrationForHooks, z as detectTsupProject } from "../editor-4sjlHmUh.js";
11
+ import { a as selectAgentTargets, c as writeCopilotSetupWorkflow, d as templatesDir, l as displayRelative, r as detectExistingAgentTargetPaths, s as writeAgentInstructions, t as COPILOT_AGENT_ID } from "../agent-Dinpyd-k.js";
12
+ import { B as addFrameworkShim, F as updateWorkspaceConfig, H as hasFrameworkShim, K as promptTsupMigration, L as findGitRoot, M as detectWorkspace$1, N as isBingoTemplate, P as updatePackageJsonWithDeps, R as initGitRepository, V as detectFramework, W as detectTsupProject, Y as detectPrettierProject, Z as promptPrettierMigration, _ as installGitHooks, a as selectEditors, b as injectCreateDefaultTemplate, c as rewriteMonorepoProject, et as detectEslintProject, h as setPackageManager, j as supportsCatalog, l as rewriteStandaloneProject, n as detectExistingEditors, o as writeEditorConfigs, rt as promptEslintMigration, s as rewriteMonorepo, y as shouldSkipStagedMigrationForHooks } from "../editor-DMBczTdj.js";
12
13
  import { n as runCommandSilently, t as runCommand$1 } from "../command-CguLh2KL.js";
13
14
  import { t as unwrapCliParseOutcome } from "../cli-parse-DHE8NrBU.js";
14
15
  import path from "node:path";
@@ -618,6 +619,7 @@ var CreateConfigSchemaError = class extends Error {
618
619
  this.name = "CreateConfigSchemaError";
619
620
  }
620
621
  };
622
+ const makeCreateConfigError = (message) => new CreateConfigSchemaError(message);
621
623
  /**
622
624
  * Validate `create.templates` from `vite.config.ts`. Returns `[]` when the field
623
625
  * is absent or an empty array; throws {@link CreateConfigSchemaError} when present
@@ -626,10 +628,9 @@ var CreateConfigSchemaError = class extends Error {
626
628
  function validateCreateTemplates(templates) {
627
629
  if (templates === void 0) return [];
628
630
  if (!Array.isArray(templates)) throw new CreateConfigSchemaError("create.templates must be an array");
629
- const makeError = (message) => new CreateConfigSchemaError(message);
630
- return validateTemplateEntries(templates, "create.templates", makeError, (entry, index) => {
631
- const validated = validateTemplateEntry(entry, index, "create.templates", makeError);
632
- if (validated.name.startsWith("vite:")) throw makeError(`create.templates[${index}].name uses the reserved \`vite:\` prefix`);
631
+ return validateTemplateEntries(templates, "create.templates", makeCreateConfigError, (entry, index) => {
632
+ const validated = validateTemplateEntry(entry, index, "create.templates", makeCreateConfigError);
633
+ if (validated.name.startsWith("vite:")) throw makeCreateConfigError(`create.templates[${index}].name uses the reserved \`vite:\` prefix`);
633
634
  return validated;
634
635
  });
635
636
  }
@@ -4379,6 +4380,11 @@ async function executeGeneratorScaffold(workspaceInfo, templateInfo, options) {
4379
4380
  fs.chmodSync(path.join(fullPath, "bin/index.ts"), "755");
4380
4381
  editJsonFile(path.join(fullPath, "package.json"), (pkg) => {
4381
4382
  pkg.name = templateInfo.packageName;
4383
+ if (!supportsCatalog(workspaceInfo.packageManager, workspaceInfo.downloadPackageManager.version, workspaceInfo.isMonorepo)) {
4384
+ const { catalog } = readYamlFile(path.join(templatesDir, "monorepo/pnpm-workspace.yaml"));
4385
+ const devDependencies = pkg.devDependencies;
4386
+ for (const [name, spec] of Object.entries(devDependencies)) if (spec === "catalog:" && catalog[name]) devDependencies[name] = catalog[name];
4387
+ }
4382
4388
  if (description) pkg.description = description;
4383
4389
  return pkg;
4384
4390
  });
@@ -4691,7 +4697,7 @@ async function executeBundledTemplate(workspaceInfo, templateInfo) {
4691
4697
  const listTemplatesMessage = renderCliDoc({
4692
4698
  usage: "vp create --list",
4693
4699
  summary: "List available builtin and popular project templates.",
4694
- documentationUrl: "https://viteplus.dev/guide/create",
4700
+ documentationUrl: documentationUrl$1("/guide/create"),
4695
4701
  sections: [
4696
4702
  {
4697
4703
  title: "Vite+ Built-in Templates",
@@ -155,15 +155,56 @@ type RunConfig = {
155
155
  enablePrePostScripts?: boolean;
156
156
  };
157
157
  //#endregion
158
- //#region ../../node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/lib/index.d.ts
159
- type SyncGenerateTask = (stagedFileNames: readonly string[]) => string | string[];
160
- type AsyncGenerateTask = (stagedFileNames: readonly string[]) => Promise<string | string[]>;
158
+ //#region ../../node_modules/.pnpm/lint-staged@17.5.1/node_modules/lint-staged/lib/config.d.ts
159
+ /**
160
+ * A single task that will be spawned
161
+ *
162
+ * @example "eslint --fix"
163
+ */
164
+ type SpawnedTask = string;
165
+ type SyncGenerateTask = (files: readonly string[]) => string | string[];
166
+ type AsyncGenerateTask = (files: readonly string[]) => Promise<string | string[]>;
167
+ /**
168
+ * A function that returns one or more tasks that will be spawned and run sequentially, in order.
169
+ * The function receives list of the matched staged files as its argument. Can be sync or async.
170
+ *
171
+ * @example <caption>Return a command after manipulating list of staged files</caption>
172
+ * (files: string) => `eslint --fix ${files.map((f) => `'${f}'`).join(' ')}`
173
+ *
174
+ * @example <caption>Ignore staged files and run "tsc" and "vitest" without any arguments</caption>
175
+ * () => ['tsc', 'vitest']
176
+ */
161
177
  type GenerateTask = SyncGenerateTask | AsyncGenerateTask;
178
+ /**
179
+ * List of tasks that will be run in parallel
180
+ *
181
+ * @example ["prettier --write", "eslint --fix"]
182
+ */
183
+ type ParallelTasks = (SpawnedTask | GenerateTask)[];
184
+ /**
185
+ * List of tasks that will be run sequentially, in order
186
+ *
187
+ * @example ["prettier --write", "eslint --fix"]
188
+ */
189
+ type SequentialTasks = (SpawnedTask | GenerateTask | ParallelTasks)[];
190
+ /**
191
+ * A single Node.js/JavaScript task that defines its title and the function which will be
192
+ * run with the list of the matched staged files as its argument.
193
+ *
194
+ * @example
195
+ * {
196
+ * title: 'Log staged files',
197
+ * task: (files: readonly string[]) => {
198
+ * console.log('Staged files:', files)
199
+ * }
200
+ * }
201
+ */
162
202
  type TaskFunction = {
163
203
  title: string;
164
- task: (stagedFileNames: readonly string[]) => void | Promise<void>;
204
+ task: (filepaths: readonly string[]) => void | Promise<void>;
165
205
  };
166
- type Configuration = Record<string, string | TaskFunction | GenerateTask | (string | GenerateTask)[]> | GenerateTask;
206
+ /** An entire `lint-staged` configuration, or a function that returns one */
207
+ type Configuration = Record<string, SpawnedTask | TaskFunction | GenerateTask | SequentialTasks> | GenerateTask;
167
208
  //#endregion
168
209
  //#region src/staged-config.d.ts
169
210
  type StagedConfig = Configuration;
@@ -266,10 +307,9 @@ declare function isVitestFamilySpecifier(id: string): boolean;
266
307
  * Absent packages are silently skipped so the server-deps optimizer never
267
308
  * tries to resolve a name that does not exist in the project's node_modules.
268
309
  *
269
- * The check is deferred to a `configResolved` plugin hook so that
270
- * `resolvedConfig.root` points at the actual project root (the value vite has
271
- * already normalised), rather than relying on `process.cwd()` at config-load
272
- * time (which can differ in workspace / monorepo setups).
310
+ * The environment hook adds installed packages to the module-runner options
311
+ * inherited by shared-server projects. The resolved-config hook also handles
312
+ * independent project servers, using each project's resolved root.
273
313
  *
274
314
  * Exported for unit testing.
275
315
  */
@@ -284,10 +324,11 @@ declare const AUTO_INLINE_DEPS: ReadonlyArray<string>;
284
324
  *
285
325
  * Exported for unit testing. The `_createRequire` parameter lets tests inject
286
326
  * a controlled resolver without needing to spy on Node's ESM module namespace.
327
+ * Callers may share installation results for the same root within one config load.
287
328
  */
288
329
  declare function computeAutoInlineList(existingInline: (string | RegExp)[] | true | undefined, projectRoot: string, _createRequire?: (from: string) => {
289
330
  resolve: (id: string) => string;
290
- }): (string | RegExp)[] | null;
331
+ }, installedPackages?: Map<string, boolean>): (string | RegExp)[] | null;
291
332
  /**
292
333
  * Resolve the coverage provider package name that should be version-checked, or
293
334
  * `null` when no check applies (coverage off, or a `custom`/unknown provider