Add full source parity validation workflow
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user