oxlint-plugin-vize 0.714.0 → 0.716.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/dist/cli.mjs +11 -8
- package/package.json +10 -10
package/dist/cli.mjs
CHANGED
|
@@ -622,6 +622,7 @@ function createScopedMirror(cwd, config, files) {
|
|
|
622
622
|
}
|
|
623
623
|
if (fs.readFileSync(config.file, "utf8") !== config.bytes) throw new Error("Oxlint config changed while preparing its scoped Vue transport.");
|
|
624
624
|
return {
|
|
625
|
+
root,
|
|
625
626
|
sibling,
|
|
626
627
|
originalsToCopies,
|
|
627
628
|
pathReplacements,
|
|
@@ -659,7 +660,7 @@ function literalGlob(file) {
|
|
|
659
660
|
const isRecord = (value) => typeof value === "object" && value != null && !Array.isArray(value);
|
|
660
661
|
const isVize = (name) => name.startsWith("vize/");
|
|
661
662
|
/** Native/project checks retain original paths; only Vize executes on the bridge. */
|
|
662
|
-
function splitProjectConfig(config) {
|
|
663
|
+
function splitProjectConfig(config, directoryTransport = false) {
|
|
663
664
|
const visit = (value, bridge, override = false) => ({
|
|
664
665
|
...value,
|
|
665
666
|
...Array.isArray(value.extends) ? { extends: value.extends.map((parent) => visit(parent, bridge)) } : {},
|
|
@@ -667,6 +668,7 @@ function splitProjectConfig(config) {
|
|
|
667
668
|
rules: Object.fromEntries(Object.entries(isRecord(value.rules) ? value.rules : {}).flatMap(([name, setting]) => bridge ? isVize(name) ? [[name, setting]] : [] : [[name, isVize(name) ? "off" : setting]])),
|
|
668
669
|
...bridge ? {
|
|
669
670
|
plugins: [],
|
|
671
|
+
...directoryTransport && value.ignorePatterns != null ? { ignorePatterns: [] } : {},
|
|
670
672
|
...!override ? { categories: Object.fromEntries(["correctness", ...Object.keys(isRecord(value.categories) ? value.categories : {})].map((category) => [category, "off"])) } : {},
|
|
671
673
|
...isRecord(value.options) ? { options: {
|
|
672
674
|
...value.options,
|
|
@@ -699,7 +701,7 @@ function replaceConfigArgs(options, file) {
|
|
|
699
701
|
if (!replaced) args.unshift("--config", file);
|
|
700
702
|
return args;
|
|
701
703
|
}
|
|
702
|
-
function bridgeProjectArgs(options) {
|
|
704
|
+
function bridgeProjectArgs(options, directoryTransport = false) {
|
|
703
705
|
if (options.some((arg) => [
|
|
704
706
|
"-A",
|
|
705
707
|
"-D",
|
|
@@ -718,12 +720,12 @@ function bridgeProjectArgs(options) {
|
|
|
718
720
|
const args = [];
|
|
719
721
|
for (let index = 0; index < options.length; index += 1) {
|
|
720
722
|
const arg = options[index];
|
|
721
|
-
if (arg === "--tsconfig") index += 1;
|
|
723
|
+
if (arg === "--tsconfig" || directoryTransport && ["--ignore-path", "--ignore-pattern"].includes(arg)) index += 1;
|
|
722
724
|
else if (![
|
|
723
725
|
"--import-plugin",
|
|
724
726
|
"--type-aware",
|
|
725
727
|
"--type-check"
|
|
726
|
-
].includes(arg) && !arg.startsWith("--tsconfig=")) args.push(arg);
|
|
728
|
+
].includes(arg) && (!directoryTransport || !arg.startsWith("--ignore-path=") && !arg.startsWith("--ignore-pattern=")) && !arg.startsWith("--tsconfig=")) args.push(arg);
|
|
727
729
|
}
|
|
728
730
|
return args;
|
|
729
731
|
}
|
|
@@ -889,7 +891,7 @@ function mergeProjectOutput(original, bridge, args) {
|
|
|
889
891
|
}
|
|
890
892
|
//#endregion
|
|
891
893
|
//#region src/cli/scoped-selection.ts
|
|
892
|
-
async function prepareScopedSelection(cwd, originalArgs, vueFiles, run, candidates) {
|
|
894
|
+
async function prepareScopedSelection(cwd, originalArgs, vueFiles, run, candidates, platform = process.platform) {
|
|
893
895
|
if (vueFiles.length === 0) return void 0;
|
|
894
896
|
if (vueFiles.every(isStandaloneHtmlFile)) return void 0;
|
|
895
897
|
let config = readScopedConfig(cwd, originalArgs);
|
|
@@ -961,9 +963,10 @@ async function prepareScopedSelection(cwd, originalArgs, vueFiles, run, candidat
|
|
|
961
963
|
const original = await run(originalArgs);
|
|
962
964
|
return { result: vueFiles.some(isStandaloneHtmlFile) ? unavailableProjectTransport(original, /* @__PURE__ */ new Error("Scoped Vue transport cannot combine standalone HTML and Vue targets.")) : original };
|
|
963
965
|
}
|
|
964
|
-
const
|
|
966
|
+
const directoryTransport = platform === "win32";
|
|
967
|
+
const bridgeOptions = bridgeProjectArgs(options, directoryTransport);
|
|
965
968
|
projectOutputFormat(options);
|
|
966
|
-
const phases = splitProjectConfig(config);
|
|
969
|
+
const phases = splitProjectConfig(config, directoryTransport);
|
|
967
970
|
validateScopedConfig(phases.bridge, bridgeOptions);
|
|
968
971
|
let originalResult;
|
|
969
972
|
let mirror;
|
|
@@ -989,7 +992,7 @@ async function prepareScopedSelection(cwd, originalArgs, vueFiles, run, candidat
|
|
|
989
992
|
for (let index = 0; index < args.length && args[index] !== "--"; index += 1) if (args[index] === "-c" || args[index] === "--config") args[++index] = mirror.sibling;
|
|
990
993
|
else if (args[index].startsWith("--config=")) args[index] = `--config=${mirror.sibling}`;
|
|
991
994
|
const projected = selectedVue.map((file) => mirror.originalsToCopies.get(file) ?? file).sort();
|
|
992
|
-
args.push(...projected);
|
|
995
|
+
args.push(...directoryTransport ? [mirror.root] : projected);
|
|
993
996
|
const transported = await run([
|
|
994
997
|
"--debug",
|
|
995
998
|
"files",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxlint-plugin-vize",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.716.0",
|
|
4
4
|
"description": "Oxlint JS plugin bridge for Vize Patina",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lint",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@tsdown/css": "0.22.14",
|
|
52
52
|
"@types/node": "25.9.2",
|
|
53
53
|
"@typescript-eslint/parser": "8.65.0",
|
|
54
|
-
"@vizejs/native": "0.
|
|
54
|
+
"@vizejs/native": "0.716.0",
|
|
55
55
|
"ajv": "8.20.0",
|
|
56
56
|
"eslint": "10.13.0",
|
|
57
57
|
"eslint-plugin-vue": "10.9.2",
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
"vue-eslint-parser": "10.4.1"
|
|
64
64
|
},
|
|
65
65
|
"optionalDependencies": {
|
|
66
|
-
"@vizejs/native-darwin-arm64": "0.
|
|
67
|
-
"@vizejs/native-darwin-x64": "0.
|
|
68
|
-
"@vizejs/native-linux-arm64-gnu": "0.
|
|
69
|
-
"@vizejs/native-linux-arm64-musl": "0.
|
|
70
|
-
"@vizejs/native-linux-x64-gnu": "0.
|
|
71
|
-
"@vizejs/native-linux-x64-musl": "0.
|
|
72
|
-
"@vizejs/native-win32-arm64-msvc": "0.
|
|
73
|
-
"@vizejs/native-win32-x64-msvc": "0.
|
|
66
|
+
"@vizejs/native-darwin-arm64": "0.716.0",
|
|
67
|
+
"@vizejs/native-darwin-x64": "0.716.0",
|
|
68
|
+
"@vizejs/native-linux-arm64-gnu": "0.716.0",
|
|
69
|
+
"@vizejs/native-linux-arm64-musl": "0.716.0",
|
|
70
|
+
"@vizejs/native-linux-x64-gnu": "0.716.0",
|
|
71
|
+
"@vizejs/native-linux-x64-musl": "0.716.0",
|
|
72
|
+
"@vizejs/native-win32-arm64-msvc": "0.716.0",
|
|
73
|
+
"@vizejs/native-win32-x64-msvc": "0.716.0"
|
|
74
74
|
},
|
|
75
75
|
"engines": {
|
|
76
76
|
"node": "^22 || >= 24"
|