fix(jassub): [PKG-JASSUB-08] transfer offscreen canvas before queued rendering

This commit is contained in:
Harvey Zhao committed 2026-09-14 02:29:12 +08:00
1 parent 0f3c068aae
commit b4b0276fe9
22 files changed
+9667 -29

No files matched your search

@@ -8,15 +8,21 @@ import { hash } from './releases.mjs'
test('JASSUB local vendor patch retains its exact original, changed source and reversible patch identity', () => {
const record = JSON.parse(fs.readFileSync('refactor/baselines/jassub-vendor-patch.json', 'utf8'))
const original = execFileSync('git', ['show', `${record.baselineCommit}:${record.file}`], { encoding: 'utf8' }).replaceAll('\r\n', '\n')
const current = fs.readFileSync(record.file, 'utf8').replaceAll('\r\n', '\n')
const followUp = JSON.parse(fs.readFileSync('refactor/baselines/jassub-offscreen-patch.json', 'utf8'))
const current = execFileSync('git', ['show', `${followUp.baselineCommit}:${record.file}`], { encoding: 'utf8' }).replaceAll('\r\n', '\n')
const patch = fs.readFileSync(record.patchFile, 'utf8').replaceAll('\r\n', '\n')
assert.equal(hash(original), record.originalSha256LF)
assert.equal(hash(current), record.patchedSha256LF)
assert.equal(hash(patch), record.patchSha256LF)
assert.notEqual(record.originalSha256LF, record.patchedSha256LF)
execFileSync('git', ['apply', '--check', '--reverse', '--ignore-space-change', record.patchFile], { stdio: 'pipe' })
const committedPatch = execFileSync('git', ['diff', '--no-ext-diff', record.baselineCommit, followUp.baselineCommit, '--', record.file], { encoding: 'utf8' }).replaceAll('\r\n', '\n')
assert.equal(hash(committedPatch), record.patchSha256LF)
assert.equal(followUp.originalSha256LF, record.patchedSha256LF)
assert.equal(hash(fs.readFileSync(record.file, 'utf8').replaceAll('\r\n', '\n')), followUp.patchedSha256LF)
assert.equal(hash(fs.readFileSync(followUp.patchFile, 'utf8').replaceAll('\r\n', '\n')), followUp.patchSha256LF)
execFileSync('git', ['apply', '--check', '--reverse', '--ignore-space-change', followUp.patchFile], { stdio: 'pipe' })
const registry = JSON.parse(fs.readFileSync('refactor/third-party.json', 'utf8'))
const group = registry.vendored.find(item => item.id === 'jassub-code-and-workers')
assert.equal(group.localPatch.originalSha256LF, record.originalSha256LF)
assert.equal(group.fingerprints.find(item => item.path === record.file).sha256, record.patchedSha256LF)
assert.equal(group.fingerprints.find(item => item.path === record.file).sha256, followUp.patchedSha256LF)
})