fix: resolve TypeScript errors with moduleResolution nodenext and skipLibCheck false (#1313)
Resolves #1299 - Vendor \`mux-embed\`'s type declarations into \`playback-core/src/vendor/mux-embed.ts\`. TypeScript compiles this into \`dist/types/vendor/mux-embed.d.ts\` and emits a correct relative reference path for consumers. - Added a \`vendor:types\` npm script (\`scripts/vendor-mux-embed-types.mjs\`) that copies the types directly from \`node_modules/mux-embed/dist/types/mux-embed.d.ts\`. It's hooked into \`prebuild:types\` so it runs automatically on every build, and a separate \`verify:vendor\` script in CI fails the build if the committed vendored copy drifts from the installed \`mux-embed\` — keeping the source-of-truth honest at review time, not just at publish time. - Moved \`@types/google_interactive_media_ads_types\` to \`dependencies\` in \`mux-video\`. - Removed the broken \`/// <reference path>\` from \`mux-video/src/ads/index.ts\` — it's no longer needed since playback-core's vendored reference propagates transitiv - Stamp the resolved \`mux-embed\` version in the vendored file header (\`// Source: mux-embed@X.Y.Z / ...\`) so type drift after a dependency bump is visible at a glance in PR diffs. - Validate that the package resolved in \`vendor-mux-embed-types.mjs\` is actually \`mux-embed\` — defensive against edge cases in monorepo / symlink layouts where the directory walk-up could resolve the wrong \`package.json\`. ## Vendoring guardrails To keep the vendored types honest over time: | Guardrail | Where | What it catches | |-----------|-------|-----------------| | Version stamp in header | \`scripts/vendor-mux-embed-types.mjs\` | Silent drift after a dependency bump | | Package-name sanity check | \`scripts/vendor-mux-embed-types.mjs\` | Wrong \`package.json\` resolved in non-standard layouts | | \`verify:vendor\` in CI | \`scripts/verify-vendor-drift.mjs\` + \`.github/workflows/ci.yml\` | Stale \`src/vendor/mux-embed.ts\` committed without regeneration | --------- Co-authored-by: Manuel Calleriza <mcalleriza@mux.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
R
Renzo Delfino committed
243cf1e669b065b0bed3a5f94913d4c8e726723e
Parent: f87f553
Committed by GitHub <noreply@github.com>
on 5/8/2026, 9:49:34 PM