Skip to content

Commit 861ed3f

Browse files
authored
fix(google-cloud-serverless): Move @types/express to optional peerDeps (#18452)
(closes #18438) (closes [JS-1273](https://linear.app/getsentry/issue/JS-1273/bump-typesexpress-to-v5-for-sentrygoogle-cloud-serverless)) This moves the express types as optional peerDependencies. Since we are only relying on `Request` and `Response` and nothing more, this should be a save update. In order to also test against this - I updated the the local types to v5. The pattern of having the types as optional peerDependencies is already given for our Cloudflare SDK: https://github.com/getsentry/sentry-javascript/blob/2ef3938fecf872b3d09006538484e5de97123ac5/packages/cloudflare/package.json#L55-L62
1 parent c73437f commit 861ed3f

File tree

2 files changed

+49
-14
lines changed

2 files changed

+49
-14
lines changed

packages/google-cloud-serverless/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,23 @@
4949
},
5050
"dependencies": {
5151
"@sentry/core": "10.30.0",
52-
"@sentry/node": "10.30.0",
53-
"@types/express": "^4.17.14"
52+
"@sentry/node": "10.30.0"
5453
},
5554
"devDependencies": {
5655
"@google-cloud/bigquery": "^5.3.0",
5756
"@google-cloud/common": "^3.4.1",
57+
"@types/express": "^5.0.6",
5858
"@types/node": "^18.19.1",
5959
"nock": "^13.5.5"
6060
},
61+
"peerDependencies": {
62+
"@types/express": "^4.17.14 || ^5.x"
63+
},
64+
"peerDependenciesMeta": {
65+
"@types/express": {
66+
"optional": true
67+
}
68+
},
6169
"scripts": {
6270
"build": "run-p build:transpile build:types",
6371
"build:dev": "yarn build",

yarn.lock

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8597,10 +8597,10 @@
85978597
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40"
85988598
integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==
85998599

8600-
"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.18", "@types/express-serve-static-core@^4.17.33":
8601-
version "4.17.43"
8602-
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz#10d8444be560cb789c4735aea5eac6e5af45df54"
8603-
integrity sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==
8600+
"@types/express-serve-static-core@*", "@types/express-serve-static-core@^5.0.0":
8601+
version "5.1.0"
8602+
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-5.1.0.tgz#74f47555b3d804b54cb7030e6f9aa0c7485cfc5b"
8603+
integrity sha512-jnHMsrd0Mwa9Cf4IdOzbz543y4XJepXrbia2T4b6+spXC2We3t1y6K44D3mR8XMFSXMCf3/l7rCgddfx7UNVBA==
86048604
dependencies:
86058605
"@types/node" "*"
86068606
"@types/qs" "*"
@@ -8616,15 +8616,24 @@
86168616
"@types/qs" "*"
86178617
"@types/range-parser" "*"
86188618

8619-
"@types/express@*", "@types/express@^4.17.13", "@types/express@^4.17.14", "@types/express@^4.17.2":
8620-
version "4.17.21"
8621-
resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.21.tgz#c26d4a151e60efe0084b23dc3369ebc631ed192d"
8622-
integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==
8619+
"@types/express-serve-static-core@^4.17.18", "@types/express-serve-static-core@^4.17.33":
8620+
version "4.17.43"
8621+
resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz#10d8444be560cb789c4735aea5eac6e5af45df54"
8622+
integrity sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==
86238623
dependencies:
8624-
"@types/body-parser" "*"
8625-
"@types/express-serve-static-core" "^4.17.33"
8624+
"@types/node" "*"
86268625
"@types/qs" "*"
8627-
"@types/serve-static" "*"
8626+
"@types/range-parser" "*"
8627+
"@types/send" "*"
8628+
8629+
"@types/express@*", "@types/express@^5.0.6":
8630+
version "5.0.6"
8631+
resolved "https://registry.yarnpkg.com/@types/express/-/express-5.0.6.tgz#2d724b2c990dcb8c8444063f3580a903f6d500cc"
8632+
integrity sha512-sKYVuV7Sv9fbPIt/442koC7+IIwK5olP1KWeD88e/idgoJqDm3JV/YUiPwkoKK92ylff2MGxSz1CSjsXelx0YA==
8633+
dependencies:
8634+
"@types/body-parser" "*"
8635+
"@types/express-serve-static-core" "^5.0.0"
8636+
"@types/serve-static" "^2"
86288637

86298638
"@types/express@4.17.14":
86308639
version "4.17.14"
@@ -8636,6 +8645,16 @@
86368645
"@types/qs" "*"
86378646
"@types/serve-static" "*"
86388647

8648+
"@types/express@^4.17.13", "@types/express@^4.17.14", "@types/express@^4.17.2":
8649+
version "4.17.21"
8650+
resolved "https://registry.yarnpkg.com/@types/express/-/express-4.17.21.tgz#c26d4a151e60efe0084b23dc3369ebc631ed192d"
8651+
integrity sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==
8652+
dependencies:
8653+
"@types/body-parser" "*"
8654+
"@types/express-serve-static-core" "^4.17.33"
8655+
"@types/qs" "*"
8656+
"@types/serve-static" "*"
8657+
86398658
"@types/fs-extra@^5.0.5":
86408659
version "5.1.0"
86418660
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.1.0.tgz#2a325ef97901504a3828718c390d34b8426a10a1"
@@ -9054,7 +9073,15 @@
90549073
dependencies:
90559074
"@types/express" "*"
90569075

9057-
"@types/serve-static@*", "@types/serve-static@^1.13.10":
9076+
"@types/serve-static@*", "@types/serve-static@^2":
9077+
version "2.2.0"
9078+
resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-2.2.0.tgz#d4a447503ead0d1671132d1ab6bd58b805d8de6a"
9079+
integrity sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ==
9080+
dependencies:
9081+
"@types/http-errors" "*"
9082+
"@types/node" "*"
9083+
9084+
"@types/serve-static@^1.13.10":
90589085
version "1.15.5"
90599086
resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.15.5.tgz#15e67500ec40789a1e8c9defc2d32a896f05b033"
90609087
integrity sha512-PDRk21MnK70hja/YF8AHfC7yIsiQHn1rcXx7ijCFBX/k+XQJhQT/gw3xekXKJvx+5SXaMMS8oqQy09Mzvz2TuQ==

0 commit comments

Comments
 (0)