oxlint-plugin-vize 0.504.0 → 0.507.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.
Files changed (2) hide show
  1. package/dist/cli.mjs +18 -6
  2. package/package.json +10 -10
package/dist/cli.mjs CHANGED
@@ -1148,6 +1148,7 @@ function implicitDefault(context) {
1148
1148
  //#endregion
1149
1149
  //#region src/cli/html-operation.ts
1150
1150
  const digest = (bytes) => createHash("sha256").update(bytes).digest("hex");
1151
+ var HtmlSkip = class extends Error {};
1151
1152
  /** Capture original root/provider/piped-child context without executing a provider query. */
1152
1153
  function prepareHtmlContext(cwd, args, entrypoint, version, candidates) {
1153
1154
  const context = { environment: presentationContext() };
@@ -1156,7 +1157,7 @@ function prepareHtmlContext(cwd, args, entrypoint, version, candidates) {
1156
1157
  "1.78.0",
1157
1158
  "1.81.0",
1158
1159
  "1.86.0"
1159
- ].includes(version)) throw new Error("original HTML requires a qualified Oxlint 1.78.0, 1.81.0 or 1.86.0 host");
1160
+ ].includes(version)) throw new HtmlSkip("original HTML requires a qualified Oxlint 1.78.0, 1.81.0 or 1.86.0 host");
1160
1161
  const targets = getLintTargets(args);
1161
1162
  if (targets.length !== 1) throw new Error("original HTML requires one literal original target");
1162
1163
  const config = readScopedConfig(cwd, args);
@@ -1241,7 +1242,7 @@ function prepareHtmlContext(cwd, args, entrypoint, version, candidates) {
1241
1242
  "unix",
1242
1243
  "stylish"
1243
1244
  ].includes(format)) throw new Error("original HTML requires an explicit default, json, unix or stylish report");
1244
- if (!explicitFormat && !implicitDefault(context.environment)) throw new Error("original HTML requires an explicit supported format when the host selects agent/GitHub output");
1245
+ if (!explicitFormat && !implicitDefault(context.environment)) throw new HtmlSkip("original HTML requires an explicit supported format when the host selects agent/GitHub output");
1245
1246
  const forceColor = context.environment.CI != null || context.environment.FORCE_COLOR != null && context.environment.FORCE_COLOR !== "0";
1246
1247
  context.options = {
1247
1248
  cwd,
@@ -1264,13 +1265,15 @@ function prepareHtmlContext(cwd, args, entrypoint, version, candidates) {
1264
1265
  };
1265
1266
  context.custody = captureHtmlCustody(context.options, candidates);
1266
1267
  } catch (error) {
1267
- context.failure = error instanceof Error ? error.message : String(error);
1268
+ const detail = error instanceof Error ? error.message : String(error);
1269
+ if (error instanceof HtmlSkip) context.skipReason = detail;
1270
+ else context.failure = detail;
1268
1271
  }
1269
1272
  return context;
1270
1273
  }
1271
1274
  /** One genuine native operation after normal stock/Vue setup, never a carrier. */
