vite-plus 1.3.0 → 1.5.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/AGENTS.md +4 -0
- package/LICENSE +1 -878
- package/README.md +1 -1
- package/bin/vpx +9 -0
- package/binding/index.cjs +59 -54
- package/binding/index.d.cts +159 -2
- package/dist/{agent-97KmGCyL.js → agent-DkQD3xqe.js} +5 -7
- package/dist/bin.js +35 -34
- package/dist/{cli-parse-DHE8NrBU.js → cli-parse-aeUeFDlC.js} +2 -3
- package/dist/command-TjS_6y9O.js +1 -0
- package/dist/{command-CdMBoZFD.js → command-rY79K5NI.js} +28 -30
- package/dist/{comparison-CmVirWIW-DUGaiYqF.js → comparison-CmVirWIW-UlEf2maz.js} +1 -2
- package/dist/config/bin.js +8 -10
- package/dist/{constants-DR55DpRm.js → constants-D2P2aVKb.js} +8 -6
- package/dist/create/bin.d.ts +4 -8
- package/dist/create/bin.js +151 -120
- package/dist/{define-config-Bexdd6RZ.d.ts → define-config-BrvHRi-G.d.ts} +31 -13
- package/dist/{define-config-BxDc_9BK.cjs → define-config-CwtQqYC1.cjs} +41 -14
- package/dist/{define-config-CvE5pHqB.js → define-config-wR57OZG_.js} +34 -12
- package/dist/define-config.cjs +2 -1
- package/dist/define-config.d.ts +2 -2
- package/dist/define-config.js +1 -1
- package/dist/{dist-DIpm7mot.js → dist-Bs0SObNC.js} +73 -145
- package/dist/{dist-Cqz8OtiO.js → dist-CdkMvIiQ.js} +11 -5
- package/dist/dist-zDZV5eEc.js +3 -0
- package/dist/{documentation-DqcZSthV.js → documentation-cv_y0Auv.js} +1 -2
- package/dist/{editor-CtJGQP7C.js → editor-aOy1T15H.js} +2735 -5072
- package/dist/{help-BmKpeOP9.js → help-B03t_iQ4.js} +1 -2
- package/dist/hooks/bin.js +4 -5
- package/dist/{hooks-DhwsWb46.js → hooks-w_e2whkQ.js} +45 -25
- package/dist/index.cjs +5 -5
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/{json-JP24qHUF.js → json-kl84kDyH.js} +9 -18
- package/dist/lint-plugins.cjs +1 -1
- package/dist/migration/bin.js +1782 -256
- package/dist/migration/compat/worker.js +4 -6
- package/dist/{oxlint-plugin-config-BIzrO2y2.js → oxlint-plugin-config-CHsI_zKo.js} +3 -4
- package/dist/oxlint-plugin.d.ts +0 -2
- package/dist/oxlint-plugin.js +33 -9
- package/dist/{pack-BK38MLVZ.d.ts → pack-ARPFMefW.d.ts} +0 -2
- package/dist/pack-bin.d.ts +1 -3
- package/dist/pack-bin.js +4 -5
- package/dist/pack.d.ts +1 -1
- package/dist/{package-CQDXTm6j.js → package-DfFo6-E-.js} +10 -95
- package/dist/{package-overrides-D1RcXSFl.js → package-overrides-Ci8GXouY.js} +5 -8
- package/dist/picomatch-DEUoj81q.js +1916 -0
- package/dist/{prompts-1xNz_ne0.js → prompts-C7DI63WP.js} +30 -50
- package/dist/{protocol-D99W10Qi.js → protocol-CkNmY-Mr.js} +1 -2
- package/dist/register.d.ts +1 -0
- package/dist/register.js +12 -0
- package/dist/{report-NhQk8VHb.js → report-BEdpIQvC.js} +4 -2
- package/dist/resolve-vite-config-33bzSaeT.js +1 -0
- package/dist/{resolve-vite-config-BVr1SUNg.js → resolve-vite-config-Cx3cnVVI.js} +9 -25
- package/dist/{rolldown-runtime-kJ_i4yPo.js → rolldown-runtime-DegdyBIC.js} +1 -2
- package/dist/script-esm-hooks.d.ts +11 -0
- package/dist/script-esm-hooks.js +27 -0
- package/dist/script-hooks-9Fof5UMY.js +176 -0
- package/dist/script-preload.cjs +491 -0
- package/dist/script-register.d.ts +1 -0
- package/dist/script-register.js +27 -0
- package/dist/script-watch.d.ts +1 -0
- package/dist/script-watch.js +2002 -0
- package/dist/staged/bin.js +53 -2011
- package/dist/sync-versions/bin.js +26 -48
- package/dist/sync-versions/bin.mjs +109 -217
- package/dist/{terminal-MKGAuy-p.js → terminal-BcuPUy-j.js} +1 -2
- package/dist/toolchain.js +38 -12
- package/dist/toolchain.json +38 -12
- package/dist/{tsconfig-zWgHiQ3X.js → tsconfig-BE3Wj9OX.js} +1 -1
- package/dist/{tsconfig-BZu7kl-x.js → tsconfig-shNmmCE_.js} +8 -10
- package/dist/version.d.ts +1 -3
- package/dist/version.js +5 -6
- package/dist/versions.js +7 -7
- package/dist/{vitest-ecosystem-BU0AqZq-.js → vitest-ecosystem-BeEYz-qF.js} +1 -2
- package/dist/{vitest-v5-entry-points-DthU1e_O.js → vitest-v5-entry-points-NyJsFeux.js} +1 -2
- package/dist/vpx-bin.d.ts +1 -0
- package/dist/vpx-bin.js +232 -0
- package/dist/vpx-script-EXgV5QOf.js +434 -0
- package/docs/config/check.md +2 -0
- package/docs/config/fmt.md +1 -1
- package/docs/config/lint.md +1 -1
- package/docs/config/run.md +10 -2
- package/docs/config/staged.md +1 -1
- package/docs/guide/check.md +6 -1
- package/docs/guide/ci.md +13 -3
- package/docs/guide/create.md +1 -1
- package/docs/guide/env.md +11 -4
- package/docs/guide/global-cli.md +59 -3
- package/docs/guide/homebrew.md +127 -0
- package/docs/guide/ide-integration.md +1 -3
- package/docs/guide/implode.md +5 -3
- package/docs/guide/local-cli.md +21 -0
- package/docs/guide/migrate-rules.md +120 -18
- package/docs/guide/migrate.md +9 -9
- package/docs/guide/package-management.md +1 -1
- package/docs/guide/run.md +23 -1
- package/docs/guide/test.md +1 -1
- package/docs/guide/troubleshooting.md +1 -1
- package/docs/guide/upgrade.md +12 -6
- package/docs/guide/vitest-v5.md +2 -2
- package/docs/guide/vpx.md +210 -9
- package/package.json +43 -34
- package/dist/command-DVTILtS-.js +0 -1
- package/dist/dist-Dhu07wmN.js +0 -3
- package/dist/resolve-vite-config-7WDtXO4G.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { stripVTControlCharacters, styleText } from "node:util";
|
|
2
|
-
|
|
2
|
+
// src/utils/help.ts
|
|
3
3
|
const HELP_RIGHT_MARGIN = 4;
|
|
4
4
|
function toLines(value) {
|
|
5
5
|
if (!value) return [];
|
|
@@ -87,5 +87,4 @@ function renderCliDoc(doc, options = {}) {
|
|
|
87
87
|
output.push("");
|
|
88
88
|
return output.join("\n");
|
|
89
89
|
}
|
|
90
|
-
//#endregion
|
|
91
90
|
export { renderCliDoc as t };
|
package/dist/hooks/bin.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { d as status, i as enable, r as disable } from "../hooks-w_e2whkQ.js";
|
|
2
|
+
import { t as unwrapCliParseOutcome } from "../cli-parse-aeUeFDlC.js";
|
|
3
|
+
import { i as log } from "../terminal-BcuPUy-j.js";
|
|
4
4
|
import { parseHooksArgs } from "../../binding/index.js";
|
|
5
|
-
|
|
5
|
+
// src/hooks/bin.ts
|
|
6
6
|
function applyResult(result) {
|
|
7
7
|
if (result.message) log(result.message);
|
|
8
8
|
if (result.isError) process.exit(1);
|
|
@@ -22,5 +22,4 @@ async function main() {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
main();
|
|
25
|
-
//#endregion
|
|
26
25
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isAbsolute, join, normalize, relative, resolve, sep } from "node:path";
|
|
2
2
|
import { chmodSync, existsSync, lstatSync, mkdirSync, readdirSync, realpathSync, rmSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { spawnSync } from "node:child_process";
|
|
4
|
-
|
|
4
|
+
// src/config/hooks.ts
|
|
5
5
|
const SUPPORTED_GIT_HOOK_NAMES = [
|
|
6
6
|
"pre-commit",
|
|
7
7
|
"pre-merge-commit",
|
|
@@ -58,6 +58,8 @@ c=$?
|
|
|
58
58
|
[ $c = 127 ] && echo "VITE+ - command not found in PATH=$PATH"
|
|
59
59
|
exit $c`;
|
|
60
60
|
}
|
|
61
|
+
/** The per-hook stub written to `<dir>/_/<hook>`; it sources the `h` dispatcher. */
|
|
62
|
+
const HOOK_STUB_SCRIPT = "#!/usr/bin/env sh\n. \"$(dirname \"$0\")/h\"";
|
|
61
63
|
function normalizeHooksPath(hooksPath) {
|
|
62
64
|
let normalized = normalize(hooksPath);
|
|
63
65
|
while (normalized.endsWith(sep)) normalized = normalized.slice(0, -1);
|
|
@@ -166,39 +168,68 @@ function gitConfigLocalMissing(key) {
|
|
|
166
168
|
key
|
|
167
169
|
]).status === 1;
|
|
168
170
|
}
|
|
171
|
+
const GIT_CONFIG_LOCK_STATUSES = /* @__PURE__ */ new Set([255, 4294967295]);
|
|
172
|
+
const GIT_CONFIG_NO_LOCK_RETRY = ["-c", "core.configLockTimeout=0"];
|
|
173
|
+
const GIT_CONFIG_LOCK_RETRY_DELAYS_MS = [
|
|
174
|
+
50,
|
|
175
|
+
100,
|
|
176
|
+
200,
|
|
177
|
+
400,
|
|
178
|
+
800
|
|
179
|
+
];
|
|
180
|
+
function sleepSync(ms) {
|
|
181
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
|
|
182
|
+
}
|
|
183
|
+
function writeGitConfig(args, isApplied) {
|
|
184
|
+
const gitArgs = [...GIT_CONFIG_NO_LOCK_RETRY, ...args];
|
|
185
|
+
let result = spawnSync("git", gitArgs);
|
|
186
|
+
for (const delay of GIT_CONFIG_LOCK_RETRY_DELAYS_MS) {
|
|
187
|
+
if (!GIT_CONFIG_LOCK_STATUSES.has(result.status)) break;
|
|
188
|
+
sleepSync(delay);
|
|
189
|
+
if (isApplied()) return {
|
|
190
|
+
status: 0,
|
|
191
|
+
stderr: ""
|
|
192
|
+
};
|
|
193
|
+
result = spawnSync("git", gitArgs);
|
|
194
|
+
}
|
|
195
|
+
return {
|
|
196
|
+
status: result.status,
|
|
197
|
+
stderr: result.stderr?.toString().trim() ?? ""
|
|
198
|
+
};
|
|
199
|
+
}
|
|
169
200
|
function gitConfigSet(key, value) {
|
|
170
201
|
if (gitConfigLocalHas(key, value)) return { ok: true };
|
|
171
|
-
const result =
|
|
202
|
+
const result = writeGitConfig([
|
|
172
203
|
"config",
|
|
173
204
|
"--local",
|
|
174
205
|
key,
|
|
175
206
|
value
|
|
176
|
-
]);
|
|
207
|
+
], () => gitConfigLocalHas(key, value));
|
|
177
208
|
if (result.status == null) return {
|
|
178
209
|
ok: false,
|
|
179
210
|
error: "git command not found"
|
|
180
211
|
};
|
|
181
212
|
if (result.status !== 0) return {
|
|
182
213
|
ok: false,
|
|
183
|
-
error: result.stderr
|
|
214
|
+
error: result.stderr || `failed to set ${key}`
|
|
184
215
|
};
|
|
185
216
|
return { ok: true };
|
|
186
217
|
}
|
|
187
218
|
function gitConfigUnset(key) {
|
|
188
219
|
if (gitConfigLocalMissing(key)) return { ok: true };
|
|
189
|
-
const result =
|
|
220
|
+
const result = writeGitConfig([
|
|
190
221
|
"config",
|
|
191
222
|
"--local",
|
|
192
223
|
"--unset-all",
|
|
193
224
|
key
|
|
194
|
-
]);
|
|
225
|
+
], () => gitConfigLocalMissing(key));
|
|
195
226
|
if (result.status == null) return {
|
|
196
227
|
ok: false,
|
|
197
228
|
error: "git command not found"
|
|
198
229
|
};
|
|
199
230
|
if (result.status !== 0 && result.status !== 5) return {
|
|
200
231
|
ok: false,
|
|
201
|
-
error: result.stderr
|
|
232
|
+
error: result.stderr || `failed to unset ${key}`
|
|
202
233
|
};
|
|
203
234
|
return { ok: true };
|
|
204
235
|
}
|
|
@@ -421,24 +452,14 @@ function install(dir, options = {}) {
|
|
|
421
452
|
writeFileSync(internal("h"), hookScript(location.dir), { mode: 493 });
|
|
422
453
|
chmodSync(internal("h"), 493);
|
|
423
454
|
for (const hook of SUPPORTED_GIT_HOOK_NAMES) {
|
|
424
|
-
writeFileSync(internal(hook),
|
|
455
|
+
writeFileSync(internal(hook), HOOK_STUB_SCRIPT, { mode: 493 });
|
|
425
456
|
chmodSync(internal(hook), 493);
|
|
426
457
|
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
]);
|
|
433
|
-
if (status == null) return {
|
|
434
|
-
message: "git command not found",
|
|
435
|
-
isError: true
|
|
436
|
-
};
|
|
437
|
-
if (status) return {
|
|
438
|
-
message: "" + stderr,
|
|
439
|
-
isError: true
|
|
440
|
-
};
|
|
441
|
-
}
|
|
458
|
+
const storeHooksPath = gitConfigSet("core.hooksPath", location.target);
|
|
459
|
+
if (!storeHooksPath.ok) return {
|
|
460
|
+
message: storeHooksPath.error || "failed to set core.hooksPath",
|
|
461
|
+
isError: true
|
|
462
|
+
};
|
|
442
463
|
const clearDisabled = setHooksUserDisabled(false);
|
|
443
464
|
if (!clearDisabled.ok) return {
|
|
444
465
|
message: clearDisabled.error || "failed to clear hooks disabled preference",
|
|
@@ -581,5 +602,4 @@ function status(dir) {
|
|
|
581
602
|
status: hooksStatus
|
|
582
603
|
};
|
|
583
604
|
}
|
|
584
|
-
|
|
585
|
-
export { install as a, resolveHooksLocation as c, findUnsafeHookInstallPath as i, status as l, disable as n, isGitHooksEnvDisabled as o, enable as r, isHooksUserDisabled as s, SUPPORTED_GIT_HOOK_NAMES as t };
|
|
605
|
+
export { findUnsafeHookInstallPath as a, isGitHooksEnvDisabled as c, status as d, enable as i, isHooksUserDisabled as l, SUPPORTED_GIT_HOOK_NAMES as n, hookScript as o, disable as r, install as s, HOOK_STUB_SCRIPT as t, resolveHooksLocation as u };
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const require_define_config = require("./define-config-
|
|
2
|
-
|
|
1
|
+
const require_define_config = require("./define-config-CwtQqYC1.cjs");
|
|
2
|
+
// src/index.cts
|
|
3
3
|
const vite = require("vite");
|
|
4
4
|
const { configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude } = require("vitest/config");
|
|
5
|
-
const { defineConfig, defineProject, lazyPlugins } = (require_define_config.init_define_config(), require_define_config.__toCommonJS(require_define_config.define_config_exports));
|
|
5
|
+
const { defineConfig, defineProject, lazyPlugins, resolveConfigFromFile } = (require_define_config.init_define_config(), require_define_config.__toCommonJS(require_define_config.define_config_exports));
|
|
6
6
|
module.exports = {
|
|
7
7
|
...vite,
|
|
8
8
|
configDefaults,
|
|
@@ -12,6 +12,6 @@ module.exports = {
|
|
|
12
12
|
defaultInclude,
|
|
13
13
|
defineProject,
|
|
14
14
|
defineConfig,
|
|
15
|
-
lazyPlugins
|
|
15
|
+
lazyPlugins,
|
|
16
|
+
resolveConfigFromFile
|
|
16
17
|
};
|
|
17
|
-
//#endregion
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as lazyPlugins, n as ResolveConfigFromFileOptions, o as defineConfig, s as defineProject, u as resolveConfigFromFile } from "./define-config-BrvHRi-G.js";
|
|
2
2
|
import { TestProjectConfiguration, TestProjectInlineConfiguration, TestTagDefinition, TestUserConfig, UserProjectConfigExport, UserProjectConfigFn, UserWorkspaceConfig, ViteUserConfig, ViteUserConfigExport, ViteUserConfigFn, ViteUserConfigFnObject, ViteUserConfigFnPromise, WatcherTriggerPattern, configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude } from "vitest/config";
|
|
3
3
|
export * from "vite";
|
|
4
|
-
export { type TestProjectConfiguration, type TestProjectInlineConfiguration, type TestTagDefinition, type TestUserConfig, type UserProjectConfigExport, type UserProjectConfigFn, type UserWorkspaceConfig, type ViteUserConfig, type ViteUserConfigExport, type ViteUserConfigFn, type ViteUserConfigFnObject, type ViteUserConfigFnPromise, type WatcherTriggerPattern, configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude, defineConfig, defineProject, lazyPlugins };
|
|
4
|
+
export { type ResolveConfigFromFileOptions, type TestProjectConfiguration, type TestProjectInlineConfiguration, type TestTagDefinition, type TestUserConfig, type UserProjectConfigExport, type UserProjectConfigFn, type UserWorkspaceConfig, type ViteUserConfig, type ViteUserConfigExport, type ViteUserConfigFn, type ViteUserConfigFnObject, type ViteUserConfigFnPromise, type WatcherTriggerPattern, configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude, defineConfig, defineProject, lazyPlugins, resolveConfigFromFile };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as defineConfig, c as lazyPlugins, o as defineProject } from "./define-config-
|
|
1
|
+
import { a as defineConfig, c as lazyPlugins, l as resolveConfigFromFile, o as defineProject } from "./define-config-wR57OZG_.js";
|
|
2
2
|
import { configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude } from "vitest/config";
|
|
3
3
|
export * from "vite";
|
|
4
|
-
export { configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude, defineConfig, defineProject, lazyPlugins };
|
|
4
|
+
export { configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude, defineConfig, defineProject, lazyPlugins, resolveConfigFromFile };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
|
-
|
|
2
|
+
// ../../node_modules/.pnpm/detect-indent@7.0.2/node_modules/detect-indent/index.js
|
|
3
3
|
const INDENT_REGEX = /^(?:( )+|\t+)/;
|
|
4
4
|
const INDENT_TYPE_SPACE = "space";
|
|
5
5
|
const INDENT_TYPE_TAB = "tab";
|
|
@@ -96,8 +96,7 @@ function detectIndent(string) {
|
|
|
96
96
|
indent
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
//#region ../../node_modules/.pnpm/detect-newline@4.0.1/node_modules/detect-newline/index.js
|
|
99
|
+
// ../../node_modules/.pnpm/detect-newline@4.0.1/node_modules/detect-newline/index.js
|
|
101
100
|
function detectNewline(string) {
|
|
102
101
|
if (typeof string !== "string") throw new TypeError("Expected a string");
|
|
103
102
|
const newlines = string.match(/(?:\r?\n)/g) || [];
|
|
@@ -105,8 +104,7 @@ function detectNewline(string) {
|
|
|
105
104
|
const crlf = newlines.filter((newline) => newline === "\r\n").length;
|
|
106
105
|
return crlf > newlines.length - crlf ? "\r\n" : "\n";
|
|
107
106
|
}
|
|
108
|
-
|
|
109
|
-
//#region ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
107
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/scanner.js
|
|
110
108
|
/**
|
|
111
109
|
* Creates a JSON scanner on the given text.
|
|
112
110
|
* If ignoreTrivia is set, whitespaces or comments are ignored.
|
|
@@ -485,8 +483,7 @@ var CharacterCodes;
|
|
|
485
483
|
CharacterCodes[CharacterCodes["formFeed"] = 12] = "formFeed";
|
|
486
484
|
CharacterCodes[CharacterCodes["tab"] = 9] = "tab";
|
|
487
485
|
})(CharacterCodes || (CharacterCodes = {}));
|
|
488
|
-
|
|
489
|
-
//#region ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/string-intern.js
|
|
486
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/string-intern.js
|
|
490
487
|
const cachedSpaces = new Array(20).fill(0).map((_, index) => {
|
|
491
488
|
return " ".repeat(index);
|
|
492
489
|
});
|
|
@@ -520,8 +517,7 @@ const supportedEols = [
|
|
|
520
517
|
"\r",
|
|
521
518
|
"\r\n"
|
|
522
519
|
];
|
|
523
|
-
|
|
524
|
-
//#region ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/format.js
|
|
520
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/format.js
|
|
525
521
|
function format(documentText, range, options) {
|
|
526
522
|
let initialIndentLevel;
|
|
527
523
|
let formatText;
|
|
@@ -689,8 +685,7 @@ function getEOL(options, text) {
|
|
|
689
685
|
function isEOL(text, offset) {
|
|
690
686
|
return "\r\n".indexOf(text.charAt(offset)) !== -1;
|
|
691
687
|
}
|
|
692
|
-
|
|
693
|
-
//#region ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/parser.js
|
|
688
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/parser.js
|
|
694
689
|
var ParseOptions;
|
|
695
690
|
(function(ParseOptions) {
|
|
696
691
|
ParseOptions.DEFAULT = { allowTrailingComma: false };
|
|
@@ -1065,8 +1060,7 @@ function getNodeType(value) {
|
|
|
1065
1060
|
default: return "null";
|
|
1066
1061
|
}
|
|
1067
1062
|
}
|
|
1068
|
-
|
|
1069
|
-
//#region ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/edit.js
|
|
1063
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/impl/edit.js
|
|
1070
1064
|
function setProperty(text, originalPath, value, options) {
|
|
1071
1065
|
const path = originalPath.slice();
|
|
1072
1066
|
const root = parseTree$1(text, []);
|
|
@@ -1239,8 +1233,7 @@ function withFormatting(text, edit, options) {
|
|
|
1239
1233
|
function applyEdit(text, edit) {
|
|
1240
1234
|
return text.substring(0, edit.offset) + edit.content + text.substring(edit.offset + edit.length);
|
|
1241
1235
|
}
|
|
1242
|
-
|
|
1243
|
-
//#region ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/main.js
|
|
1236
|
+
// ../../node_modules/.pnpm/jsonc-parser@3.3.1/node_modules/jsonc-parser/lib/esm/main.js
|
|
1244
1237
|
var ScanError;
|
|
1245
1238
|
(function(ScanError) {
|
|
1246
1239
|
ScanError[ScanError["None"] = 0] = "None";
|
|
@@ -1340,8 +1333,7 @@ function applyEdits(text, edits) {
|
|
|
1340
1333
|
}
|
|
1341
1334
|
return text;
|
|
1342
1335
|
}
|
|
1343
|
-
|
|
1344
|
-
//#region src/utils/json.ts
|
|
1336
|
+
// src/utils/json.ts
|
|
1345
1337
|
/**
|
|
1346
1338
|
* Derive `jsonc-parser` formatting options from existing file text so inserted
|
|
1347
1339
|
* fragments match the file's indentation and newline style.
|
|
@@ -1380,5 +1372,4 @@ function isJsonFile(file) {
|
|
|
1380
1372
|
return false;
|
|
1381
1373
|
}
|
|
1382
1374
|
}
|
|
1383
|
-
//#endregion
|
|
1384
1375
|
export { writeJsonFile as a, modify as c, readJsonFile as i, parse as l, editJsonFile as n, applyEdits as o, isJsonFile as r, findNodeAtLocation as s, detectFormattingOptions as t, parseTree as u };
|
package/dist/lint-plugins.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
require("./define-config-
|
|
2
|
+
require("./define-config-CwtQqYC1.cjs");
|
|
3
3
|
let _oxlint_plugins = require("@oxlint/plugins");
|
|
4
4
|
Object.defineProperty(exports, "definePlugin", {
|
|
5
5
|
enumerable: true,
|