Repository navigation
Conversation
…ides moved-exports moves Video and VideoProps from the root to @Codecademy/gamut/Video (scope-rename then swaps the scope). markdown-video-overrides adds explicit iframeOverride/videoOverride to each <Markdown>, since it no longer renders video through Video by default, and drops the removed skipDefaultOverrides keys. tsconfig-dom warns about tsconfigs without "dom", which Video used to supply. On the Gamut side, a Video/package.json stub makes the subpath resolve under node10, MarkdownVideo no longer passes NaN sizes, and a one-line <video> is no longer wrapped in a <p>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 20, 2026
…migrations Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rkdown # Conflicts: # packages/gamut-codemods/src/presets/scope-swap/index.ts
dreamwasp
marked this pull request as ready for review
October 20, 2026 15:39
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LinKCoding
approved these changes
Oct 26, 2026
LinKCoding
left a comment
Contributor
There was a problem hiding this comment.
Looking good!
I also ran scope-swap on this and got these in next steps:
— next steps —
- Video needs two peer dependencies that Gamut no longer installs for you:
@vidstack/reactandreact-player. Gamut supports @vidstack/react 1.12.x only (its npmlatesttag is 0.6.x). Install them:yarn add @vidstack/react@~1.12.12 react-player@^3.4.0. - Some tsconfig files set "lib" without "dom" (see the tsconfig-dom warnings). Video no longer loads with the root import, and it was supplying the DOM types. Add "dom" to those files if type-checking fails on document, HTMLElement, ResizeObserver, and so on.
- Run your formatter and lint autofix (prettier --write, then eslint --fix). Split imports come out in recast style,
@skillsoftsorts differently from@codecademyfor import-order rules like simple-import-sort, and the shorter scope lets some wrapped imports fit on one line. - Reinstall (yarn), then type-check and run your tests.
- Work through the warnings above and the leftovers list.
^ steps 1 + 2 is 👍
The video + markdown pages in SB loads and works - I didn't see any <video> elements in <p> elements
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Breaking change:
VideoandVideoPropsare no longer on the root export, and<Markdown>no longer renders<iframe>and<video>throughVideoby default. This PR has the codemod for both, plus the Gamut-side Video and Markdown fixes.Stack (split from #28, merge in order):
mainmainCodemod
moved-exportsmovesVideo/VideoPropsimports to@skillsoft/gamut/Video. It splits mixed imports and merges into an existing/Videoimport. Namespace imports,export *, and mocks that stubVideoget a warning instead.markdown-video-overridesaddsiframeOverride/videoOverride, withIframeandMarkdownVideoimported from/Video, to each<Markdown>that didn't opt out, so output stays the same.skipDefaultOverrides.iframe/.videokeys, writingiframeOverride={undefined}where a skip wastrue.@codecademy/gamutrange in the repo is already 74.0.0 or newer.tsconfig-dom(report only) warns about tsconfigs whoselibhas no"dom". Video used to supply the DOM types through the root import.@vidstack/reactandreact-playerpeers to install.@skillsoft/gamutVideo/package.jsonstub makes@skillsoft/gamut/Videoresolve undermoduleResolution: "node". The attwno-resolutionignore that was hiding this is removed.MarkdownVideo: no longer passesNaNwidth or height when the<video>has none.<video>:<video>...</video>on one line is no longer wrapped in a<p>./Videoimport path).PR Checklist
Testing Instructions
yarn nx test gamut-codemods. Expect 83 tests to pass.yarn nx test gamut. That includes the two new Markdown tests.yarn nx run gamut:verify-package. attw now runs without theno-resolutionignore.Build and run on a throwaway repo:
a.tsxshould importVideo,Iframe, andMarkdownVideofrom@skillsoft/gamut/Video, and<Markdown>should have both overrides. The next steps should list the Video peers and the tsconfigdomitem.Storybook: the Markdown stories with video still render, and a one-line
<video>isn't inside a<p>.Stacked PRs don't publish pkg.pr.new previews, because
preview.ymlonly runs for PRs intomain.PR Links and Envs
🤖 Generated with Claude Code