Skip to content

Commit 5280446

Browse files
committed
Replace lodash import with lodash.camelcase
- For some reason `tsup` was inlining `lodash` which increased the bundle size by a significant amount.
1 parent 822e804 commit 5280446

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

packages/rtk-query-codegen-openapi/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@reduxjs/toolkit": "^1.6.0",
5454
"@types/commander": "^2.12.2",
5555
"@types/glob-to-regexp": "^0.4.0",
56-
"@types/lodash": "^4.14.165",
56+
"@types/lodash.camelcase": "^4.3.9",
5757
"@types/node": "^20.11.10",
5858
"@types/semver": "^7.3.9",
5959
"chalk": "^4.1.0",
@@ -75,6 +75,7 @@
7575
"dependencies": {
7676
"@apidevtools/swagger-parser": "^10.0.2",
7777
"commander": "^6.2.0",
78+
"lodash.camelcase": "^4.3.0",
7879
"oazapfts": "^6.1.0",
7980
"prettier": "^3.2.5",
8081
"semver": "^7.3.5",

packages/rtk-query-codegen-openapi/src/generate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { camelCase } from 'lodash';
1+
import camelCase from 'lodash.camelcase';
22
import path from 'node:path';
33
import ApiGenerator, {
44
getOperationName as _getOperationName,

yarn.lock

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7919,7 +7919,7 @@ __metadata:
79197919
"@reduxjs/toolkit": "npm:^1.6.0"
79207920
"@types/commander": "npm:^2.12.2"
79217921
"@types/glob-to-regexp": "npm:^0.4.0"
7922-
"@types/lodash": "npm:^4.14.165"
7922+
"@types/lodash.camelcase": "npm:^4.3.9"
79237923
"@types/node": "npm:^20.11.10"
79247924
"@types/semver": "npm:^7.3.9"
79257925
chalk: "npm:^4.1.0"
@@ -7928,6 +7928,7 @@ __metadata:
79287928
esbuild: "npm:^0.21.5"
79297929
esbuild-runner: "npm:^2.2.1"
79307930
husky: "npm:^4.3.6"
7931+
lodash.camelcase: "npm:^4.3.0"
79317932
msw: "npm:^2.1.5"
79327933
node-fetch: "npm:^3.3.2"
79337934
oazapfts: "npm:^6.1.0"
@@ -8981,6 +8982,15 @@ __metadata:
89818982
languageName: node
89828983
linkType: hard
89838984

8985+
"@types/lodash.camelcase@npm:^4.3.9":
8986+
version: 4.3.9
8987+
resolution: "@types/lodash.camelcase@npm:4.3.9"
8988+
dependencies:
8989+
"@types/lodash": "npm:*"
8990+
checksum: 10/f54132d38ffa72b25bce2111e4d28f339599f6d4fcfc1248a89d1d96445512d7a431f0b0e74f6e6c8d6bc09fe53cf94d9426e188d8feacb3ffe04cd9c3a602e7
8991+
languageName: node
8992+
linkType: hard
8993+
89848994
"@types/lodash.mergewith@npm:4.6.6":
89858995
version: 4.6.6
89868996
resolution: "@types/lodash.mergewith@npm:4.6.6"
@@ -8990,7 +9000,7 @@ __metadata:
89909000
languageName: node
89919001
linkType: hard
89929002

8993-
"@types/lodash@npm:*, @types/lodash@npm:^4.14.165":
9003+
"@types/lodash@npm:*":
89949004
version: 4.14.176
89959005
resolution: "@types/lodash@npm:4.14.176"
89969006
checksum: 10/08f022235585b4d182a06824fb093e65aeadc1dbca55f6db5055a6aa5c181f0ff813f4c8c2e1459f51b7457d9477a3e02ac6430a58389548a95bb79ac296a437

0 commit comments

Comments
 (0)