Skip to content

Commit 3dc61a5

Browse files
authored
ref(replay): Inline lodash dependency into build (#6483)
1 parent 65245f4 commit 3dc61a5

File tree

3 files changed

+12
-17
lines changed

3 files changed

+12
-17
lines changed

packages/replay/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,18 @@
4747
"devDependencies": {
4848
"@babel/core": "^7.17.5",
4949
"@sentry/browser": "7.24.2",
50-
"@types/lodash.debounce": "^4.0.7",
51-
"@types/lodash.throttle": "^4.1.7",
50+
"@types/lodash.debounce": "4.0.7",
5251
"@types/pako": "^2.0.0",
5352
"jsdom-worker": "^0.2.1",
53+
"lodash.debounce": "4.0.8",
5454
"pako": "^2.0.4",
5555
"rrweb": "1.1.3",
5656
"tslib": "^1.9.3"
5757
},
5858
"dependencies": {
5959
"@sentry/core": "7.24.2",
6060
"@sentry/types": "7.24.2",
61-
"@sentry/utils": "7.24.2",
62-
"lodash.debounce": "^4.0.8"
61+
"@sentry/utils": "7.24.2"
6362
},
6463
"peerDependencies": {
6564
"@sentry/browser": ">=7.24.0"

packages/replay/rollup.npm.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import path from 'path';
22

3+
import commonjs from '@rollup/plugin-commonjs';
34
import replace from '@rollup/plugin-replace';
45

56
import { makeBaseNPMConfig, makeNPMConfigVariants } from '../../rollup/index';
@@ -18,6 +19,8 @@ export default makeNPMConfigVariants(
1819
__SENTRY_REPLAY_VERSION__: JSON.stringify(pkg.version),
1920
},
2021
}),
22+
// lodash.debounce is a CJS module, so we need to convert it to ESM first
23+
commonjs(),
2124
],
2225
output: {
2326
// set exports to 'named' or 'auto' so that rollup doesn't warn about

yarn.lock

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4284,20 +4284,13 @@
42844284
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
42854285
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
42864286

4287-
"@types/lodash.debounce@^4.0.7":
4287+
42884288
version "4.0.7"
42894289
resolved "https://registry.yarnpkg.com/@types/lodash.debounce/-/lodash.debounce-4.0.7.tgz#0285879defb7cdb156ae633cecd62d5680eded9f"
42904290
integrity sha512-X1T4wMZ+gT000M2/91SYj0d/7JfeNZ9PeeOldSNoE/lunLeQXKvkmIumI29IaKMotU/ln/McOIvgzZcQ/3TrSA==
42914291
dependencies:
42924292
"@types/lodash" "*"
42934293

4294-
"@types/lodash.throttle@^4.1.7":
4295-
version "4.1.7"
4296-
resolved "https://registry.yarnpkg.com/@types/lodash.throttle/-/lodash.throttle-4.1.7.tgz#4ef379eb4f778068022310ef166625f420b6ba58"
4297-
integrity sha512-znwGDpjCHQ4FpLLx19w4OXDqq8+OvREa05H89obtSyXyOFKL3dDjCslsmfBz0T2FU8dmf5Wx1QvogbINiGIu9g==
4298-
dependencies:
4299-
"@types/lodash" "*"
4300-
43014294
"@types/lodash@*":
43024295
version "4.14.189"
43034296
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.189.tgz#975ff8c38da5ae58b751127b19ad5e44b5b7f6d2"
@@ -16246,18 +16239,18 @@ lodash.clonedeep@^4.4.1, lodash.clonedeep@^4.5.0:
1624616239
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
1624716240
integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=
1624816241

16242+
[email protected], lodash.debounce@^4.0.8:
16243+
version "4.0.8"
16244+
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
16245+
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
16246+
1624916247
lodash.debounce@^3.1.1:
1625016248
version "3.1.1"
1625116249
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-3.1.1.tgz#812211c378a94cc29d5aa4e3346cf0bfce3a7df5"
1625216250
integrity sha1-gSIRw3ipTMKdWqTjNGzwv846ffU=
1625316251
dependencies:
1625416252
lodash._getnative "^3.0.0"
1625516253

16256-
lodash.debounce@^4.0.8:
16257-
version "4.0.8"
16258-
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
16259-
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
16260-
1626116254
lodash.defaultsdeep@^4.6.0, lodash.defaultsdeep@^4.6.1:
1626216255
version "4.6.1"
1626316256
resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6"

0 commit comments

Comments
 (0)