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.
- package/LICENSE +35 -146
- package/README.md +3 -3
- package/binding/index.cjs +57 -54
- package/binding/index.d.cts +9 -0
- package/dist/{agent-Cu6-tXIP.js → agent-Dinpyd-k.js} +6 -5
- package/dist/bin.js +48 -18
- package/dist/config/bin.js +2 -2
- package/dist/constants-CiKwrA0v.js +356 -0
- package/dist/create/bin.js +18 -12
- package/dist/{define-config-DPNEJxPz.d.ts → define-config-B9usMnEa.d.ts} +51 -10
- package/dist/{define-config-D0mevyb3.cjs → define-config-CBccpane.cjs} +173 -44
- package/dist/{define-config-IgzmnvvV.js → define-config-jhuYJ7Tb.js} +158 -42
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.d.ts +1 -1
- package/dist/define-config.js +1 -1
- package/dist/documentation-DqcZSthV.js +11 -0
- package/dist/{editor-4sjlHmUh.js → editor-DMBczTdj.js} +205 -152
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{json-cULBl7Pi.js → json-JP24qHUF.js} +14 -6
- package/dist/lint-plugins.cjs +1 -1
- package/dist/migration/bin.js +3122 -15
- package/dist/{oxlint-plugin-config-BVqEe9KY.js → oxlint-plugin-config-BgsDA6ua.js} +1 -1
- package/dist/oxlint-plugin.js +9 -7
- package/dist/pack-bin.js +1 -1
- package/dist/{package-CHH8jWan.js → package-B85H2Nw0.js} +6 -2
- package/dist/{vitest-ecosystem-BiRqcaRI.js → package-overrides-Dpn4scvN.js} +1 -7
- package/dist/{prompts-k14KgthC.js → prompts-CQobX7uP.js} +2 -2
- package/dist/{resolve-vite-config-BqvS2P98.js → resolve-vite-config-BUFUmi8h.js} +2 -2
- package/dist/{resolve-vite-config-CTOTuqTi.js → resolve-vite-config-I8fmpR7I.js} +1 -1
- package/dist/staged/bin.js +1205 -3317
- package/dist/sync-versions/bin.js +3 -2
- package/dist/sync-versions/bin.mjs +17 -2
- package/dist/test/browser/context.js +1 -1
- package/dist/test/browser/providers/playwright/context.js +1 -1
- package/dist/test/browser/providers/preview/context.js +1 -1
- package/dist/test/browser-playwright/context.js +1 -1
- package/dist/test/browser-preview/context.js +1 -1
- package/dist/test/context.d.ts +2 -942
- package/dist/test/context.js +1 -1
- package/dist/test/internal/traces.js +1 -0
- package/dist/test/locators.d.ts +2 -294
- package/dist/test/matchers.d.ts +2 -29
- package/dist/test/mocker.d.ts +2 -0
- package/dist/test/mocker.js +1 -0
- package/dist/test/{browser-webdriverio/context.js → plugins/browser-context.d.ts} +1 -0
- package/dist/test/plugins/browser-context.js +1 -1
- package/dist/test/plugins/browser-locators.d.ts +2 -0
- package/dist/test/plugins/browser-playwright.d.ts +2 -0
- package/dist/test/plugins/browser-preview.d.ts +2 -0
- package/dist/test/plugins/browser.d.ts +2 -0
- package/dist/test/plugins/mocker-automock.d.ts +2 -0
- package/dist/test/plugins/mocker-browser.d.ts +2 -0
- package/dist/test/plugins/mocker-node.d.ts +2 -0
- package/dist/test/plugins/mocker-redirect.d.ts +2 -0
- package/dist/test/plugins/mocker-register.d.ts +2 -0
- package/dist/test/plugins/mocker-transforms.d.ts +2 -0
- package/dist/test/plugins/mocker.d.ts +2 -0
- package/dist/test/plugins/pretty-format.d.ts +2 -0
- package/dist/test/plugins/snapshot-environment.d.ts +2 -0
- package/dist/test/plugins/snapshot-manager.d.ts +2 -0
- package/dist/test/plugins/snapshot.d.ts +2 -0
- package/dist/test/plugins/spy.d.ts +2 -0
- package/dist/test/plugins/utils-constants.d.ts +2 -0
- package/dist/test/plugins/utils-diff.d.ts +2 -0
- package/dist/test/plugins/utils-display.d.ts +2 -0
- package/dist/test/plugins/utils-error.d.ts +2 -0
- package/dist/test/plugins/utils-helpers.d.ts +2 -0
- package/dist/test/plugins/utils-offset.d.ts +2 -0
- package/dist/test/plugins/utils-resolver.d.ts +2 -0
- package/dist/test/plugins/utils-serialize.d.ts +2 -0
- package/dist/test/plugins/utils-source-map-node.d.ts +2 -0
- package/dist/test/plugins/utils-source-map.d.ts +2 -0
- package/dist/test/plugins/utils-timers.d.ts +2 -0
- package/dist/test/plugins/utils.d.ts +2 -0
- package/dist/toolchain.js +8 -8
- package/dist/toolchain.json +8 -8
- package/dist/{tsconfig-C3h9CVTA.js → tsconfig-Buo0RSzz.js} +8 -4
- package/dist/{tsconfig-euB-GmIE.js → tsconfig-C1VeTG9k.js} +1 -1
- package/dist/version.js +5 -3
- package/dist/versions.js +4 -4
- package/dist/vitest-ecosystem-BU0AqZq-.js +23 -0
- package/dist/vitest-v5-entry-points-DthU1e_O.js +25 -0
- package/docs/config/fmt.md +2 -2
- package/docs/config/lint.md +2 -2
- package/docs/config/run.md +1 -1
- package/docs/guide/check.md +2 -0
- package/docs/guide/commit-hooks.md +8 -1
- package/docs/guide/env.md +18 -13
- package/docs/guide/fmt.md +4 -2
- package/docs/guide/index.md +1 -1
- package/docs/guide/install.md +1 -1
- package/docs/guide/lint.md +3 -1
- package/docs/guide/local-cli.md +3 -3
- package/docs/guide/migrate-rules.md +16 -12
- package/docs/guide/migrate.md +86 -20
- package/docs/guide/monorepo.md +5 -1
- package/docs/guide/test.md +2 -0
- package/docs/guide/troubleshooting.md +3 -3
- package/docs/guide/vitest-v5.md +221 -0
- package/package.json +64 -87
- package/bin/oxfmt +0 -33
- package/bin/oxlint +0 -38
- package/dist/cli-truncate-Bg3RDXpi.js +0 -865
- package/dist/constants-C2dTOTe-.js +0 -80
- package/dist/is-fullwidth-code-point-BUNlIICg.js +0 -8
- package/dist/log-update-CoW8Z4Dl.js +0 -491
- package/dist/strip-ansi-C3wrWz9t.js +0 -853
- package/dist/test/browser/providers/webdriverio/context.d.ts +0 -1
- package/dist/test/browser/providers/webdriverio/context.js +0 -1
- package/dist/test/browser/providers/webdriverio.d.ts +0 -77
- package/dist/test/browser/providers/webdriverio.js +0 -1
- package/dist/test/browser-webdriverio/context.d.ts +0 -1
- package/dist/test/browser-webdriverio.d.ts +0 -77
- package/dist/test/browser-webdriverio.js +0 -1
- package/dist/test/coverage.d.ts +0 -2
- package/dist/test/coverage.js +0 -1
- package/dist/test/environments.d.ts +0 -2
- package/dist/test/environments.js +0 -1
- package/dist/test/plugins/browser-webdriverio.js +0 -1
- package/dist/test/plugins/expect.js +0 -1
- package/dist/test/plugins/runner-types.js +0 -1
- package/dist/test/plugins/runner-utils.js +0 -1
- package/dist/test/plugins/runner.js +0 -1
- package/dist/test/reporters.d.ts +0 -2
- package/dist/test/reporters.js +0 -1
- package/dist/test/runners.d.ts +0 -2
- package/dist/test/runners.js +0 -1
- package/dist/test/snapshot.d.ts +0 -2
- package/dist/test/snapshot.js +0 -1
- package/dist/test/suite.d.ts +0 -2
- package/dist/test/suite.js +0 -1
- package/dist/tsgolint-path-CbDReEOx.js +0 -34
- package/dist/tsgolint-path.d.ts +0 -7
- package/dist/tsgolint-path.js +0 -2
- package/dist/wrap-ansi-DNjkuBEp.js +0 -157
- package/dist/wrap-ansi-DUi52C6W.js +0 -2
package/binding/index.cjs
CHANGED
|
@@ -93,12 +93,12 @@ function requireNative() {
|
|
|
93
93
|
const bindingPackageVersion =
|
|
94
94
|
require('@voidzero-dev/vite-plus-android-arm64/package.json').version;
|
|
95
95
|
if (
|
|
96
|
-
bindingPackageVersion !== '0.
|
|
96
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
97
97
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
98
98
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
99
99
|
) {
|
|
100
100
|
throw new Error(
|
|
101
|
-
`Native binding package version mismatch, expected 0.
|
|
101
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
102
102
|
);
|
|
103
103
|
}
|
|
104
104
|
return binding;
|
|
@@ -116,12 +116,12 @@ function requireNative() {
|
|
|
116
116
|
const bindingPackageVersion =
|
|
117
117
|
require('@voidzero-dev/vite-plus-android-arm-eabi/package.json').version;
|
|
118
118
|
if (
|
|
119
|
-
bindingPackageVersion !== '0.
|
|
119
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
120
120
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
121
121
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
122
122
|
) {
|
|
123
123
|
throw new Error(
|
|
124
|
-
`Native binding package version mismatch, expected 0.
|
|
124
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
125
125
|
);
|
|
126
126
|
}
|
|
127
127
|
return binding;
|
|
@@ -151,12 +151,12 @@ function requireNative() {
|
|
|
151
151
|
const bindingPackageVersion =
|
|
152
152
|
require('@voidzero-dev/vite-plus-win32-x64-gnu/package.json').version;
|
|
153
153
|
if (
|
|
154
|
-
bindingPackageVersion !== '0.
|
|
154
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
155
155
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
156
156
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
157
157
|
) {
|
|
158
158
|
throw new Error(
|
|
159
|
-
`Native binding package version mismatch, expected 0.
|
|
159
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
162
|
return binding;
|
|
@@ -174,12 +174,12 @@ function requireNative() {
|
|
|
174
174
|
const bindingPackageVersion =
|
|
175
175
|
require('@voidzero-dev/vite-plus-win32-x64-msvc/package.json').version;
|
|
176
176
|
if (
|
|
177
|
-
bindingPackageVersion !== '0.
|
|
177
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
178
178
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
179
179
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
180
180
|
) {
|
|
181
181
|
throw new Error(
|
|
182
|
-
`Native binding package version mismatch, expected 0.
|
|
182
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
183
183
|
);
|
|
184
184
|
}
|
|
185
185
|
return binding;
|
|
@@ -198,12 +198,12 @@ function requireNative() {
|
|
|
198
198
|
const bindingPackageVersion =
|
|
199
199
|
require('@voidzero-dev/vite-plus-win32-ia32-msvc/package.json').version;
|
|
200
200
|
if (
|
|
201
|
-
bindingPackageVersion !== '0.
|
|
201
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
202
202
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
203
203
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
204
204
|
) {
|
|
205
205
|
throw new Error(
|
|
206
|
-
`Native binding package version mismatch, expected 0.
|
|
206
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
209
|
return binding;
|
|
@@ -221,12 +221,12 @@ function requireNative() {
|
|
|
221
221
|
const bindingPackageVersion =
|
|
222
222
|
require('@voidzero-dev/vite-plus-win32-arm64-msvc/package.json').version;
|
|
223
223
|
if (
|
|
224
|
-
bindingPackageVersion !== '0.
|
|
224
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
225
225
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
226
226
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
227
227
|
) {
|
|
228
228
|
throw new Error(
|
|
229
|
-
`Native binding package version mismatch, expected 0.
|
|
229
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
230
230
|
);
|
|
231
231
|
}
|
|
232
232
|
return binding;
|
|
@@ -247,12 +247,12 @@ function requireNative() {
|
|
|
247
247
|
const bindingPackageVersion =
|
|
248
248
|
require('@voidzero-dev/vite-plus-darwin-universal/package.json').version;
|
|
249
249
|
if (
|
|
250
|
-
bindingPackageVersion !== '0.
|
|
250
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
251
251
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
252
252
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
253
253
|
) {
|
|
254
254
|
throw new Error(
|
|
255
|
-
`Native binding package version mismatch, expected 0.
|
|
255
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
256
256
|
);
|
|
257
257
|
}
|
|
258
258
|
return binding;
|
|
@@ -270,12 +270,12 @@ function requireNative() {
|
|
|
270
270
|
const bindingPackageVersion =
|
|
271
271
|
require('@voidzero-dev/vite-plus-darwin-x64/package.json').version;
|
|
272
272
|
if (
|
|
273
|
-
bindingPackageVersion !== '0.
|
|
273
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
274
274
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
275
275
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
276
276
|
) {
|
|
277
277
|
throw new Error(
|
|
278
|
-
`Native binding package version mismatch, expected 0.
|
|
278
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
279
279
|
);
|
|
280
280
|
}
|
|
281
281
|
return binding;
|
|
@@ -293,12 +293,12 @@ function requireNative() {
|
|
|
293
293
|
const bindingPackageVersion =
|
|
294
294
|
require('@voidzero-dev/vite-plus-darwin-arm64/package.json').version;
|
|
295
295
|
if (
|
|
296
|
-
bindingPackageVersion !== '0.
|
|
296
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
297
297
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
298
298
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
299
299
|
) {
|
|
300
300
|
throw new Error(
|
|
301
|
-
`Native binding package version mismatch, expected 0.
|
|
301
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
302
302
|
);
|
|
303
303
|
}
|
|
304
304
|
return binding;
|
|
@@ -320,12 +320,12 @@ function requireNative() {
|
|
|
320
320
|
const bindingPackageVersion =
|
|
321
321
|
require('@voidzero-dev/vite-plus-freebsd-x64/package.json').version;
|
|
322
322
|
if (
|
|
323
|
-
bindingPackageVersion !== '0.
|
|
323
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
324
324
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
325
325
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
326
326
|
) {
|
|
327
327
|
throw new Error(
|
|
328
|
-
`Native binding package version mismatch, expected 0.
|
|
328
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
329
329
|
);
|
|
330
330
|
}
|
|
331
331
|
return binding;
|
|
@@ -343,12 +343,12 @@ function requireNative() {
|
|
|
343
343
|
const bindingPackageVersion =
|
|
344
344
|
require('@voidzero-dev/vite-plus-freebsd-arm64/package.json').version;
|
|
345
345
|
if (
|
|
346
|
-
bindingPackageVersion !== '0.
|
|
346
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
347
347
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
348
348
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
349
349
|
) {
|
|
350
350
|
throw new Error(
|
|
351
|
-
`Native binding package version mismatch, expected 0.
|
|
351
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
352
352
|
);
|
|
353
353
|
}
|
|
354
354
|
return binding;
|
|
@@ -371,12 +371,12 @@ function requireNative() {
|
|
|
371
371
|
const bindingPackageVersion =
|
|
372
372
|
require('@voidzero-dev/vite-plus-linux-x64-musl/package.json').version;
|
|
373
373
|
if (
|
|
374
|
-
bindingPackageVersion !== '0.
|
|
374
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
375
375
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
376
376
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
377
377
|
) {
|
|
378
378
|
throw new Error(
|
|
379
|
-
`Native binding package version mismatch, expected 0.
|
|
379
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
380
380
|
);
|
|
381
381
|
}
|
|
382
382
|
return binding;
|
|
@@ -394,12 +394,12 @@ function requireNative() {
|
|
|
394
394
|
const bindingPackageVersion =
|
|
395
395
|
require('@voidzero-dev/vite-plus-linux-x64-gnu/package.json').version;
|
|
396
396
|
if (
|
|
397
|
-
bindingPackageVersion !== '0.
|
|
397
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
398
398
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
399
399
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
400
400
|
) {
|
|
401
401
|
throw new Error(
|
|
402
|
-
`Native binding package version mismatch, expected 0.
|
|
402
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
403
403
|
);
|
|
404
404
|
}
|
|
405
405
|
return binding;
|
|
@@ -419,12 +419,12 @@ function requireNative() {
|
|
|
419
419
|
const bindingPackageVersion =
|
|
420
420
|
require('@voidzero-dev/vite-plus-linux-arm64-musl/package.json').version;
|
|
421
421
|
if (
|
|
422
|
-
bindingPackageVersion !== '0.
|
|
422
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
423
423
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
424
424
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
425
425
|
) {
|
|
426
426
|
throw new Error(
|
|
427
|
-
`Native binding package version mismatch, expected 0.
|
|
427
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
428
428
|
);
|
|
429
429
|
}
|
|
430
430
|
return binding;
|
|
@@ -442,12 +442,12 @@ function requireNative() {
|
|
|
442
442
|
const bindingPackageVersion =
|
|
443
443
|
require('@voidzero-dev/vite-plus-linux-arm64-gnu/package.json').version;
|
|
444
444
|
if (
|
|
445
|
-
bindingPackageVersion !== '0.
|
|
445
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
446
446
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
447
447
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
448
448
|
) {
|
|
449
449
|
throw new Error(
|
|
450
|
-
`Native binding package version mismatch, expected 0.
|
|
450
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
451
451
|
);
|
|
452
452
|
}
|
|
453
453
|
return binding;
|
|
@@ -467,12 +467,12 @@ function requireNative() {
|
|
|
467
467
|
const bindingPackageVersion =
|
|
468
468
|
require('@voidzero-dev/vite-plus-linux-arm-musleabihf/package.json').version;
|
|
469
469
|
if (
|
|
470
|
-
bindingPackageVersion !== '0.
|
|
470
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
471
471
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
472
472
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
473
473
|
) {
|
|
474
474
|
throw new Error(
|
|
475
|
-
`Native binding package version mismatch, expected 0.
|
|
475
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
476
476
|
);
|
|
477
477
|
}
|
|
478
478
|
return binding;
|
|
@@ -490,12 +490,12 @@ function requireNative() {
|
|
|
490
490
|
const bindingPackageVersion =
|
|
491
491
|
require('@voidzero-dev/vite-plus-linux-arm-gnueabihf/package.json').version;
|
|
492
492
|
if (
|
|
493
|
-
bindingPackageVersion !== '0.
|
|
493
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
494
494
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
495
495
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
496
496
|
) {
|
|
497
497
|
throw new Error(
|
|
498
|
-
`Native binding package version mismatch, expected 0.
|
|
498
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
499
499
|
);
|
|
500
500
|
}
|
|
501
501
|
return binding;
|
|
@@ -515,12 +515,12 @@ function requireNative() {
|
|
|
515
515
|
const bindingPackageVersion =
|
|
516
516
|
require('@voidzero-dev/vite-plus-linux-loong64-musl/package.json').version;
|
|
517
517
|
if (
|
|
518
|
-
bindingPackageVersion !== '0.
|
|
518
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
519
519
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
520
520
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
521
521
|
) {
|
|
522
522
|
throw new Error(
|
|
523
|
-
`Native binding package version mismatch, expected 0.
|
|
523
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
524
524
|
);
|
|
525
525
|
}
|
|
526
526
|
return binding;
|
|
@@ -538,12 +538,12 @@ function requireNative() {
|
|
|
538
538
|
const bindingPackageVersion =
|
|
539
539
|
require('@voidzero-dev/vite-plus-linux-loong64-gnu/package.json').version;
|
|
540
540
|
if (
|
|
541
|
-
bindingPackageVersion !== '0.
|
|
541
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
542
542
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
543
543
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
544
544
|
) {
|
|
545
545
|
throw new Error(
|
|
546
|
-
`Native binding package version mismatch, expected 0.
|
|
546
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
547
547
|
);
|
|
548
548
|
}
|
|
549
549
|
return binding;
|
|
@@ -563,12 +563,12 @@ function requireNative() {
|
|
|
563
563
|
const bindingPackageVersion =
|
|
564
564
|
require('@voidzero-dev/vite-plus-linux-riscv64-musl/package.json').version;
|
|
565
565
|
if (
|
|
566
|
-
bindingPackageVersion !== '0.
|
|
566
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
567
567
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
568
568
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
569
569
|
) {
|
|
570
570
|
throw new Error(
|
|
571
|
-
`Native binding package version mismatch, expected 0.
|
|
571
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
572
572
|
);
|
|
573
573
|
}
|
|
574
574
|
return binding;
|
|
@@ -586,12 +586,12 @@ function requireNative() {
|
|
|
586
586
|
const bindingPackageVersion =
|
|
587
587
|
require('@voidzero-dev/vite-plus-linux-riscv64-gnu/package.json').version;
|
|
588
588
|
if (
|
|
589
|
-
bindingPackageVersion !== '0.
|
|
589
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
590
590
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
591
591
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
592
592
|
) {
|
|
593
593
|
throw new Error(
|
|
594
|
-
`Native binding package version mismatch, expected 0.
|
|
594
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
595
595
|
);
|
|
596
596
|
}
|
|
597
597
|
return binding;
|
|
@@ -610,12 +610,12 @@ function requireNative() {
|
|
|
610
610
|
const bindingPackageVersion =
|
|
611
611
|
require('@voidzero-dev/vite-plus-linux-ppc64-gnu/package.json').version;
|
|
612
612
|
if (
|
|
613
|
-
bindingPackageVersion !== '0.
|
|
613
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
614
614
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
615
615
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
616
616
|
) {
|
|
617
617
|
throw new Error(
|
|
618
|
-
`Native binding package version mismatch, expected 0.
|
|
618
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
619
619
|
);
|
|
620
620
|
}
|
|
621
621
|
return binding;
|
|
@@ -633,12 +633,12 @@ function requireNative() {
|
|
|
633
633
|
const bindingPackageVersion =
|
|
634
634
|
require('@voidzero-dev/vite-plus-linux-s390x-gnu/package.json').version;
|
|
635
635
|
if (
|
|
636
|
-
bindingPackageVersion !== '0.
|
|
636
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
637
637
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
638
638
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
639
639
|
) {
|
|
640
640
|
throw new Error(
|
|
641
|
-
`Native binding package version mismatch, expected 0.
|
|
641
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
642
642
|
);
|
|
643
643
|
}
|
|
644
644
|
return binding;
|
|
@@ -660,12 +660,12 @@ function requireNative() {
|
|
|
660
660
|
const bindingPackageVersion =
|
|
661
661
|
require('@voidzero-dev/vite-plus-openharmony-arm64/package.json').version;
|
|
662
662
|
if (
|
|
663
|
-
bindingPackageVersion !== '0.
|
|
663
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
664
664
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
665
665
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
666
666
|
) {
|
|
667
667
|
throw new Error(
|
|
668
|
-
`Native binding package version mismatch, expected 0.
|
|
668
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
669
669
|
);
|
|
670
670
|
}
|
|
671
671
|
return binding;
|
|
@@ -683,12 +683,12 @@ function requireNative() {
|
|
|
683
683
|
const bindingPackageVersion =
|
|
684
684
|
require('@voidzero-dev/vite-plus-openharmony-x64/package.json').version;
|
|
685
685
|
if (
|
|
686
|
-
bindingPackageVersion !== '0.
|
|
686
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
687
687
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
688
688
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
689
689
|
) {
|
|
690
690
|
throw new Error(
|
|
691
|
-
`Native binding package version mismatch, expected 0.
|
|
691
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
692
692
|
);
|
|
693
693
|
}
|
|
694
694
|
return binding;
|
|
@@ -706,12 +706,12 @@ function requireNative() {
|
|
|
706
706
|
const bindingPackageVersion =
|
|
707
707
|
require('@voidzero-dev/vite-plus-openharmony-arm/package.json').version;
|
|
708
708
|
if (
|
|
709
|
-
bindingPackageVersion !== '0.
|
|
709
|
+
bindingPackageVersion !== '1.0.0-rc.0' &&
|
|
710
710
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK &&
|
|
711
711
|
process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0'
|
|
712
712
|
) {
|
|
713
713
|
throw new Error(
|
|
714
|
-
`Native binding package version mismatch, expected 0.
|
|
714
|
+
`Native binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
715
715
|
);
|
|
716
716
|
}
|
|
717
717
|
return binding;
|
|
@@ -857,9 +857,9 @@ if (!nativeBinding || forceWasi) {
|
|
|
857
857
|
) {
|
|
858
858
|
const bindingPackageVersion =
|
|
859
859
|
require('@voidzero-dev/vite-plus-wasm32-wasi/package.json').version;
|
|
860
|
-
if (bindingPackageVersion !== '0.
|
|
860
|
+
if (bindingPackageVersion !== '1.0.0-rc.0') {
|
|
861
861
|
throw new Error(
|
|
862
|
-
`WASI binding package version mismatch, expected 0.
|
|
862
|
+
`WASI binding package version mismatch, expected 1.0.0-rc.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`,
|
|
863
863
|
);
|
|
864
864
|
}
|
|
865
865
|
}
|
|
@@ -1042,11 +1042,14 @@ module.exports.resetNativeMemoryStats = nativeBinding.resetNativeMemoryStats;
|
|
|
1042
1042
|
module.exports.resolveTsconfig = nativeBinding.resolveTsconfig;
|
|
1043
1043
|
module.exports.shutdownAsyncRuntime = nativeBinding.shutdownAsyncRuntime;
|
|
1044
1044
|
module.exports.startAsyncRuntime = nativeBinding.startAsyncRuntime;
|
|
1045
|
+
module.exports.analyzeMigrationSource = nativeBinding.analyzeMigrationSource;
|
|
1045
1046
|
module.exports.detectWorkspace = nativeBinding.detectWorkspace;
|
|
1047
|
+
module.exports.documentationUrl = nativeBinding.documentationUrl;
|
|
1046
1048
|
module.exports.downloadPackageManager = nativeBinding.downloadPackageManager;
|
|
1047
1049
|
module.exports.ensureBlockingStdio = nativeBinding.ensureBlockingStdio;
|
|
1048
1050
|
module.exports.getVpDirs = nativeBinding.getVpDirs;
|
|
1049
1051
|
module.exports.hasConfigKey = nativeBinding.hasConfigKey;
|
|
1052
|
+
module.exports.isDirectoryGitignored = nativeBinding.isDirectoryGitignored;
|
|
1050
1053
|
module.exports.mergeJsonConfig = nativeBinding.mergeJsonConfig;
|
|
1051
1054
|
module.exports.mergeTsdownConfig = nativeBinding.mergeTsdownConfig;
|
|
1052
1055
|
module.exports.parseConfigArgs = nativeBinding.parseConfigArgs;
|
package/binding/index.d.cts
CHANGED
|
@@ -3477,6 +3477,9 @@ export interface ViteImportGlobMeta {
|
|
|
3477
3477
|
isSubImportsPattern?: boolean;
|
|
3478
3478
|
}
|
|
3479
3479
|
|
|
3480
|
+
/** Parse source and resolve lexical bindings for the TypeScript migration rules. */
|
|
3481
|
+
export declare function analyzeMigrationSource(filename: string, source: string): string;
|
|
3482
|
+
|
|
3480
3483
|
/** Error from batch import rewriting */
|
|
3481
3484
|
export interface BatchRewriteError {
|
|
3482
3485
|
/** The file path that had an error */
|
|
@@ -3580,6 +3583,9 @@ export interface DetectWorkspaceResult {
|
|
|
3580
3583
|
root?: string;
|
|
3581
3584
|
}
|
|
3582
3585
|
|
|
3586
|
+
/** Build documentation links with the same compiled origin as the native CLI. */
|
|
3587
|
+
export declare function documentationUrl(path: string): string;
|
|
3588
|
+
|
|
3583
3589
|
/**
|
|
3584
3590
|
* Download a package manager
|
|
3585
3591
|
*
|
|
@@ -3657,6 +3663,9 @@ export interface HooksArgs {
|
|
|
3657
3663
|
hooksDir?: string;
|
|
3658
3664
|
}
|
|
3659
3665
|
|
|
3666
|
+
/** Check inherited `.gitignore` rules without requiring the directory to exist. */
|
|
3667
|
+
export declare function isDirectoryGitignored(root: string, directory: string): boolean;
|
|
3668
|
+
|
|
3660
3669
|
/** Execution context after command dispatch selects the working directory. */
|
|
3661
3670
|
export interface JsCommandContext {
|
|
3662
3671
|
cwd: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as rewriteDocumentationLinks } from "./documentation-DqcZSthV.js";
|
|
2
|
+
import { a as SETUP_VP_VERSION } from "./constants-CiKwrA0v.js";
|
|
3
|
+
import { C as multiselect, S as log, T as select, k as isCancel } from "./prompts-CQobX7uP.js";
|
|
3
4
|
import path from "node:path";
|
|
4
5
|
import { styleText } from "node:util";
|
|
5
6
|
import fs from "node:fs";
|
|
@@ -187,7 +188,7 @@ function updateExistingAgentInstructions(projectRoot) {
|
|
|
187
188
|
if (!targetPaths) return;
|
|
188
189
|
const templatePath = path.join(pkgRoot, "AGENTS.md");
|
|
189
190
|
if (!fs.existsSync(templatePath)) return;
|
|
190
|
-
const templateContent = fs.readFileSync(templatePath, "utf-8");
|
|
191
|
+
const templateContent = rewriteDocumentationLinks(fs.readFileSync(templatePath, "utf-8"));
|
|
191
192
|
for (const targetPath of targetPaths) try {
|
|
192
193
|
const fullPath = path.join(projectRoot, targetPath);
|
|
193
194
|
const existing = fs.readFileSync(fullPath, "utf-8");
|
|
@@ -271,7 +272,7 @@ async function detectAgentConflicts({ projectRoot, targetPaths }) {
|
|
|
271
272
|
if (!targetPaths || targetPaths.length === 0) return [];
|
|
272
273
|
const sourcePath = path.join(pkgRoot, "AGENTS.md");
|
|
273
274
|
if (!fs.existsSync(sourcePath)) return [];
|
|
274
|
-
const incomingContent = await fsPromises.readFile(sourcePath, "utf-8");
|
|
275
|
+
const incomingContent = rewriteDocumentationLinks(await fsPromises.readFile(sourcePath, "utf-8"));
|
|
275
276
|
const shouldLinkToAgents = targetPaths.includes(AGENT_STANDARD_PATH);
|
|
276
277
|
const conflicts = [];
|
|
277
278
|
const seenRealPaths = /* @__PURE__ */ new Set();
|
|
@@ -294,7 +295,7 @@ async function writeAgentInstructions({ projectRoot, targetPath, targetPaths, in
|
|
|
294
295
|
return;
|
|
295
296
|
}
|
|
296
297
|
const seenRealPaths = /* @__PURE__ */ new Set();
|
|
297
|
-
const incomingContent = await fsPromises.readFile(sourcePath, "utf-8");
|
|
298
|
+
const incomingContent = rewriteDocumentationLinks(await fsPromises.readFile(sourcePath, "utf-8"));
|
|
298
299
|
const shouldLinkToAgents = paths.includes(AGENT_STANDARD_PATH);
|
|
299
300
|
for (const targetPathToWrite of orderAgentTargetPaths(projectRoot, paths)) {
|
|
300
301
|
const destinationPath = path.join(projectRoot, targetPathToWrite);
|
package/dist/bin.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
+
import { t as documentationUrl$1 } from "./documentation-DqcZSthV.js";
|
|
1
2
|
import { t as renderCliDoc } from "./help-BmKpeOP9.js";
|
|
2
3
|
import { c as warnMsg, i as log, n as errorMsg, o as printHeader, t as accent } from "./terminal-MKGAuy-p.js";
|
|
3
|
-
import { g as resolveBundled, h as resolve$1, i as DEFAULT_ENVS, l as VITE_CONFIG_FILES, n as BASEURL_TSCONFIG_WARNING, r as CONFIG_METADATA_ENV, u as VITE_PLUS_NAME } from "./constants-
|
|
4
|
-
import { r as createDefaultVitePlusLintConfig } from "./oxlint-plugin-config-
|
|
5
|
-
import {
|
|
6
|
-
import { a as readNearestPackageJson } from "./package-CHH8jWan.js";
|
|
4
|
+
import { g as resolveBundled, h as resolve$1, i as DEFAULT_ENVS, l as VITE_CONFIG_FILES, n as BASEURL_TSCONFIG_WARNING, r as CONFIG_METADATA_ENV, u as VITE_PLUS_NAME } from "./constants-CiKwrA0v.js";
|
|
5
|
+
import { r as createDefaultVitePlusLintConfig } from "./oxlint-plugin-config-BgsDA6ua.js";
|
|
6
|
+
import { a as readNearestPackageJson } from "./package-B85H2Nw0.js";
|
|
7
7
|
import { t as cac } from "./dist-DfmT__Aw.js";
|
|
8
8
|
import { createRequire } from "node:module";
|
|
9
9
|
import path, { dirname, join, resolve } from "node:path";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
11
11
|
import { ensureBlockingStdio, hasConfigKey, mergeJsonConfig, run } from "../binding/index.js";
|
|
12
|
-
import fs, { existsSync, readFileSync } from "node:fs";
|
|
12
|
+
import fs, { existsSync, readFileSync, realpathSync } from "node:fs";
|
|
13
13
|
//#region src/help.ts
|
|
14
14
|
const commandHelpDocs = {
|
|
15
15
|
dev: {
|
|
@@ -93,7 +93,7 @@ const commandHelpDocs = {
|
|
|
93
93
|
]
|
|
94
94
|
}
|
|
95
95
|
],
|
|
96
|
-
documentationUrl: "
|
|
96
|
+
documentationUrl: documentationUrl$1("/guide/dev")
|
|
97
97
|
},
|
|
98
98
|
build: {
|
|
99
99
|
usage: "vp build [ROOT] [OPTIONS]",
|
|
@@ -196,7 +196,7 @@ const commandHelpDocs = {
|
|
|
196
196
|
]
|
|
197
197
|
}
|
|
198
198
|
],
|
|
199
|
-
documentationUrl: "
|
|
199
|
+
documentationUrl: documentationUrl$1("/guide/build")
|
|
200
200
|
},
|
|
201
201
|
preview: {
|
|
202
202
|
usage: "vp preview [ROOT] [OPTIONS]",
|
|
@@ -267,7 +267,7 @@ const commandHelpDocs = {
|
|
|
267
267
|
lines: [" vp preview", " vp preview --port 4173"]
|
|
268
268
|
}
|
|
269
269
|
],
|
|
270
|
-
documentationUrl: "
|
|
270
|
+
documentationUrl: documentationUrl$1("/guide/build")
|
|
271
271
|
},
|
|
272
272
|
test: {
|
|
273
273
|
usage: "vp test [COMMAND] [FILTERS]... [OPTIONS]",
|
|
@@ -606,7 +606,7 @@ const commandHelpDocs = {
|
|
|
606
606
|
]
|
|
607
607
|
}
|
|
608
608
|
],
|
|
609
|
-
documentationUrl: "
|
|
609
|
+
documentationUrl: documentationUrl$1("/guide/test")
|
|
610
610
|
},
|
|
611
611
|
lint: {
|
|
612
612
|
usage: "vp lint [PATH]... [OPTIONS]",
|
|
@@ -843,7 +843,7 @@ const commandHelpDocs = {
|
|
|
843
843
|
]
|
|
844
844
|
}
|
|
845
845
|
],
|
|
846
|
-
documentationUrl: "
|
|
846
|
+
documentationUrl: documentationUrl$1("/guide/lint")
|
|
847
847
|
},
|
|
848
848
|
fmt: {
|
|
849
849
|
usage: "vp fmt [PATH]... [OPTIONS]",
|
|
@@ -916,7 +916,7 @@ const commandHelpDocs = {
|
|
|
916
916
|
]
|
|
917
917
|
}
|
|
918
918
|
],
|
|
919
|
-
documentationUrl: "
|
|
919
|
+
documentationUrl: documentationUrl$1("/guide/fmt")
|
|
920
920
|
},
|
|
921
921
|
check: {
|
|
922
922
|
usage: "vp check [OPTIONS] [PATHS]...",
|
|
@@ -967,7 +967,7 @@ const commandHelpDocs = {
|
|
|
967
967
|
]
|
|
968
968
|
}
|
|
969
969
|
],
|
|
970
|
-
documentationUrl: "
|
|
970
|
+
documentationUrl: documentationUrl$1("/guide/check")
|
|
971
971
|
},
|
|
972
972
|
pack: {
|
|
973
973
|
usage: "vp pack [...files] [OPTIONS]",
|
|
@@ -1146,7 +1146,7 @@ const commandHelpDocs = {
|
|
|
1146
1146
|
]
|
|
1147
1147
|
}
|
|
1148
1148
|
],
|
|
1149
|
-
documentationUrl: "
|
|
1149
|
+
documentationUrl: documentationUrl$1("/guide/pack")
|
|
1150
1150
|
},
|
|
1151
1151
|
run: {
|
|
1152
1152
|
usage: "vp run [OPTIONS] [TASK_SPECIFIER] [ADDITIONAL_ARGS]...",
|
|
@@ -1236,7 +1236,7 @@ const commandHelpDocs = {
|
|
|
1236
1236
|
]
|
|
1237
1237
|
}
|
|
1238
1238
|
],
|
|
1239
|
-
documentationUrl: "
|
|
1239
|
+
documentationUrl: documentationUrl$1("/guide/run")
|
|
1240
1240
|
},
|
|
1241
1241
|
exec: {
|
|
1242
1242
|
usage: "vp exec [OPTIONS] [COMMAND]...",
|
|
@@ -1321,7 +1321,7 @@ const commandHelpDocs = {
|
|
|
1321
1321
|
]
|
|
1322
1322
|
}
|
|
1323
1323
|
],
|
|
1324
|
-
documentationUrl: "
|
|
1324
|
+
documentationUrl: documentationUrl$1("/guide/vpx")
|
|
1325
1325
|
},
|
|
1326
1326
|
cache: {
|
|
1327
1327
|
usage: "vp cache <COMMAND>",
|
|
@@ -1339,7 +1339,7 @@ const commandHelpDocs = {
|
|
|
1339
1339
|
description: "Print help"
|
|
1340
1340
|
}]
|
|
1341
1341
|
}],
|
|
1342
|
-
documentationUrl: "
|
|
1342
|
+
documentationUrl: documentationUrl$1("/guide/cache")
|
|
1343
1343
|
}
|
|
1344
1344
|
};
|
|
1345
1345
|
function maybePrintCommandHelp(args) {
|
|
@@ -1517,7 +1517,7 @@ async function applyToolInitConfigToViteConfig(command, args, projectPath = proc
|
|
|
1517
1517
|
}
|
|
1518
1518
|
if (spec.configKey === "lint" && hasTriggerFlag(args, ["--init"])) {
|
|
1519
1519
|
const lintInitConfigPath = path.join(projectPath, ".vite-plus-lint-init.oxlintrc.json");
|
|
1520
|
-
const { fixBaseUrlInTsconfig, hasBaseUrlInTsconfig } = await import("./tsconfig-
|
|
1520
|
+
const { fixBaseUrlInTsconfig, hasBaseUrlInTsconfig } = await import("./tsconfig-C1VeTG9k.js");
|
|
1521
1521
|
await fixBaseUrlInTsconfig(projectPath);
|
|
1522
1522
|
const hasBaseUrl = hasBaseUrlInTsconfig(projectPath);
|
|
1523
1523
|
const initConfig = createDefaultVitePlusLintConfig({ includeTypeAwareDefaults: !hasBaseUrl });
|
|
@@ -1582,6 +1582,36 @@ async function doc() {
|
|
|
1582
1582
|
};
|
|
1583
1583
|
}
|
|
1584
1584
|
//#endregion
|
|
1585
|
+
//#region src/utils/tsgolint-path.ts
|
|
1586
|
+
function resolveWindowsTsgolintExecutable(pathCandidates, options) {
|
|
1587
|
+
let oxlintTsgolintPath = pathCandidates.find((p) => options.exists(p)) ?? "";
|
|
1588
|
+
if (!oxlintTsgolintPath && options.getRealpathCandidates) try {
|
|
1589
|
+
oxlintTsgolintPath = options.getRealpathCandidates().find((p) => options.exists(p)) ?? "";
|
|
1590
|
+
} catch {}
|
|
1591
|
+
if (!oxlintTsgolintPath) throw new Error("Unable to resolve oxlint-tsgolint executable, tried:\n" + pathCandidates.map((path) => `- ${path}`).join("\n"));
|
|
1592
|
+
return oxlintTsgolintPath;
|
|
1593
|
+
}
|
|
1594
|
+
function resolveTsgolintExecutable(tsgolintBinPath, scriptUrl) {
|
|
1595
|
+
if (process.platform !== "win32") return tsgolintBinPath;
|
|
1596
|
+
const scriptDir = dirname(fileURLToPath(scriptUrl));
|
|
1597
|
+
const localBinDir = join(scriptDir, "..", "node_modules", ".bin");
|
|
1598
|
+
const oxlintTsgolintPackagePath = dirname(dirname(tsgolintBinPath));
|
|
1599
|
+
const projectBinDir = join(oxlintTsgolintPackagePath, "..", ".bin");
|
|
1600
|
+
return resolveWindowsTsgolintExecutable([
|
|
1601
|
+
join(localBinDir, "tsgolint.exe"),
|
|
1602
|
+
join(localBinDir, "tsgolint.cmd"),
|
|
1603
|
+
join(projectBinDir, "tsgolint.exe"),
|
|
1604
|
+
join(projectBinDir, "tsgolint.cmd")
|
|
1605
|
+
], {
|
|
1606
|
+
exists: existsSync,
|
|
1607
|
+
getRealpathCandidates: () => {
|
|
1608
|
+
const realPkgDir = realpathSync(join(scriptDir, ".."));
|
|
1609
|
+
const realBinDir = join(dirname(realPkgDir), ".bin");
|
|
1610
|
+
return [join(realBinDir, "tsgolint.exe"), join(realBinDir, "tsgolint.cmd")];
|
|
1611
|
+
}
|
|
1612
|
+
});
|
|
1613
|
+
}
|
|
1614
|
+
//#endregion
|
|
1585
1615
|
//#region src/resolve-lint.ts
|
|
1586
1616
|
/**
|
|
1587
1617
|
* Oxlint tool resolver for the vite-plus CLI.
|
|
@@ -1817,7 +1847,7 @@ else if (command === "hooks") await import("./hooks/bin.js");
|
|
|
1817
1847
|
else if (command === "--version" || command === "-V") await import("./version.js");
|
|
1818
1848
|
else if (command === "staged") await import("./staged/bin.js");
|
|
1819
1849
|
else try {
|
|
1820
|
-
const { resolveUniversalViteConfig } = await import("./resolve-vite-config-
|
|
1850
|
+
const { resolveUniversalViteConfig } = await import("./resolve-vite-config-I8fmpR7I.js");
|
|
1821
1851
|
const initInspection = inspectInitCommand(command, args.slice(1));
|
|
1822
1852
|
if (initInspection.handled && initInspection.configKey && initInspection.hasExistingConfigKey && initInspection.existingViteConfigPath) {
|
|
1823
1853
|
log(`Skipped initialization: '${accent(initInspection.configKey)}' already exists in '${accent(path.basename(initInspection.existingViteConfigPath))}'.`);
|