From 88aa9fcb9f110b3d49d85c308829180e51a03715 Mon Sep 17 00:00:00 2001 From: dreamwasp Date: Tue, 20 Oct 2026 09:56:08 -0400 Subject: [PATCH 1/2] build(deps): make @skillsoft packages easier to install 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 --- .changeset/consumer-friendly-deps.md | 17 +++++++++ .changeset/gamut-styles-csstype.md | 5 +++ packages/gamut-icons/package.json | 5 +-- packages/gamut-illustrations/package.json | 2 +- packages/gamut-patterns/package.json | 4 +- packages/gamut-styles/package.json | 5 ++- packages/gamut-tests/package.json | 4 +- packages/gamut/package.json | 10 ++--- packages/variance/package.json | 7 +++- yarn.lock | 45 ++++++++++++----------- 10 files changed, 67 insertions(+), 37 deletions(-) create mode 100644 .changeset/consumer-friendly-deps.md create mode 100644 .changeset/gamut-styles-csstype.md diff --git a/.changeset/consumer-friendly-deps.md b/.changeset/consumer-friendly-deps.md new file mode 100644 index 0000000000..3b653e252e --- /dev/null +++ b/.changeset/consumer-friendly-deps.md @@ -0,0 +1,17 @@ +--- +'@skillsoft/gamut': patch +'@skillsoft/gamut-styles': patch +'@skillsoft/gamut-icons': patch +'@skillsoft/gamut-illustrations': patch +'@skillsoft/gamut-patterns': patch +'@skillsoft/gamut-tests': patch +'@skillsoft/variance': patch +--- + +Fewer packages to install by hand. + +- `@skillsoft/gamut-styles`: `lodash` is now a regular dependency instead of a peer dependency. +- `@skillsoft/gamut-icons`: dropped an unused `lodash` peer dependency. +- `@skillsoft/variance`: the `typescript` peer dependency is now optional. +- `@skillsoft/*` packages depend on each other with `^` ranges instead of exact versions, so installs share one copy of `gamut-styles` and `variance`. +- `@skillsoft/gamut-tests`: `component-test-setup` is now `^0.3.1` instead of `*`. diff --git a/.changeset/gamut-styles-csstype.md b/.changeset/gamut-styles-csstype.md new file mode 100644 index 0000000000..04e9fc169c --- /dev/null +++ b/.changeset/gamut-styles-csstype.md @@ -0,0 +1,5 @@ +--- +'@skillsoft/gamut-styles': patch +--- + +Add `csstype` as a dependency. The published types import from it, and it only resolved before because `@skillsoft/variance` depends on it. diff --git a/packages/gamut-icons/package.json b/packages/gamut-icons/package.json index 7b1e72c985..19adbe5907 100644 --- a/packages/gamut-icons/package.json +++ b/packages/gamut-icons/package.json @@ -4,8 +4,8 @@ "version": "0.0.1", "author": "Skillsoft Engineering ", "dependencies": { - "@skillsoft/gamut-styles": "0.0.1", - "@skillsoft/variance": "0.0.1" + "@skillsoft/gamut-styles": "^0.0.1", + "@skillsoft/variance": "^0.0.1" }, "exports": { "./package.json": "./package.json", @@ -24,7 +24,6 @@ "peerDependencies": { "@emotion/react": "^11.4.0", "@emotion/styled": "^11.3.0", - "lodash": "^4.17.23", "react": "^17.0.2 || ^18.3.0 || ^19.0.0" }, "publishConfig": { diff --git a/packages/gamut-illustrations/package.json b/packages/gamut-illustrations/package.json index b2e3f118e0..6dc03baed4 100644 --- a/packages/gamut-illustrations/package.json +++ b/packages/gamut-illustrations/package.json @@ -5,7 +5,7 @@ "author": "Skillsoft Engineering ", "bugs": "https://github.com/Codecademy/skillsoft-gamut/issues", "dependencies": { - "@skillsoft/gamut-styles": "0.0.1", + "@skillsoft/gamut-styles": "^0.0.1", "classnames": "^2.2.5" }, "exports": { diff --git a/packages/gamut-patterns/package.json b/packages/gamut-patterns/package.json index 5bcd8a2d6e..62c4677fd8 100644 --- a/packages/gamut-patterns/package.json +++ b/packages/gamut-patterns/package.json @@ -5,8 +5,8 @@ "author": "Skillsoft Engineering ", "bugs": "https://github.com/Codecademy/skillsoft-gamut/issues", "dependencies": { - "@skillsoft/gamut-styles": "0.0.1", - "@skillsoft/variance": "0.0.1", + "@skillsoft/gamut-styles": "^0.0.1", + "@skillsoft/variance": "^0.0.1", "classnames": "^2.2.5" }, "exports": { diff --git a/packages/gamut-styles/package.json b/packages/gamut-styles/package.json index e43eceef59..c1540e8e88 100644 --- a/packages/gamut-styles/package.json +++ b/packages/gamut-styles/package.json @@ -5,9 +5,11 @@ "author": "Skillsoft Engineering ", "dependencies": { "@emotion/is-prop-valid": "^1.1.0", - "@skillsoft/variance": "0.0.1", + "@skillsoft/variance": "^0.0.1", + "csstype": "^3.0.7", "framer-motion": "^12.0.0", "get-nonce": "^1.0.0", + "lodash": "^4.17.23", "polished": "^4.1.2" }, "exports": { @@ -29,7 +31,6 @@ "@emotion/cache": "^11.4.0", "@emotion/react": "^11.4.0", "@emotion/styled": "^11.3.0", - "lodash": "^4.17.23", "react": "^17.0.2 || ^18.3.0 || ^19.0.0", "stylis": "^4.0.7" }, diff --git a/packages/gamut-tests/package.json b/packages/gamut-tests/package.json index d8fbf72a64..62e2bb15fb 100644 --- a/packages/gamut-tests/package.json +++ b/packages/gamut-tests/package.json @@ -4,8 +4,8 @@ "version": "0.0.1", "author": "Skillsoft Engineering ", "dependencies": { - "@skillsoft/gamut-styles": "0.0.1", - "component-test-setup": "*", + "@skillsoft/gamut-styles": "^0.0.1", + "component-test-setup": "^0.3.1", "lodash": "^4.17.23" }, "exports": { diff --git a/packages/gamut/package.json b/packages/gamut/package.json index 4ac900d4cf..89284692fe 100644 --- a/packages/gamut/package.json +++ b/packages/gamut/package.json @@ -7,11 +7,11 @@ "dependencies": { "@formatjs/intl-locale": "5.3.1", "@react-aria/interactions": "3.25.0", - "@skillsoft/gamut-icons": "0.0.1", - "@skillsoft/gamut-illustrations": "0.0.1", - "@skillsoft/gamut-patterns": "0.0.1", - "@skillsoft/gamut-styles": "0.0.1", - "@skillsoft/variance": "0.0.1", + "@skillsoft/gamut-icons": "^0.0.1", + "@skillsoft/gamut-illustrations": "^0.0.1", + "@skillsoft/gamut-patterns": "^0.0.1", + "@skillsoft/gamut-styles": "^0.0.1", + "@skillsoft/variance": "^0.0.1", "@types/marked": "^4.0.8", "classnames": "^2.2.5", "framer-motion": "^12.0.0", diff --git a/packages/variance/package.json b/packages/variance/package.json index 9625a1bcc1..a750678e6a 100644 --- a/packages/variance/package.json +++ b/packages/variance/package.json @@ -40,5 +40,10 @@ "build": "nx build variance" }, "sideEffects": false, - "types": "dist/index.d.ts" + "types": "dist/index.d.ts", + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } } diff --git a/yarn.lock b/yarn.lock index a9ef908690..ad0111dd01 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7653,25 +7653,24 @@ __metadata: languageName: unknown linkType: soft -"@skillsoft/gamut-icons@npm:0.0.1, @skillsoft/gamut-icons@workspace:*, @skillsoft/gamut-icons@workspace:packages/gamut-icons": +"@skillsoft/gamut-icons@npm:^0.0.1, @skillsoft/gamut-icons@workspace:*, @skillsoft/gamut-icons@workspace:packages/gamut-icons": version: 0.0.0-use.local resolution: "@skillsoft/gamut-icons@workspace:packages/gamut-icons" dependencies: - "@skillsoft/gamut-styles": "npm:0.0.1" - "@skillsoft/variance": "npm:0.0.1" + "@skillsoft/gamut-styles": "npm:^0.0.1" + "@skillsoft/variance": "npm:^0.0.1" peerDependencies: "@emotion/react": ^11.4.0 "@emotion/styled": ^11.3.0 - lodash: ^4.17.23 react: ^17.0.2 || ^18.3.0 || ^19.0.0 languageName: unknown linkType: soft -"@skillsoft/gamut-illustrations@npm:0.0.1, @skillsoft/gamut-illustrations@workspace:packages/gamut-illustrations": +"@skillsoft/gamut-illustrations@npm:^0.0.1, @skillsoft/gamut-illustrations@workspace:packages/gamut-illustrations": version: 0.0.0-use.local resolution: "@skillsoft/gamut-illustrations@workspace:packages/gamut-illustrations" dependencies: - "@skillsoft/gamut-styles": "npm:0.0.1" + "@skillsoft/gamut-styles": "npm:^0.0.1" classnames: "npm:^2.2.5" peerDependencies: "@emotion/react": ^11.4.0 @@ -7681,12 +7680,12 @@ __metadata: languageName: unknown linkType: soft -"@skillsoft/gamut-patterns@npm:0.0.1, @skillsoft/gamut-patterns@workspace:packages/gamut-patterns": +"@skillsoft/gamut-patterns@npm:^0.0.1, @skillsoft/gamut-patterns@workspace:packages/gamut-patterns": version: 0.0.0-use.local resolution: "@skillsoft/gamut-patterns@workspace:packages/gamut-patterns" dependencies: - "@skillsoft/gamut-styles": "npm:0.0.1" - "@skillsoft/variance": "npm:0.0.1" + "@skillsoft/gamut-styles": "npm:^0.0.1" + "@skillsoft/variance": "npm:^0.0.1" classnames: "npm:^2.2.5" peerDependencies: "@emotion/react": ^11.4.0 @@ -7696,20 +7695,21 @@ __metadata: languageName: unknown linkType: soft -"@skillsoft/gamut-styles@npm:0.0.1, @skillsoft/gamut-styles@workspace:*, @skillsoft/gamut-styles@workspace:packages/gamut-styles": +"@skillsoft/gamut-styles@npm:^0.0.1, @skillsoft/gamut-styles@workspace:*, @skillsoft/gamut-styles@workspace:packages/gamut-styles": version: 0.0.0-use.local resolution: "@skillsoft/gamut-styles@workspace:packages/gamut-styles" dependencies: "@emotion/is-prop-valid": "npm:^1.1.0" - "@skillsoft/variance": "npm:0.0.1" + "@skillsoft/variance": "npm:^0.0.1" + csstype: "npm:^3.0.7" framer-motion: "npm:^12.0.0" get-nonce: "npm:^1.0.0" + lodash: "npm:^4.17.23" polished: "npm:^4.1.2" peerDependencies: "@emotion/cache": ^11.4.0 "@emotion/react": ^11.4.0 "@emotion/styled": ^11.3.0 - lodash: ^4.17.23 react: ^17.0.2 || ^18.3.0 || ^19.0.0 stylis: ^4.0.7 languageName: unknown @@ -7719,8 +7719,8 @@ __metadata: version: 0.0.0-use.local resolution: "@skillsoft/gamut-tests@workspace:packages/gamut-tests" dependencies: - "@skillsoft/gamut-styles": "npm:0.0.1" - component-test-setup: "npm:*" + "@skillsoft/gamut-styles": "npm:^0.0.1" + component-test-setup: "npm:^0.3.1" lodash: "npm:^4.17.23" peerDependencies: react: ^17.0.2 || ^18.3.0 || ^19.0.0 @@ -7733,11 +7733,11 @@ __metadata: dependencies: "@formatjs/intl-locale": "npm:5.3.1" "@react-aria/interactions": "npm:3.25.0" - "@skillsoft/gamut-icons": "npm:0.0.1" - "@skillsoft/gamut-illustrations": "npm:0.0.1" - "@skillsoft/gamut-patterns": "npm:0.0.1" - "@skillsoft/gamut-styles": "npm:0.0.1" - "@skillsoft/variance": "npm:0.0.1" + "@skillsoft/gamut-icons": "npm:^0.0.1" + "@skillsoft/gamut-illustrations": "npm:^0.0.1" + "@skillsoft/gamut-patterns": "npm:^0.0.1" + "@skillsoft/gamut-styles": "npm:^0.0.1" + "@skillsoft/variance": "npm:^0.0.1" "@types/marked": "npm:^4.0.8" "@vidstack/react": "npm:~1.12.12" classnames: "npm:^2.2.5" @@ -7785,7 +7785,7 @@ __metadata: languageName: unknown linkType: soft -"@skillsoft/variance@npm:0.0.1, @skillsoft/variance@workspace:packages/variance": +"@skillsoft/variance@npm:^0.0.1, @skillsoft/variance@workspace:packages/variance": version: 0.0.0-use.local resolution: "@skillsoft/variance@workspace:packages/variance" dependencies: @@ -7794,6 +7794,9 @@ __metadata: peerDependencies: "@emotion/react": "*" typescript: ">=4.3.5" + peerDependenciesMeta: + typescript: + optional: true languageName: unknown linkType: soft @@ -11730,7 +11733,7 @@ __metadata: languageName: node linkType: hard -"component-test-setup@npm:*, component-test-setup@npm:^0.3.1": +"component-test-setup@npm:^0.3.1": version: 0.3.3 resolution: "component-test-setup@npm:0.3.3" checksum: 10c0/f85ee9a5bf5f65b8440cd6fe03a626e1222b1bba2f29798a4de1c1d7fdbf87397a5ad11e19b0ed20030033c7bede66d2ae6c5bfba426e00b9383adbe0dd0a584 From 7e064471b0b7d6ee8bfb538de8fd0668cad9d0b6 Mon Sep 17 00:00:00 2001 From: dreamwasp Date: Tue, 20 Oct 2026 13:07:58 -0400 Subject: [PATCH 2/2] chore(changeset): fold the csstype note into consumer-friendly-deps Co-Authored-By: Claude Opus 5.5 --- .changeset/consumer-friendly-deps.md | 4 +++- .changeset/gamut-styles-csstype.md | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) delete mode 100644 .changeset/gamut-styles-csstype.md diff --git a/.changeset/consumer-friendly-deps.md b/.changeset/consumer-friendly-deps.md index 3b653e252e..e0dd42bfce 100644 --- a/.changeset/consumer-friendly-deps.md +++ b/.changeset/consumer-friendly-deps.md @@ -10,7 +10,9 @@ Fewer packages to install by hand. -- `@skillsoft/gamut-styles`: `lodash` is now a regular dependency instead of a peer dependency. +- `@skillsoft/gamut-styles`: + - `lodash` is now a regular dependency instead of a peer dependency. + - adds `csstype` as a dependency. The published types import from it, and it only resolved before because `@skillsoft/variance` depends on it. - `@skillsoft/gamut-icons`: dropped an unused `lodash` peer dependency. - `@skillsoft/variance`: the `typescript` peer dependency is now optional. - `@skillsoft/*` packages depend on each other with `^` ranges instead of exact versions, so installs share one copy of `gamut-styles` and `variance`. diff --git a/.changeset/gamut-styles-csstype.md b/.changeset/gamut-styles-csstype.md deleted file mode 100644 index 04e9fc169c..0000000000 --- a/.changeset/gamut-styles-csstype.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@skillsoft/gamut-styles': patch ---- - -Add `csstype` as a dependency. The published types import from it, and it only resolved before because `@skillsoft/variance` depends on it.