feat: add multi-engine regex flavour support

This commit is contained in:
2026-07-27 11:43:51 +02:00
parent 7079cde15f
commit 7f3a91ad37
340 changed files with 643286 additions and 483 deletions

View File

@@ -41,6 +41,8 @@ export const JAVA_LOCK = Object.freeze({
"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30",
noticeSha256:
"6c2b3372a6beee7fbaad482248ac0f5ad2b099d92ff2a528c04261cc9c0636f4",
packagedNoticeSha256:
"71bbe79ff78d0e5e64096acdd418589abfe886b8f827048dc655df438a57e477",
}),
toolchain: Object.freeze({
mavenVersion: "3.9.15",
@@ -282,6 +284,9 @@ async function expectedMetadata(root, pack) {
license: JAVA_LOCK.source.license,
upstreamLicenseSha256: JAVA_LOCK.source.licenseSha256,
upstreamNoticeSha256: JAVA_LOCK.source.noticeSha256,
packagedNoticeSha256: JAVA_LOCK.source.packagedNoticeSha256,
noticeNormalization:
"The packaged notice removes one redundant blank line and adds a final LF; its attribution text is unchanged.",
},
toolchain: {
mavenVersion: JAVA_LOCK.toolchain.mavenVersion,
@@ -418,6 +423,14 @@ export async function verifyJavaPack(packDirectory, root) {
) {
throw new Error("The staged TeaVM licence does not match tag 0.15.0.");
}
if (
(await sha256File(path.join(pack, "NOTICE.txt"))) !==
JAVA_LOCK.source.packagedNoticeSha256
) {
throw new Error(
"The staged TeaVM notice does not match the documented normalized notice.",
);
}
const moduleText = await readFile(path.join(pack, "java-regex.mjs"), "utf8");
if (
moduleText.includes("sourceMappingURL") ||