fix: restore the production gate after the migration tasks

- rebuild editors/vscode bundles, stale since the parser escape fix
- attach the caught ParseError as `cause` in both migration validators
- drop two unused test bindings flagged by eslint

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-20 12:19:53 +05:30
co-authored by Claude Opus 5
parent 6bb3ab5fe7
commit aded2daab9
7 changed files with 17 additions and 12 deletions
+6 -5
View File
@@ -1,6 +1,6 @@
"use strict";
// Generated by scripts/build-editor-compiler.mjs. Do not edit directly.
// WRN editor compiler source hash: 653a88ea2a34e9c446fc55b268f3ba9c5d27f9e114fc6aa9228ef560e1fd616d
// WRN editor compiler source hash: 2987e8e9d91b793818a195395e740d35d0d5c2a320ff1c3a5ae77363850c7b8e
// WRN editor compiler generator hash: a54ca847c758bc98d8e353ad6d70088df31de1820f6cf9d1c3462505f563e6b8
// Generated with TypeScript: 6.0.3
const __nodeRequire = require;
@@ -7069,12 +7069,13 @@ function parseHtmlView(src, pos) {
if (quote !== '"' && quote !== "'")
return fail("Expected a quoted attribute value");
i++;
// Backslash-escapes the delimiter (and anything else) so an attribute
// value -- e.g. an `api="fn({ a: \"b\" })"` call expression -- can carry
// the same quote character it's wrapped in.
// Backslash escapes the delimiter -- so an attribute value such as the
// call expression `api="fn({ a: \"b\" })"` can carry the same quote
// character it's wrapped in -- and escapes itself. Every other backslash
// is a literal one, so a value like "C:\Users\name" survives intact.
let value = "";
while (i < src.length && src[i] !== quote) {
if (src[i] === "\\" && i + 1 < src.length) {
if (src[i] === "\\" && (src[i + 1] === quote || src[i + 1] === "\\")) {
value += src[i + 1];
i += 2;
continue;
+1 -1
View File
@@ -1,4 +1,4 @@
// WRN editor extension source hash: feecaeb59a41771bd1a35be172bf89cec8451468a4bf817f176cc54de3d8267a
// WRN editor extension source hash: 01c5b97824df25422267667a6083adbdc0a5dc14ae7fbec5345084a214d40523
// WRN editor extension generator hash: 456d1d614e44e5fb1f19b784176c09cf2ade9b64ef73a17934c2698150b62728
"use strict";
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
+2 -2
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env node
// WRN editor language server source hash: 613d98d8154714b7e5799b02a27e16cd707a50bc2b5ae7d9fbb3f0834b9251e6
// WRN editor language server source hash: 92a9c7cd3babafdbc518a6f20c0c8f0025e49e92a28a2fa5598c8bb7a858e800
// WRN editor language server generator hash: f593a44aaf05495b789ce7a3086bee1eebb951b884d41c0e017bbcfe5f547e72
// @bun @bun-cjs
(function(exports, require, module, __filename, __dirname) {var __create = Object.create;
@@ -172043,7 +172043,7 @@ function parseHtmlView(src, pos) {
i++;
let value = "";
while (i < src.length && src[i] !== quote) {
if (src[i] === "\\" && i + 1 < src.length) {
if (src[i] === "\\" && (src[i + 1] === quote || src[i + 1] === "\\")) {
value += src[i + 1];
i += 2;
continue;
+3 -1
View File
@@ -276,7 +276,9 @@ export function migrateApisBlock(
parse(after);
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
throw new Error(`apis-block migration produced source that failed to parse: ${message}`);
throw new Error(`apis-block migration produced source that failed to parse: ${message}`, {
cause: error,
});
}
return { source: after, changed: true };
@@ -266,7 +266,9 @@ export function migrateModeFunctions(
parse(after);
} catch (error) {
const message = error instanceof Error ? error.message : String(error);
throw new Error(`mode-functions migration produced source that failed to parse: ${message}`);
throw new Error(`mode-functions migration produced source that failed to parse: ${message}`, {
cause: error,
});
}
}
@@ -1,5 +1,5 @@
import { afterEach, expect, test } from "bun:test";
import { mkdirSync, mkdtempSync, readFileSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
import { mkdirSync, mkdtempSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { parse } from "@wrnexus/syntax";
@@ -9,7 +9,7 @@ import { withServerFnRequestContext } from "../src/index.ts";
// request context, not `undefined`.
test("a handler invoked through the server-function RPC path can read the request context", async () => {
let seen: unknown;
const innerHandler = async (request: Request): Promise<Response> => {
const innerHandler = async (_request: Request): Promise<Response> => {
seen = getRequestContext();
return new Response("ok");
};