Skip to content

Commit

Permalink
Register direct dependencies in package.json
Browse files Browse the repository at this point in the history
Without this change, the dist files include the entire lodash source and some Radix UI utilities.
Also removes a dependency from @strapi/ui-primitives that wasn't used.
  • Loading branch information
jorrit committed Feb 3, 2025
1 parent 8b00015 commit d6997ec
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/serious-mangos-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@strapi/design-system': patch
'@strapi/ui-primitives': patch
---

Fix inflated package size because direct dependencies not listed in package.json
4 changes: 4 additions & 0 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@radix-ui/react-dialog": "1.0.5",
"@radix-ui/react-dismissable-layer": "1.0.5",
"@radix-ui/react-dropdown-menu": "2.0.6",
"@radix-ui/react-focus-guards": "1.0.1",
"@radix-ui/react-focus-scope": "1.0.4",
"@radix-ui/react-popover": "1.0.7",
"@radix-ui/react-progress": "1.0.3",
Expand All @@ -30,13 +31,16 @@
"@radix-ui/react-switch": "1.0.3",
"@radix-ui/react-tabs": "1.0.4",
"@radix-ui/react-tooltip": "1.0.7",
"@radix-ui/react-use-callback-ref": "1.0.1",
"@strapi/ui-primitives": "2.0.0-rc.14",
"@uiw/react-codemirror": "4.22.2",
"lodash": "4.17.21",
"react-remove-scroll": "2.5.10"
},
"devDependencies": {
"@strapi/icons": "2.0.0-rc.14",
"@strapi/pack-up": "5.0.0",
"@types/lodash": "^4.17.15",
"jest": "29.7.0",
"react": "18.3.1",
"react-dom": "18.3.1",
Expand Down
1 change: 0 additions & 1 deletion packages/primitives/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"@radix-ui/react-portal": "1.0.4",
"@radix-ui/react-primitive": "1.0.3",
"@radix-ui/react-slot": "1.0.2",
"@radix-ui/react-use-callback-ref": "1.0.1",
"@radix-ui/react-use-controllable-state": "1.0.1",
"@radix-ui/react-use-layout-effect": "1.0.1",
"@radix-ui/react-use-previous": "1.0.1",
Expand Down
14 changes: 12 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4251,6 +4251,7 @@ __metadata:
"@radix-ui/react-dialog": 1.0.5
"@radix-ui/react-dismissable-layer": 1.0.5
"@radix-ui/react-dropdown-menu": 2.0.6
"@radix-ui/react-focus-guards": 1.0.1
"@radix-ui/react-focus-scope": 1.0.4
"@radix-ui/react-popover": 1.0.7
"@radix-ui/react-progress": 1.0.3
Expand All @@ -4259,11 +4260,14 @@ __metadata:
"@radix-ui/react-switch": 1.0.3
"@radix-ui/react-tabs": 1.0.4
"@radix-ui/react-tooltip": 1.0.7
"@radix-ui/react-use-callback-ref": 1.0.1
"@strapi/icons": 2.0.0-rc.14
"@strapi/pack-up": 5.0.0
"@strapi/ui-primitives": 2.0.0-rc.14
"@types/lodash": ^4.17.15
"@uiw/react-codemirror": 4.22.2
jest: 29.7.0
lodash: 4.17.21
react: 18.3.1
react-dom: 18.3.1
react-remove-scroll: 2.5.10
Expand Down Expand Up @@ -4375,7 +4379,6 @@ __metadata:
"@radix-ui/react-portal": 1.0.4
"@radix-ui/react-primitive": 1.0.3
"@radix-ui/react-slot": 1.0.2
"@radix-ui/react-use-callback-ref": 1.0.1
"@radix-ui/react-use-controllable-state": 1.0.1
"@radix-ui/react-use-layout-effect": 1.0.1
"@radix-ui/react-use-previous": 1.0.1
Expand Down Expand Up @@ -5271,6 +5274,13 @@ __metadata:
languageName: node
linkType: hard

"@types/lodash@npm:^4.17.15":
version: 4.17.15
resolution: "@types/lodash@npm:4.17.15"
checksum: 5037564154411f4ac0b187b914031c150520a7ca037dea007f774b7123c97c0da55b2e41ae81dc1bc80ff09e8d6a236455ea676d5062af12c592b8e81baec7bf
languageName: node
linkType: hard

"@types/mdast@npm:^3.0.0":
version: 3.0.15
resolution: "@types/mdast@npm:3.0.15"
Expand Down Expand Up @@ -12415,7 +12425,7 @@ __metadata:
languageName: node
linkType: hard

"lodash@npm:^4.17.20, lodash@npm:^4.17.21":
"lodash@npm:4.17.21, lodash@npm:^4.17.20, lodash@npm:^4.17.21":
version: 4.17.21
resolution: "lodash@npm:4.17.21"
checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7
Expand Down

0 comments on commit d6997ec

Please sign in to comment.