test modules#3387
Conversation
|
View your CI Pipeline Execution ↗ for commit 7b8dad9 ☁️ Nx Cloud last updated this comment at |
|
View your CI Pipeline Execution ↗ for commit d0b58cc ☁️ Nx Cloud last updated this comment at |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## cass-gmt-1473-beta #3387 +/- ##
=====================================================
Coverage ? 89.95%
=====================================================
Files ? 271
Lines ? 5697
Branches ? 1920
=====================================================
Hits ? 5125
Misses ? 564
Partials ? 8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Adds missing exports needed by consumers migrating away from /dist deep imports: - variance: Scale type - gamut/Button: ButtonBaseProps - gamut/ButtonBase: ButtonSelectors - gamut/Form: FormValues, formFieldPaddingStyles, formFieldStyles, conditionalStyles - gamut/Markdown: HTMLToReactNode - gamut/Menu: ListItem - gamut-styles/variance: propConfig namespace
|
📬 Published Alpha Packages:
|
|
🚀 Styleguide deploy preview ready! Preview URL: https://6a4403ac401cf119d33dd7d0--gamut-preview.netlify.app |
Overview
Converts all Gamut packages to native ESM (
"type": "module") by addingexportsmaps, removing the legacy"module"field, and migrating config files to explicit.cjsextensions. Also extracts a shared Jest base config to eliminate duplication across packages, and re-exports typography variant utilities fromText.tsx.Module / package.json changes
variance,gamut-icons,gamut-illustrations,gamut-patterns,gamut-styles,gamut-tests,gamut— adds"type": "module"and a proper"exports"map (import+types+defaultconditions); removes legacy"module"field; moves"types"into the exports mapjest.config.base.cjs(root) — extracts shared Jest configuration (coverage paths, reporters,moduleNameMapper) into a reusable factory consumed by per-package configsbabel.config.cjs,jest.config.cjs, and SVGR/plugin configs — renamed to.cjsso Node can load them as CommonJS in an ESM package contextgamut-icons/jest.config.cjs— addscjstomoduleFileExtensionssomask-plugin.cjsresolves correctly under JestTypography
Text.tsx— re-exportstypographyElementVariants,typographyStyleVariants, andtypographyUtilitiesfrom the variants module; enables tree-shakeable imports of these constants downstreamText.stories.tsx/tables.tsx(styleguide) — updated to consume the new re-exportsSnapshots / tests
gamut.test.ts.snap— updated to reflect 3 new typography exportsForm/utils.test.tsx.snap— updated snapshot drift (label attributes, pre-existing)PR Checklist
Testing Instructions
yarn nx run-many --target=build --all— all 7 packages should build cleanly with no CJS/ESM interop errorsyarn nx run-many --target=test --all— all suites green; gamut-icons mask-plugin test should pass@codecademy/gamutand verify tree-shaking works (bundle should not include unused components)typographyElementVariantsdirectly from@codecademy/gamutand confirm the export resolves without errorPR Links and Envs