mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-03 04:38:33 +00:00
fix: deterministic stagger, lint importmap/module, cache-bust previews
- Replace from:"random" with from:"center" stagger in us-map, world-map, spain-map — random stagger is non-deterministic across parallel render workers, causing visual jumps at chunk boundaries. - Exempt type="importmap" and type="module" inline scripts from the invalid_inline_script_syntax lint rule. The rule used new Function() to parse, which rejects import statements and JSON import maps. Closes #929. - Cache-bust all map MDX preview video URLs after re-rendering with the deterministic stagger fix.
This commit is contained in:
@@ -157,7 +157,11 @@ export const coreRules: Array<(ctx: LintContext) => HyperframeLintFinding[]> = [
|
||||
const findings: HyperframeLintFinding[] = [];
|
||||
for (const script of scripts) {
|
||||
const attrs = script.attrs || "";
|
||||
if (/\bsrc\s*=/.test(attrs) || /\btype\s*=\s*["']application\/json["']/.test(attrs)) continue;
|
||||
if (
|
||||
/\bsrc\s*=/.test(attrs) ||
|
||||
/\btype\s*=\s*["'](?:application\/json|importmap|module)["']/.test(attrs)
|
||||
)
|
||||
continue;
|
||||
const syntaxError = getInlineScriptSyntaxError(script.content);
|
||||
if (!syntaxError) continue;
|
||||
findings.push({
|
||||
|
||||
Reference in New Issue
Block a user