oxlint-plugin-vize 0.716.0 → 0.717.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 +13 -5
- package/package.json +10 -10
package/dist/cli.mjs
CHANGED
|
@@ -518,7 +518,7 @@ function validateNestedConfigs(config, files) {
|
|
|
518
518
|
}
|
|
519
519
|
function validateScopedConfig(config, args, platform = process.platform) {
|
|
520
520
|
const value = config.value;
|
|
521
|
-
const hasPortableWindowsRoot = platform === "win32" && path.win32.isAbsolute(config.file)
|
|
521
|
+
const hasPortableWindowsRoot = platform === "win32" && path.win32.isAbsolute(config.file);
|
|
522
522
|
if (path.parse(config.file).root !== "/" && !hasPortableWindowsRoot) throw new Error("Scoped Vue transport cannot preserve non-POSIX filesystem roots.");
|
|
523
523
|
if (!config.module && value.extends != null && (!Array.isArray(value.extends) || value.extends.length !== 0)) throw new Error("Scoped Vue transport cannot preserve inherited configs; use a complete JSON config.");
|
|
524
524
|
if (config.module && value.extends != null) {
|
|
@@ -578,11 +578,13 @@ function createScopedMirror(cwd, config, files) {
|
|
|
578
578
|
const outside = [...originalsToCopies].filter(([file]) => !contains(configDir, file));
|
|
579
579
|
const insidePrefix = toCliPath(path.join(root, "inside"));
|
|
580
580
|
const outsidePrefix = toCliPath(path.join(root, "outside"));
|
|
581
|
+
const configRoot = path.parse(configDir).root;
|
|
581
582
|
const mapPatterns = (value) => {
|
|
582
583
|
if (!Array.isArray(value) || value.some((item) => typeof item !== "string")) throw new Error("Scoped Vue transport requires string-array override patterns.");
|
|
583
584
|
return value.flatMap((pattern) => {
|
|
584
585
|
if (pattern.startsWith("!")) throw new Error("Scoped Vue transport cannot preserve negated override patterns.");
|
|
585
|
-
|
|
586
|
+
const absolute = projectAbsoluteOverridePattern(outsidePrefix, pattern, configRoot);
|
|
587
|
+
if (absolute != null) return absolute;
|
|
586
588
|
const mapped = [`${literalGlob(insidePrefix)}/${pattern}`];
|
|
587
589
|
if (outside.length === 0) return mapped;
|
|
588
590
|
if (pattern === "**/*.vue") return [...mapped, ...outside.map(([, copy]) => literalGlob(copy))];
|
|
@@ -637,9 +639,6 @@ function createScopedMirror(cwd, config, files) {
|
|
|
637
639
|
function isRecord$1(value) {
|
|
638
640
|
return typeof value === "object" && value != null && !Array.isArray(value);
|
|
639
641
|
}
|
|
640
|
-
function hasPathSelection(value) {
|
|
641
|
-
return value.ignorePatterns != null || value.overrides != null || Array.isArray(value.extends) && value.extends.some((parent) => isRecord$1(parent) && hasPathSelection(parent));
|
|
642
|
-
}
|
|
643
642
|
function strings(value) {
|
|
644
643
|
if (value == null) return [];
|
|
645
644
|
if (!Array.isArray(value) || value.some((item) => typeof item !== "string")) throw new Error("Scoped Vue transport requires string-array override patterns.");
|
|
@@ -655,6 +654,15 @@ function toCliPath(file) {
|
|
|
655
654
|
function literalGlob(file) {
|
|
656
655
|
return toCliPath(file).replaceAll(/[\\*?[\]{}]/gu, String.raw`\$&`);
|
|
657
656
|
}
|
|
657
|
+
function projectAbsoluteOverridePattern(outsidePrefix, pattern, configRoot, platform = process.platform) {
|
|
658
|
+
const pathApi = platform === "win32" ? path.win32 : path.posix;
|
|
659
|
+
if (!pathApi.isAbsolute(pattern)) return void 0;
|
|
660
|
+
const toPlatformCliPath = (value) => platform === "win32" ? value.replaceAll("\\", "/") : value;
|
|
661
|
+
const patternRoot = pathApi.parse(pattern).root;
|
|
662
|
+
if (toPlatformCliPath(patternRoot) !== toPlatformCliPath(configRoot)) return [];
|
|
663
|
+
const relative = toPlatformCliPath(pattern.slice(patternRoot.length)).replace(/^\/+/, "");
|
|
664
|
+
return [`${literalGlob(toPlatformCliPath(outsidePrefix))}/${relative}`];
|
|
665
|
+
}
|
|
658
666
|
//#endregion
|
|
659
667
|
//#region src/cli/project-checks.ts
|
|
660
668
|
const isRecord = (value) => typeof value === "object" && value != null && !Array.isArray(value);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oxlint-plugin-vize",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.717.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.717.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.717.0",
|
|
67
|
+
"@vizejs/native-darwin-x64": "0.717.0",
|
|
68
|
+
"@vizejs/native-linux-arm64-gnu": "0.717.0",
|
|
69
|
+
"@vizejs/native-linux-arm64-musl": "0.717.0",
|
|
70
|
+
"@vizejs/native-linux-x64-gnu": "0.717.0",
|
|
71
|
+
"@vizejs/native-linux-x64-musl": "0.717.0",
|
|
72
|
+
"@vizejs/native-win32-arm64-msvc": "0.717.0",
|
|
73
|
+
"@vizejs/native-win32-x64-msvc": "0.717.0"
|
|
74
74
|
},
|
|
75
75
|
"engines": {
|
|
76
76
|
"node": "^22 || >= 24"
|