Add full source parity validation workflow
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-09-07 16:45:07 +08:00
parent a3588d41a3
commit f68c6c9678
59 changed files with 4556 additions and 842 deletions

View File

@@ -28,6 +28,19 @@ const importTranspiled = ts.transpileModule(fs.readFileSync(importSourcePath, "u
});
assert.deepEqual(importTranspiled.diagnostics, []);
fs.writeFileSync(path.join(temporary, "external-vfont-import.mjs"), importTranspiled.outputText.replace('"../../../protocol/external-vfont"', '"./external-vfont.mjs"'));
const commandSourcePath = path.join(repoRoot, "web/protocol/nonmesh-geometry-commands.ts");
const commandTranspiled = ts.transpileModule(fs.readFileSync(commandSourcePath, "utf8"), {
compilerOptions: { module: ts.ModuleKind.ES2022, target: ts.ScriptTarget.ES2022 },
fileName: commandSourcePath,
reportDiagnostics: true,
});
assert.deepEqual(commandTranspiled.diagnostics, []);
fs.writeFileSync(path.join(temporary, "nonmesh-geometry-commands.mjs"), commandTranspiled.outputText);
fs.writeFileSync(
path.join(temporary, "external-vfont-import.mjs"),
fs.readFileSync(path.join(temporary, "external-vfont-import.mjs"), "utf8")
.replace('"../../../protocol/nonmesh-geometry-commands"', '"./nonmesh-geometry-commands.mjs"'),
);
const importer = await import(pathToFileURL(path.join(temporary, "external-vfont-import.mjs")));
const pfb = fs.readFileSync(path.join(repoRoot, "blender-5.2.0/release/datafiles/bfont.pfb"));
const data = pfb.buffer.slice(pfb.byteOffset, pfb.byteOffset + pfb.byteLength);