From 5835dc43c4d15de6a82df0b5b803a518a238e701 Mon Sep 17 00:00:00 2001 From: Princesseuh <3019731+Princesseuh@users.noreply.github.com> Date: Tue, 27 Feb 2024 12:32:05 +0100 Subject: [PATCH 1/2] fix(svelte): Add TypeScript as a peer dep --- .changeset/gold-baboons-drum.md | 5 +++++ package.json | 7 ------- packages/integrations/svelte/package.json | 5 +++-- pnpm-lock.yaml | 7 ++----- 4 files changed, 10 insertions(+), 14 deletions(-) create mode 100644 .changeset/gold-baboons-drum.md diff --git a/.changeset/gold-baboons-drum.md b/.changeset/gold-baboons-drum.md new file mode 100644 index 000000000000..67bc238a6b70 --- /dev/null +++ b/.changeset/gold-baboons-drum.md @@ -0,0 +1,5 @@ +--- +"@astrojs/svelte": patch +--- + +Adds TypeScript as a required peer dependency as it is required for Svelte's editor tooling to work correctly. diff --git a/package.json b/package.json index e09110d40eb7..885960666799 100644 --- a/package.json +++ b/package.json @@ -81,13 +81,6 @@ } } }, - "svelte2tsx": { - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, "rehype-pretty-code": { "peerDependenciesMeta": { "shiki": { diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index 9cf4aa665676..843208ad24ad 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -43,7 +43,7 @@ }, "dependencies": { "@sveltejs/vite-plugin-svelte": "^3.0.0", - "svelte2tsx": "^0.6.25" + "svelte2tsx": "^0.6.27" }, "devDependencies": { "astro": "workspace:*", @@ -53,7 +53,8 @@ }, "peerDependencies": { "astro": "^4.0.0", - "svelte": "^4.0.0 || ^5.0.0-next.56" + "svelte": "^4.0.0 || ^5.0.0-next.56", + "typescript": "^5.3.3" }, "engines": { "node": ">=18.14.1" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 52c5626af25b..20ca6e1fccc0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,7 +8,7 @@ overrides: organize-imports-cli>ts-morph: ^19.0.0 tsconfig-resolver>type-fest: 3.0.0 -packageExtensionsChecksum: 2d0a8c56e33c7d11bb9ef3c997d67c33 +packageExtensionsChecksum: 43e9b7451c9943c617aef017ec172155 importers: @@ -4804,7 +4804,7 @@ importers: specifier: ^3.0.0 version: 3.0.1(svelte@4.2.8)(vite@5.1.2) svelte2tsx: - specifier: ^0.6.25 + specifier: ^0.6.27 version: 0.6.27(svelte@4.2.8)(typescript@5.2.2) devDependencies: astro: @@ -15678,9 +15678,6 @@ packages: peerDependencies: svelte: ^3.55 || ^4.0.0-next.0 || ^4.0 || ^5.0.0-next.0 typescript: ^4.9.4 || ^5.0.0 - peerDependenciesMeta: - typescript: - optional: true dependencies: dedent-js: 1.0.1 pascal-case: 3.1.2 From 480460f1544a3ac7ea6b81d446798a7dec6e1937 Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Tue, 27 Feb 2024 15:29:02 +0100 Subject: [PATCH 2/2] Update .changeset/gold-baboons-drum.md --- .changeset/gold-baboons-drum.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/gold-baboons-drum.md b/.changeset/gold-baboons-drum.md index 67bc238a6b70..6cb868a5f75a 100644 --- a/.changeset/gold-baboons-drum.md +++ b/.changeset/gold-baboons-drum.md @@ -1,5 +1,5 @@ --- -"@astrojs/svelte": patch +"@astrojs/svelte": minor --- Adds TypeScript as a required peer dependency as it is required for Svelte's editor tooling to work correctly.