mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-06 14:47:29 +00:00
* fix(lint): check no longer fails projects that inline the GSAP library non_deterministic_code skips a script that is GSAP itself (producer inlining comment or GSAP banner), using the detector missing_gsap_script already had, now one shared helper. The author's own Math.random/Date.now calls are still flagged. * fix(lint): only GSAP's own code is exempt from the determinism check Exempt the parsed GSAP UMD statement that carries its banner, not every script that mentions GreenSock. Strings, comments, spoofed banners and author code before or after the library in the same script are checked again. * refactor(lint): name the GSAP blanking step instead of commenting it * fix(lint): exempt only GSAP's verified wrapper call from the determinism check Recognise GSAP's UMD wrapper by structure (factory IIFE called with this and a function, with a real define.amd member) anywhere in the tree, and blank only that call. Author code joined by a comma or wrapped in an outer IIFE is checked; define.amd text is not enough. * fix(lint): a bundle wrapping GSAP no longer inherits its determinism exemption The define.amd check reads only the wrapper's own body, and each GSAP banner belongs to the wrapper right after it, else the innermost one containing it. An outer wrapper or UMD bundle around pasted GSAP keeps its author code checked. * fix(lint): a banner inside a bundle no longer exempts the bundle around GSAP A banner introduces the wrapper after it across whitespace, ! ; ( and comments, so producer comments and statement separators bind to GSAP itself. The fallback owner for a banner inside a wrapper must wrap no other wrapper, so a bundle around GSAP never inherits it. * fix(lint): author code bundled with GSAP keeps its randomness checked A GSAP banner now exempts only the UMD wrapper call that starts right after it (skipping whitespace, comments, `!`, `;` and `(`). The fallback that gave a banner to the innermost enclosing wrapper is gone: Rollup's UMD output for an ESM import of GSAP keeps the banner inside the one factory it shares with author code, so that fallback exempted the whole bundle, author Math.random() and Date.now() included. Tradeoff: unminified dist/gsap.js pasted inline has its banner inside its own factory, so it is flagged again, as on main. The minified gsap.min.js and producer-inlined copies stay exempt. * test(lint): the Rollup bundle case reuses the GSAP banner constant * fix(lint): a script name that mentions gsap no longer exempts the bundle it heads The producer's inlined-source comment now marks library code only when its URL path is an npm gsap dist file (gsap or gsap@<version>, then /dist/<file>.js, query and hash ignored). A Rollup/Terser bundle of GSAP plus author code inlined from gsap-composition.js, scene.js?vendor=gsap or another domain's gsap-demo/scene.js keeps its own Math.random() and Date.now() checked.