Skip to content

build(deps): make @skillsoft packages easier to install - #44

Merged
dreamwasp merged 4 commits into
mainfrom
cass-gmt-1790-deps
Oct 28, 2026
Merged

dreamwasp merged 4 commits into
mainfrom
cass-gmt-1790-deps

Conversation

@dreamwasp

@dreamwasp dreamwasp commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Overview

Fewer packages for consumers to install by hand, and one shared copy of the internal packages. This PR is independent of the codemod stack and is based on main.

Stack (split from #28, merge in order):

  1. feat(gamut-codemods): add the codemods CLI and an empty scope-swap preset #38 Scaffold, based on main
  2. feat(gamut-codemods): rename packages and replace gamut-kit in scope-swap #39 Package scope rename and gamut-kit removal, based on feat(gamut-codemods): add the codemods CLI and an empty scope-swap preset #38
  3. feat(gamut-codemods): move Video imports and add Markdown video overrides #40 Video and Markdown, based on feat(gamut-codemods): rename packages and replace gamut-kit in scope-swap #39
  4. feat(gamut)!: promote deep imports to the root, renaming Menu and SelectDropdown elements #41 Deep imports and Menu/SelectDropdown renames, based on feat(gamut-codemods): rename packages and replace gamut-kit in scope-swap #39
  5. feat(gamut-codemods): rename the ESLint plugin prefix in scope-swap #42 ESLint plugin prefix, based on feat(gamut-codemods): rename packages and replace gamut-kit in scope-swap #39
  6. feat(gamut-codemods): warn about esmExternals: false in next.config #43 Next.js esmExternals warning, based on feat(gamut-codemods): rename packages and replace gamut-kit in scope-swap #39
  7. build(deps): make @skillsoft packages easier to install #44 Simpler dependencies (independent), based on main 👈 this PR
  8. feat(gamut-agent-tools): add the gamut-scope-swap skill #45 gamut-scope-swap skill (open last), based on feat(gamut-codemods): rename packages and replace gamut-kit in scope-swap #39, includes feat(gamut-codemods): move Video imports and add Markdown video overrides #40–feat(gamut-codemods): warn about esmExternals: false in next.config #43
  • ^ ranges between packages: @skillsoft/* packages depend on each other with ^ ranges instead of exact versions, so installs share one gamut-styles and variance.
  • @skillsoft/gamut-styles:
    • adds csstype as a dependency (its published types import it, and it only resolved before through variance)
    • moves lodash from peer to regular dependency
    • keeps @emotion/cache and stylis as peers
  • @skillsoft/gamut-icons: drops an unused lodash peer.
  • @skillsoft/variance: the typescript peer is optional.
  • @skillsoft/gamut-tests: component-test-setup is ^0.3.1 instead of *.
  • Third-party pins stay exact. Loosening them re-resolved react-aria-components from 1.7.1 to 1.21.1, which should be tested on its own.

The original changeset said stylis and @emotion/cache became regular dependencies. dd9368521 reverted that, so the changeset now says they're still peers.

PR Checklist

  • Related to designs: N/A
  • Related to JIRA ticket: GMT-1790
  • Changeset added
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions for the code change
  • Package previews from this PR are passing end-to-end tests in all relevant consuming repositories

Testing Instructions

  1. yarn nx run-many -t verify-package -p gamut gamut-styles gamut-icons gamut-tests variance (publint and attw).
  2. In a fresh project, install this PR's pkg.pr.new preview of @skillsoft/gamut with react, react-dom, @emotion/react, @emotion/styled, @emotion/cache, and stylis.
    • There should be no other unmet peer warnings besides @types/react.
    • node_modules should have one copy each of @skillsoft/gamut-styles and @skillsoft/variance.
  3. Type-check a file that imports @skillsoft/gamut-styles with skipLibCheck: false. csstype should resolve.

PR Links and Envs

Repository PR Link
Mono N/A

🤖 Generated with Claude Code

Sibling @SkillSoft packages depend on each other with ^ ranges, so
installs share one copy of gamut-styles and variance. gamut-styles gets
csstype (its published types import it) and lodash as regular
dependencies, gamut-icons drops an unused lodash peer, variance's
typescript peer is optional, and gamut-tests pins component-test-setup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pkg-pr-new

pkg-pr-new Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@skillsoft/eslint-plugin-gamut

npm i https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/eslint-plugin-gamut@44
yarn add https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/eslint-plugin-gamut@44.tgz

@skillsoft/gamut

npm i https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut@44
yarn add https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut@44.tgz

@skillsoft/gamut-agent-tools

npm i https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-agent-tools@44
yarn add https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-agent-tools@44.tgz

@skillsoft/gamut-codemods

npm i https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-codemods@44
yarn add https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-codemods@44.tgz

@skillsoft/gamut-icons

npm i https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-icons@44
yarn add https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-icons@44.tgz

@skillsoft/gamut-illustrations

npm i https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-illustrations@44
yarn add https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-illustrations@44.tgz

@skillsoft/gamut-patterns

npm i https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-patterns@44
yarn add https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-patterns@44.tgz

@skillsoft/gamut-styles

npm i https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-styles@44
yarn add https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-styles@44.tgz

@skillsoft/gamut-tests

npm i https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-tests@44
yarn add https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut-tests@44.tgz

@skillsoft/variance

npm i https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/variance@44
yarn add https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/variance@44.tgz

commit: 013ca85

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.87%. Comparing base (3cbade5) to head (013ca85).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #44      +/-   ##
==========================================
- Coverage   90.17%   89.87%   -0.30%     
==========================================
  Files         430      375      -55     
  Lines        7773     6951     -822     
  Branches     2498     2255     -243     
==========================================
- Hits         7009     6247     -762     
+ Misses        754      694      -60     
  Partials       10       10              
Flag Coverage Δ
main ?
pull-request 89.87% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dreamwasp
dreamwasp marked this pull request as ready for review October 26, 2026 12:06
@dreamwasp
dreamwasp requested a review from a team as a code owner October 26, 2026 12:06

@LinKCoding LinKCoding left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested against this:

mkdir -p /tmp/gamut-tc && cd /tmp/gamut-tc && npm init -y >/dev/null \
&& npm install typescript https://pkg.pr.new/Codecademy/skillsoft-gamut/@skillsoft/gamut@44.tgz react react-dom @emotion/react @emotion/styled @emotion/cache stylis \
&& printf "import * as styles from '@skillsoft/gamut-styles';\nexport default styles;\n" > check.ts \
&& npx tsc --noEmit --skipLibCheck false --moduleResolution bundler --module esnext --target es2020 --jsx react check.ts 2>&1 | tee /tmp/tsc.out | tail -n 20; echo "--- csstype errors ---"; grep -i csstype /tmp/tsc.out || echo "none"

and looks good!

@dreamwasp
dreamwasp merged commit f5e361f into main Oct 28, 2026
14 checks passed
@dreamwasp
dreamwasp deleted the cass-gmt-1790-deps branch October 28, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants