oxlint-plugin-vize 0.458.0 → 0.463.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 +35 -2
- package/package.json +10 -10
package/dist/cli.mjs
CHANGED
|
@@ -1026,6 +1026,38 @@ const read = (file) => {
|
|
|
1026
1026
|
};
|
|
1027
1027
|
const digest$1 = (bytes) => createHash("sha256").update(bytes).digest("hex");
|
|
1028
1028
|
const same = (left, right) => left == null ? right == null : right != null && left.equals(right);
|
|
1029
|
+
function metadataPath(bytes, file, prefix = "") {
|
|
1030
|
+
const text = new TextDecoder("utf-8", {
|
|
1031
|
+
fatal: true,
|
|
1032
|
+
ignoreBOM: true
|
|
1033
|
+
}).decode(bytes).replace(/\n$/u, "").replace(/\r$/u, "");
|
|
1034
|
+
if (!text.startsWith(prefix) || text.length === prefix.length || /[\r\n\0]/u.test(text)) throw new Error(`invalid Git directory metadata: ${file}`);
|
|
1035
|
+
return text.slice(prefix.length);
|
|
1036
|
+
}
|
|
1037
|
+
function regularDirectory(directory) {
|
|
1038
|
+
const stat = fs.lstatSync(directory);
|
|
1039
|
+
if (!stat.isDirectory() || stat.isSymbolicLink()) throw new Error(`Git metadata requires a regular directory: ${directory}`);
|
|
1040
|
+
return fs.realpathSync(directory);
|
|
1041
|
+
}
|
|
1042
|
+
/** Resolve Git's per-worktree marker and shared directory without losing input custody. */
|
|
1043
|
+
function gitDirectory(marker, sources) {
|
|
1044
|
+
let stat;
|
|
1045
|
+
try {
|
|
1046
|
+
stat = fs.lstatSync(marker);
|
|
1047
|
+
} catch (error) {
|
|
1048
|
+
if (error.code === "ENOENT") return null;
|
|
1049
|
+
throw error;
|
|
1050
|
+
}
|
|
1051
|
+
if (stat.isDirectory() && !stat.isSymbolicLink()) return marker;
|
|
1052
|
+
const bytes = read(marker);
|
|
1053
|
+
if (bytes == null) throw new Error(`Git metadata disappeared: ${marker}`);
|
|
1054
|
+
sources.set(marker, bytes);
|
|
1055
|
+
const directory = regularDirectory(path.resolve(path.dirname(marker), metadataPath(bytes, marker, "gitdir: ")));
|
|
1056
|
+
const commonFile = path.join(directory, "commondir");
|
|
1057
|
+
const common = read(commonFile);
|
|
1058
|
+
sources.set(commonFile, common);
|
|
1059
|
+
return common == null ? directory : regularDirectory(path.resolve(directory, metadataPath(common, commonFile)));
|
|
1060
|
+
}
|
|
1029
1061
|
/** Snapshots prove identity, and do not perform native ignore selection. */
|
|
1030
1062
|
function captureHtmlCustody(options, candidates) {
|
|
1031
1063
|
const sources = new Map([[options.rootJson, Buffer.from(options.rootBytes)]]);
|
|
@@ -1047,8 +1079,9 @@ function captureHtmlCustody(options, candidates) {
|
|
|
1047
1079
|
const file = path.join(directory, name);
|
|
1048
1080
|
sources.set(file, read(file));
|
|
1049
1081
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1082
|
+
const git = gitDirectory(path.join(directory, ".git"), sources);
|
|
1083
|
+
if (git != null) {
|
|
1084
|
+
const file = path.join(git, "info/exclude");
|
|
1052
1085
|
sources.set(file, read(file));
|
|
1053
1086
|
}
|
|
1054
1087
|
}
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@tsdown/css": "0.22.14",
|
|
14
14
|
"@types/node": "25.9.2",
|
|
15
|
-
"@vizejs/native": "0.
|
|
15
|
+
"@vizejs/native": "0.463.0",
|
|
16
16
|
"tsdown": "0.22.14",
|
|
17
17
|
"typescript": "6.0.3",
|
|
18
18
|
"vite": "npm:@voidzero-dev/vite-plus-core@0.1.24",
|
|
@@ -53,14 +53,14 @@
|
|
|
53
53
|
},
|
|
54
54
|
"name": "oxlint-plugin-vize",
|
|
55
55
|
"optionalDependencies": {
|
|
56
|
-
"@vizejs/native-darwin-arm64": "0.
|
|
57
|
-
"@vizejs/native-darwin-x64": "0.
|
|
58
|
-
"@vizejs/native-linux-arm64-gnu": "0.
|
|
59
|
-
"@vizejs/native-linux-arm64-musl": "0.
|
|
60
|
-
"@vizejs/native-linux-x64-gnu": "0.
|
|
61
|
-
"@vizejs/native-linux-x64-musl": "0.
|
|
62
|
-
"@vizejs/native-win32-arm64-msvc": "0.
|
|
63
|
-
"@vizejs/native-win32-x64-msvc": "0.
|
|
56
|
+
"@vizejs/native-darwin-arm64": "0.463.0",
|
|
57
|
+
"@vizejs/native-darwin-x64": "0.463.0",
|
|
58
|
+
"@vizejs/native-linux-arm64-gnu": "0.463.0",
|
|
59
|
+
"@vizejs/native-linux-arm64-musl": "0.463.0",
|
|
60
|
+
"@vizejs/native-linux-x64-gnu": "0.463.0",
|
|
61
|
+
"@vizejs/native-linux-x64-musl": "0.463.0",
|
|
62
|
+
"@vizejs/native-win32-arm64-msvc": "0.463.0",
|
|
63
|
+
"@vizejs/native-win32-x64-msvc": "0.463.0"
|
|
64
64
|
},
|
|
65
65
|
"publishConfig": {
|
|
66
66
|
"access": "public"
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"type": "module",
|
|
74
74
|
"types": "./dist/index.d.mts",
|
|
75
|
-
"version": "0.
|
|
75
|
+
"version": "0.463.0",
|
|
76
76
|
"scripts": {
|
|
77
77
|
"build": "vp pack",
|
|
78
78
|
"check": "vp check src vite.config.ts",
|