Skip to content

Commit 70a309f

Browse files
authored
chore(deps): Bump @sveltejs/kit devDependency to 2.49.5 (#18848)
Bumps our dev dependency sveltekit version to the latest version in light of GHSA-j2f3-wq62-6q46. To be clear, this package is only used a dev dependency, so it wasn't shipped in our SvelteKit SDK NPM package. Closes #18849 (added automatically)
1 parent a3276e4 commit 70a309f

File tree

5 files changed

+63
-23
lines changed

5 files changed

+63
-23
lines changed

packages/sveltekit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
},
6060
"devDependencies": {
6161
"@babel/types": "^7.26.3",
62-
"@sveltejs/kit": "^2.0.2",
62+
"@sveltejs/kit": "^2.49.5",
6363
"@sveltejs/vite-plugin-svelte": "^3.0.0",
6464
"svelte": "^4.2.8",
6565
"vite": "^5.4.11"

packages/sveltekit/src/client/browserTracingIntegration.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ function _instrumentPageload(client: Client): void {
5555
return;
5656
}
5757

58+
// TODO(v11): require svelte 5 or newer to switch to `page` from `$app/state`
59+
// eslint-disable-next-line deprecation/deprecation
5860
page.subscribe(page => {
5961
if (!page) {
6062
return;
@@ -76,6 +78,8 @@ function _instrumentPageload(client: Client): void {
7678
function _instrumentNavigations(client: Client): void {
7779
let routingSpan: Span | undefined;
7880

81+
// TODO(v11): require svelte 5 or newer to switch to `navigating` from `$app/state`
82+
// eslint-disable-next-line deprecation/deprecation
7983
navigating.subscribe(navigation => {
8084
if (!navigation) {
8185
// `navigating` emits a 'null' value when the navigation is completed.

packages/sveltekit/src/vite/svelteConfig.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ export async function loadSvelteConfig(): Promise<BackwardsForwardsCompatibleSve
5959
* directory is specified, the default directory is returned.
6060
*/
6161
export function getHooksFileName(svelteConfig: Config, hookType: 'client' | 'server'): string {
62+
// `files` is deprecated in favour of unchangeable file names. Once it is removed, only the
63+
// fallback will be necessary. We can remove the curstom files path once we drop support
64+
// for that version range (presumably sveltekit 2).
65+
// eslint-disable-next-line deprecation/deprecation
6266
return svelteConfig.kit?.files?.hooks?.[hookType] || `src/hooks.${hookType}`;
6367
}
6468

packages/sveltekit/test/client/browserTracingIntegration.test.ts

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,9 @@ describe('browserTracingIntegration', () => {
117117
});
118118

119119
// We emit an update to the `page` store to simulate the SvelteKit router lifecycle
120+
// TODO(v11): switch to `page` from `$app/state`
120121
// @ts-expect-error - page is a writable but the types say it's just readable
122+
// eslint-disable-next-line deprecation/deprecation
121123
page.set({ route: { id: 'testRoute' } });
122124

123125
// This should update the transaction name with the parameterized route:
@@ -151,7 +153,9 @@ describe('browserTracingIntegration', () => {
151153
integration.afterAllSetup(fakeClient);
152154

153155
// We emit an update to the `page` store to simulate the SvelteKit router lifecycle
156+
// TODO(v11): switch to `page` from `$app/state`
154157
// @ts-expect-error - page is a writable but the types say it's just readable
158+
// eslint-disable-next-line deprecation/deprecation
155159
page.set({ route: { id: 'testRoute/:id' } });
156160

157161
// This should update the transaction name with the parameterized route:
@@ -167,7 +171,9 @@ describe('browserTracingIntegration', () => {
167171
integration.afterAllSetup(fakeClient);
168172

169173
// We emit an update to the `navigating` store to simulate the SvelteKit navigation lifecycle
174+
// TODO(v11): switch to `navigating` from `$app/state`
170175
// @ts-expect-error - page is a writable but the types say it's just readable
176+
// eslint-disable-next-line deprecation/deprecation
171177
navigating.set({
172178
from: { route: { id: '/users' }, url: { pathname: '/users' } },
173179
to: { route: { id: '/users/[id]' }, url: { pathname: '/users/7762' } },
@@ -185,7 +191,9 @@ describe('browserTracingIntegration', () => {
185191
integration.afterAllSetup(fakeClient);
186192

187193
// We emit an update to the `navigating` store to simulate the SvelteKit navigation lifecycle
194+
// TODO(v11): switch to `navigating` from `$app/state`
188195
// @ts-expect-error - page is a writable but the types say it's just readable
196+
// eslint-disable-next-line deprecation/deprecation
189197
navigating.set({
190198
from: { route: { id: '/users' }, url: { pathname: '/users' } },
191199
to: { route: { id: '/users/[id]' }, url: { pathname: '/users/7762' } },
@@ -219,7 +227,9 @@ describe('browserTracingIntegration', () => {
219227
});
220228

221229
// We emit `null` here to simulate the end of the navigation lifecycle
222-
// @ts-expect-error - page is a writable but the types say it's just readable
230+
// TODO(v11): switch to `navigating` from `$app/state`
231+
// @ts-expect-error - navigating is a writable but the types say it's just readable
232+
// eslint-disable-next-line deprecation/deprecation
223233
navigating.set(null);
224234

225235
expect(routingSpanEndSpy).toHaveBeenCalledTimes(1);
@@ -234,7 +244,9 @@ describe('browserTracingIntegration', () => {
234244
integration.afterAllSetup(fakeClient);
235245

236246
// We emit an update to the `navigating` store to simulate the SvelteKit navigation lifecycle
237-
// @ts-expect-error - page is a writable but the types say it's just readable
247+
// TODO(v11): switch to `navigating` from `$app/state`
248+
// @ts-expect-error - navigating is a writable but the types say it's just readable
249+
// eslint-disable-next-line deprecation/deprecation
238250
navigating.set({
239251
from: { route: { id: '/users/[id]' }, url: { pathname: '/users/7762' } },
240252
to: { route: { id: '/users/[id]' }, url: { pathname: '/users/7762' } },
@@ -250,7 +262,9 @@ describe('browserTracingIntegration', () => {
250262
// @ts-expect-error - the fakeClient doesn't satisfy Client but that's fine
251263
integration.afterAllSetup(fakeClient);
252264

253-
// @ts-expect-error - page is a writable but the types say it's just readable
265+
// TODO(v11): switch to `navigating` from `$app/state`
266+
// @ts-expect-error - navigating is a writable but the types say it's just readable
267+
// eslint-disable-next-line deprecation/deprecation
254268
navigating.set({
255269
from: { route: { id: '/users/[id]' }, url: { pathname: '/users/7762' } },
256270
to: { route: { id: '/users/[id]' }, url: { pathname: '/users/223412' } },
@@ -289,7 +303,9 @@ describe('browserTracingIntegration', () => {
289303

290304
// window.location.pathname is "/" in tests
291305

292-
// @ts-expect-error - page is a writable but the types say it's just readable
306+
// TODO(v11): switch to `navigating` from `$app/state`
307+
// @ts-expect-error - navigating is a writable but the types say it's just readable
308+
// eslint-disable-next-line deprecation/deprecation
293309
navigating.set({
294310
to: { route: {}, url: { pathname: '/' } },
295311
});

yarn.lock

Lines changed: 34 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7947,22 +7947,29 @@
79477947
"@supabase/realtime-js" "2.11.2"
79487948
"@supabase/storage-js" "2.7.1"
79497949

7950-
"@sveltejs/kit@^2.0.2":
7951-
version "2.0.2"
7952-
resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-2.0.2.tgz#bd02523fe570ddaf89148bffb1eb2233c458054b"
7953-
integrity sha512-xFpnLxVQ4KgCbj4Cj2zCFUcyfAoO87nn4nf3XcGJ7ZtOwy20tZ91vXWrtyuum8hakJWVwdNYyGXG9aBoIEYpFQ==
7950+
"@sveltejs/acorn-typescript@^1.0.5":
7951+
version "1.0.8"
7952+
resolved "https://registry.yarnpkg.com/@sveltejs/acorn-typescript/-/acorn-typescript-1.0.8.tgz#69c746a7c232094c117c50dedbd1279fc64887b7"
7953+
integrity sha512-esgN+54+q0NjB0Y/4BomT9samII7jGwNy/2a3wNZbT2A2RpmXsXwUt24LvLhx6jUq2gVk4cWEvcRO6MFQbOfNA==
7954+
7955+
"@sveltejs/kit@^2.49.5":
7956+
version "2.49.5"
7957+
resolved "https://registry.yarnpkg.com/@sveltejs/kit/-/kit-2.49.5.tgz#da173805592e3ebd483bb77d45ef424078f0aaff"
7958+
integrity sha512-dCYqelr2RVnWUuxc+Dk/dB/SjV/8JBndp1UovCyCZdIQezd8TRwFLNZctYkzgHxRJtaNvseCSRsuuHPeUgIN/A==
79547959
dependencies:
7960+
"@standard-schema/spec" "^1.0.0"
7961+
"@sveltejs/acorn-typescript" "^1.0.5"
79557962
"@types/cookie" "^0.6.0"
7963+
acorn "^8.14.1"
79567964
cookie "^0.6.0"
7957-
devalue "^4.3.2"
7958-
esm-env "^1.0.0"
7965+
devalue "^5.6.2"
7966+
esm-env "^1.2.2"
79597967
kleur "^4.1.5"
79607968
magic-string "^0.30.5"
7961-
mrmime "^1.0.1"
7969+
mrmime "^2.0.0"
79627970
sade "^1.8.1"
79637971
set-cookie-parser "^2.6.0"
7964-
sirv "^2.0.3"
7965-
tiny-glob "^0.2.9"
7972+
sirv "^3.0.0"
79667973

79677974
"@sveltejs/vite-plugin-svelte-inspector@^2.1.0":
79687975
version "2.1.0"
@@ -14538,10 +14545,10 @@ devalue@^4.3.2:
1453814545
resolved "https://registry.yarnpkg.com/devalue/-/devalue-4.3.3.tgz#e35df3bdc49136837e77986f629b9fa6fef50726"
1453914546
integrity sha512-UH8EL6H2ifcY8TbD2QsxwCC/pr5xSwPvv85LrLXVihmHVC3T3YqTCIwnR5ak0yO1KYqlxrPVOA/JVZJYPy2ATg==
1454014547

14541-
devalue@^5.0.0:
14542-
version "5.3.2"
14543-
resolved "https://registry.yarnpkg.com/devalue/-/devalue-5.3.2.tgz#1d9a00f0d126a2f768589f236da8b67d6988d285"
14544-
integrity sha512-UDsjUbpQn9kvm68slnrs+mfxwFkIflOhkanmyabZ8zOYk8SMEIbJ3TK+88g70hSIeytu4y18f0z/hYHMTrXIWw==
14548+
devalue@^5.0.0, devalue@^5.6.2:
14549+
version "5.6.2"
14550+
resolved "https://registry.yarnpkg.com/devalue/-/devalue-5.6.2.tgz#931e2bb1cc2b299e0f0fb9e4e5be8ebf521a25b8"
14551+
integrity sha512-nPRkjWzzDQlsejL1WVifk5rvcFi/y1onBRxjaFMjZeR9mFpqu2gmAZ9xUB9/IEanEP/vBtGeGganC/GO1fmufg==
1454514552

1454614553
devlop@^1.0.0:
1454714554
version "1.1.0"
@@ -16521,10 +16528,10 @@ [email protected]:
1652116528
strip-ansi "^6.0.1"
1652216529
text-table "^0.2.0"
1652316530

16524-
esm-env@^1.0.0:
16525-
version "1.0.0"
16526-
resolved "https://registry.yarnpkg.com/esm-env/-/esm-env-1.0.0.tgz#b124b40b180711690a4cb9b00d16573391950413"
16527-
integrity sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==
16531+
esm-env@^1.2.2:
16532+
version "1.2.2"
16533+
resolved "https://registry.yarnpkg.com/esm-env/-/esm-env-1.2.2.tgz#263c9455c55861f41618df31b20cb571fc20b75e"
16534+
integrity sha512-Epxrv+Nr/CaL4ZcFGPJIYLWFom+YeV1DqMLHJoEd9SYRxNbaFruBwfEX/kkHUJf55j2+TUbmDcmuilbP1TmXHA==
1652816535

1652916536
esm@^3.2.25, esm@^3.2.4:
1653016537
version "3.2.25"
@@ -22857,7 +22864,7 @@ mri@^1.1.0, mri@^1.2.0:
2285722864
resolved "https://registry.yarnpkg.com/mri/-/mri-1.2.0.tgz#6721480fec2a11a4889861115a48b6cbe7cc8f0b"
2285822865
integrity sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==
2285922866

22860-
mrmime@^1.0.0, mrmime@^1.0.1:
22867+
mrmime@^1.0.0:
2286122868
version "1.0.1"
2286222869
resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27"
2286322870
integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==
@@ -28120,6 +28127,15 @@ sirv@^2.0.3, sirv@^2.0.4:
2812028127
mrmime "^2.0.0"
2812128128
totalist "^3.0.0"
2812228129

28130+
sirv@^3.0.0:
28131+
version "3.0.2"
28132+
resolved "https://registry.yarnpkg.com/sirv/-/sirv-3.0.2.tgz#f775fccf10e22a40832684848d636346f41cd970"
28133+
integrity sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==
28134+
dependencies:
28135+
"@polka/url" "^1.0.0-next.24"
28136+
mrmime "^2.0.0"
28137+
totalist "^3.0.0"
28138+
2812328139
sisteransi@^1.0.5:
2812428140
version "1.0.5"
2812528141
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"

0 commit comments

Comments
 (0)