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:
@@ -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");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user