1272
1275
  function executeHtml(context) {
1273
- if (context.failure || !context.options) throw new Error(context.failure ?? "original HTML context is unavailable");
1276
+ if (context.failure || context.skipReason || !context.options) throw new Error(context.failure ?? context.skipReason ?? "original HTML context is unavailable");
1274
1277
  const binding = loadBinding();
1275
1278
  if (typeof binding.lintOxlintHtml !== "function") throw new Error("installed native binding does not expose original HTML execution");
1276
1279
  assertHtmlCustody(context);
@@ -1319,7 +1322,7 @@ function completeJson(text) {
1319
1322
  }
1320
1323
  /** Genuine child packets establish host setup; no additional provider query. */
1321
1324
  function qualifyHtmlHost(context, original) {
1322
- if (context.failure || !context.options || !context.provider) throw new Error(context.failure ?? "original HTML host context is unavailable");
1325
+ if (context.failure || context.skipReason || !context.options || !context.provider) throw new Error(context.failure ?? context.skipReason ?? "original HTML host context is unavailable");
1323
1326
  const phases = original.phases ?? (original.observation ? [original.observation] : []);
1324
1327
  if (phases.length === 0) throw new Error("original HTML requires complete actual host observations");
1325
1328
  for (const phase of phases) {
@@ -1382,6 +1385,15 @@ function unavailableHtml(original, error) {
1382
1385
  stderr: original.stderr + suffix
1383
1386
  };
1384
1387
  }
1388
+ function skippedHtml(original, error) {
1389
+ const suffix = `\n[oxlint-plugin-vize] Skipped standalone HTML lint: ${error instanceof Error ? error.message : String(error)}\n`;
1390
+ return {
1391
+ ...original,
1392
+ rawStderr: Buffer.concat([original.rawStderr ?? Buffer.from(original.stderr), Buffer.from(suffix)]),
1393
+ status: original.status ?? 1,
1394
+ stderr: original.stderr + suffix
1395
+ };
1396
+ }
1385
1397
  //#endregion
1386
1398
  //#region src/cli/process.ts
1387
1399
  /** Retain the actual child packet, including buffered bytes on stream/spawn failure. */
@@ -1698,7 +1710,7 @@ async function main() {
1698
1710
  if (!outcome.completed) throw new Error("original HTML operation is incomplete");
1699
1711
  merged = mergeHtmlOutput(merged, outcome.completed, forwardedArgs);
1700
1712
  } catch (error) {
1701
- merged = unavailableHtml(merged, error);
1713
+ merged = html.skipReason && !html.failure ? skippedHtml(merged, error) : unavailableHtml(merged, error);
1702
1714
  }
1703
1715
  if (requestsTypeAware(forwardedArgs, cwd)) merged = await withVueTypeAwarePass(merged, cwd, oxlintEntrypoint, forwardedArgs, vueFiles);
1704
1716
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxlint-plugin-vize",
3
- "version": "0.504.0",
3
+ "version": "0.507.0",
4
4
  "description": "Oxlint JS plugin bridge for Vize Patina",
5
5
  "keywords": [
6
6
  "lint",
@@ -48,21 +48,21 @@
48
48
  "devDependencies": {
49
49
  "@tsdown/css": "0.22.14",
50
50
  "@types/node": "25.9.2",
51
- "@vizejs/native": "0.504.0",
51
+ "@vizejs/native": "0.507.0",
52
52
  "tsdown": "0.22.14",
53
53
  "typescript": "6.0.3",
54
54
  "vite": "npm:@voidzero-dev/vite-plus-core@0.1.24",
55
55
  "vite-plus": "0.1.24"
56
56
  },
57
57
  "optionalDependencies": {
58
- "@vizejs/native-darwin-arm64": "0.504.0",
59
- "@vizejs/native-darwin-x64": "0.504.0",
60
- "@vizejs/native-linux-arm64-gnu": "0.504.0",
61
- "@vizejs/native-linux-arm64-musl": "0.504.0",
62
- "@vizejs/native-linux-x64-gnu": "0.504.0",
63
- "@vizejs/native-linux-x64-musl": "0.504.0",
64
- "@vizejs/native-win32-arm64-msvc": "0.504.0",
65
- "@vizejs/native-win32-x64-msvc": "0.504.0"
58
+ "@vizejs/native-darwin-arm64": "0.507.0",
59
+ "@vizejs/native-darwin-x64": "0.507.0",
60
+ "@vizejs/native-linux-arm64-gnu": "0.507.0",
61
+ "@vizejs/native-linux-arm64-musl": "0.507.0",
62
+ "@vizejs/native-linux-x64-gnu": "0.507.0",
63
+ "@vizejs/native-linux-x64-musl": "0.507.0",
64
+ "@vizejs/native-win32-arm64-msvc": "0.507.0",
65
+ "@vizejs/native-win32-x64-msvc": "0.507.0"
66
66
  },
67
67
  "engines": {
68
68
  "node": "^22 || >= 24"