From 433589299a08afd00f50f5e4ee82e4b44e15e3ab Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 23 May 2022 20:22:50 -0400 Subject: [PATCH 1/2] add types to pkg.exports - fixes #5028 --- .changeset/stupid-maps-hide.md | 12 ++++++++++++ packages/adapter-auto/package.json | 3 ++- packages/adapter-cloudflare-workers/package.json | 3 ++- packages/adapter-cloudflare/package.json | 3 ++- packages/adapter-netlify/package.json | 3 ++- packages/adapter-node/package.json | 3 ++- packages/adapter-static/package.json | 3 ++- packages/adapter-vercel/package.json | 3 ++- packages/amp/package.json | 3 ++- 9 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 .changeset/stupid-maps-hide.md diff --git a/.changeset/stupid-maps-hide.md b/.changeset/stupid-maps-hide.md new file mode 100644 index 000000000000..c7fd7eded455 --- /dev/null +++ b/.changeset/stupid-maps-hide.md @@ -0,0 +1,12 @@ +--- +'@sveltejs/adapter-auto': patch +'@sveltejs/adapter-cloudflare': patch +'@sveltejs/adapter-cloudflare-workers': patch +'@sveltejs/adapter-netlify': patch +'@sveltejs/adapter-node': patch +'@sveltejs/adapter-static': patch +'@sveltejs/adapter-vercel': patch +'@sveltejs/amp': patch +--- + +Add types to pkg.exports diff --git a/packages/adapter-auto/package.json b/packages/adapter-auto/package.json index 3e13320ed2c9..b41c1cdea8ea 100644 --- a/packages/adapter-auto/package.json +++ b/packages/adapter-auto/package.json @@ -11,7 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js" + "import": "./index.js", + "types": "./index.d.ts" }, "./package.json": "./package.json" }, diff --git a/packages/adapter-cloudflare-workers/package.json b/packages/adapter-cloudflare-workers/package.json index e217326d1200..078109b460e4 100644 --- a/packages/adapter-cloudflare-workers/package.json +++ b/packages/adapter-cloudflare-workers/package.json @@ -11,7 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js" + "import": "./index.js", + "types": "./index.d.ts" }, "./package.json": "./package.json" }, diff --git a/packages/adapter-cloudflare/package.json b/packages/adapter-cloudflare/package.json index 957905f62d0d..956c62cb1422 100644 --- a/packages/adapter-cloudflare/package.json +++ b/packages/adapter-cloudflare/package.json @@ -11,7 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js" + "import": "./index.js", + "types": "./index.d.ts" }, "./package.json": "./package.json" }, diff --git a/packages/adapter-netlify/package.json b/packages/adapter-netlify/package.json index 04dd54ff1990..c236830b7734 100644 --- a/packages/adapter-netlify/package.json +++ b/packages/adapter-netlify/package.json @@ -11,7 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js" + "import": "./index.js", + "types": "./index.d.ts" }, "./package.json": "./package.json" }, diff --git a/packages/adapter-node/package.json b/packages/adapter-node/package.json index a958530cf48c..f78c2d0a6712 100644 --- a/packages/adapter-node/package.json +++ b/packages/adapter-node/package.json @@ -11,7 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js" + "import": "./index.js", + "types": "./index.d.ts" }, "./package.json": "./package.json" }, diff --git a/packages/adapter-static/package.json b/packages/adapter-static/package.json index 30e4f71c02c1..13776de79228 100644 --- a/packages/adapter-static/package.json +++ b/packages/adapter-static/package.json @@ -12,7 +12,8 @@ "main": "index.js", "exports": { ".": { - "import": "./index.js" + "import": "./index.js", + "types": "./index.d.ts" }, "./package.json": "./package.json" }, diff --git a/packages/adapter-vercel/package.json b/packages/adapter-vercel/package.json index 105259370484..b85f2e292230 100644 --- a/packages/adapter-vercel/package.json +++ b/packages/adapter-vercel/package.json @@ -11,7 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js" + "import": "./index.js", + "types": "./index.d.ts" }, "./package.json": "./package.json" }, diff --git a/packages/amp/package.json b/packages/amp/package.json index fcc2b308613f..92a44910aeac 100644 --- a/packages/amp/package.json +++ b/packages/amp/package.json @@ -11,7 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js" + "import": "./index.js", + "types": "./index.d.ts" }, "./package.json": "./package.json" }, From 5267a10b68a55f6a1083e35bc3c1295d39cfead7 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Tue, 24 May 2022 09:58:17 -0400 Subject: [PATCH 2/2] types first --- packages/adapter-auto/package.json | 4 ++-- packages/adapter-cloudflare-workers/package.json | 4 ++-- packages/adapter-cloudflare/package.json | 4 ++-- packages/adapter-netlify/package.json | 4 ++-- packages/adapter-node/package.json | 4 ++-- packages/adapter-static/package.json | 4 ++-- packages/adapter-vercel/package.json | 4 ++-- packages/amp/package.json | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/packages/adapter-auto/package.json b/packages/adapter-auto/package.json index b41c1cdea8ea..f2ba56a80f68 100644 --- a/packages/adapter-auto/package.json +++ b/packages/adapter-auto/package.json @@ -11,8 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js", - "types": "./index.d.ts" + "types": "./index.d.ts", + "import": "./index.js" }, "./package.json": "./package.json" }, diff --git a/packages/adapter-cloudflare-workers/package.json b/packages/adapter-cloudflare-workers/package.json index 078109b460e4..79917b3ddaf5 100644 --- a/packages/adapter-cloudflare-workers/package.json +++ b/packages/adapter-cloudflare-workers/package.json @@ -11,8 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js", - "types": "./index.d.ts" + "types": "./index.d.ts", + "import": "./index.js" }, "./package.json": "./package.json" }, diff --git a/packages/adapter-cloudflare/package.json b/packages/adapter-cloudflare/package.json index 956c62cb1422..bab5ba187265 100644 --- a/packages/adapter-cloudflare/package.json +++ b/packages/adapter-cloudflare/package.json @@ -11,8 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js", - "types": "./index.d.ts" + "types": "./index.d.ts", + "import": "./index.js" }, "./package.json": "./package.json" }, diff --git a/packages/adapter-netlify/package.json b/packages/adapter-netlify/package.json index c236830b7734..d7472963b302 100644 --- a/packages/adapter-netlify/package.json +++ b/packages/adapter-netlify/package.json @@ -11,8 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js", - "types": "./index.d.ts" + "types": "./index.d.ts", + "import": "./index.js" }, "./package.json": "./package.json" }, diff --git a/packages/adapter-node/package.json b/packages/adapter-node/package.json index f78c2d0a6712..bd5945943694 100644 --- a/packages/adapter-node/package.json +++ b/packages/adapter-node/package.json @@ -11,8 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js", - "types": "./index.d.ts" + "types": "./index.d.ts", + "import": "./index.js" }, "./package.json": "./package.json" }, diff --git a/packages/adapter-static/package.json b/packages/adapter-static/package.json index 13776de79228..e6c1110272a7 100644 --- a/packages/adapter-static/package.json +++ b/packages/adapter-static/package.json @@ -12,8 +12,8 @@ "main": "index.js", "exports": { ".": { - "import": "./index.js", - "types": "./index.d.ts" + "types": "./index.d.ts", + "import": "./index.js" }, "./package.json": "./package.json" }, diff --git a/packages/adapter-vercel/package.json b/packages/adapter-vercel/package.json index b85f2e292230..25723e5205d5 100644 --- a/packages/adapter-vercel/package.json +++ b/packages/adapter-vercel/package.json @@ -11,8 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js", - "types": "./index.d.ts" + "types": "./index.d.ts", + "import": "./index.js" }, "./package.json": "./package.json" }, diff --git a/packages/amp/package.json b/packages/amp/package.json index 92a44910aeac..c54850979f71 100644 --- a/packages/amp/package.json +++ b/packages/amp/package.json @@ -11,8 +11,8 @@ "type": "module", "exports": { ".": { - "import": "./index.js", - "types": "./index.d.ts" + "types": "./index.d.ts", + "import": "./index.js" }, "./package.json": "./package.json" },