From 40db9d5f3cbda16f85f1957a3259049b936c2815 Mon Sep 17 00:00:00 2001 From: Matt Brophy Date: Tue, 1 Aug 2023 16:17:55 -0400 Subject: [PATCH 1/2] Promote types conditional exports to the top of the list --- .changeset/silver-sloths-lay.md | 9 +++++++++ packages/blob/package.json | 4 ++-- packages/fetch/package.json | 20 ++++++++++---------- packages/file/package.json | 3 ++- packages/form-data/package.json | 3 ++- packages/stream/package.json | 4 ++-- 6 files changed, 27 insertions(+), 16 deletions(-) create mode 100644 .changeset/silver-sloths-lay.md diff --git a/.changeset/silver-sloths-lay.md b/.changeset/silver-sloths-lay.md new file mode 100644 index 00000000..44ecf050 --- /dev/null +++ b/.changeset/silver-sloths-lay.md @@ -0,0 +1,9 @@ +--- +"@remix-run/web-blob": patch +"@remix-run/web-fetch": patch +"@remix-run/web-file": patch +"@remix-run/web-form-data": patch +"@remix-run/web-stream": patch +--- + +Move types conditional export to the top of the list to align with [the node guidance](https://nodejs.org/api/packages.html#community-conditions-definitions) diff --git a/packages/blob/package.json b/packages/blob/package.json index 406cedc0..92b9422a 100644 --- a/packages/blob/package.json +++ b/packages/blob/package.json @@ -18,10 +18,10 @@ "types": "./dist/src/lib.d.ts", "exports": { ".": { + "types": "./dist/src/lib.d.ts", "browser": "./src/lib.js", "require": "./dist/src/lib.node.cjs", - "import": "./src/lib.node.js", - "types": "./dist/src/lib.d.ts" + "import": "./src/lib.node.js" } }, "dependencies": { diff --git a/packages/fetch/package.json b/packages/fetch/package.json index 978922c4..2e16fd24 100644 --- a/packages/fetch/package.json +++ b/packages/fetch/package.json @@ -9,27 +9,27 @@ "type": "module", "exports": { ".": { + "types": "./dist/src/lib.node.d.ts", "browser": "./src/lib.js", "require": "./dist/lib.node.cjs", - "import": "./src/lib.node.js", - "types": "./dist/src/lib.node.d.ts" + "import": "./src/lib.node.js" }, "./package.json": "./package.json", "./body": { - "import": "./src/body.js", - "types": "./dist/src/body.d.ts" + "types": "./dist/src/body.d.ts", + "import": "./src/body.js" }, "./src/request.js": { - "import": "./src/request.js", - "types": "./dist/src/request.d.ts" + "types": "./dist/src/request.d.ts", + "import": "./src/request.js" }, "./src/response.js": { - "import": "./src/response.js", - "types": "./dist/src/response.d.ts" + "types": "./dist/src/response.d.ts", + "import": "./src/response.js" }, "./src/headers.js": { - "import": "./src/headers.js", - "types": "./dist/src/headers.d.ts" + "types": "./dist/src/headers.d.ts", + "import": "./src/headers.js" } }, "files": [ diff --git a/packages/file/package.json b/packages/file/package.json index fc506381..21d4f9ca 100644 --- a/packages/file/package.json +++ b/packages/file/package.json @@ -20,14 +20,15 @@ "browser": { "./src/lib.node.js": "./src/lib.js" }, + "types": "./dist/src/lib.d.ts", "exports": { ".": { + "types": "./dist/src/lib.d.ts", "browser": "./src/lib.js", "require": "./dist/src/lib.node.cjs", "node": "./src/lib.node.js" } }, - "types": "./dist/src/lib.d.ts", "dependencies": { "@web-std/blob": "^3.0.3" }, diff --git a/packages/form-data/package.json b/packages/form-data/package.json index bb5b8f4a..9da39dbc 100644 --- a/packages/form-data/package.json +++ b/packages/form-data/package.json @@ -15,17 +15,18 @@ "type": "module", "module": "./src/lib.js", "main": "./dist/src/lib.node.cjs", + "types": "./dist/src/lib.d.ts", "browser": { "./src/lib.node.js": "./src/lib.js" }, "exports": { ".": { + "types": "./dist/src/lib.d.ts", "browser": "./src/lib.js", "require": "./dist/src/lib.node.cjs", "import": "./src/lib.node.js" } }, - "types": "./dist/src/lib.d.ts", "dependencies": { "web-encoding": "1.1.5" }, diff --git a/packages/stream/package.json b/packages/stream/package.json index add2bad4..6ba87624 100644 --- a/packages/stream/package.json +++ b/packages/stream/package.json @@ -23,10 +23,10 @@ }, "exports": { ".": { + "types": "./src/lib.d.ts", "browser": "./src/lib.js", "require": "./src/stream.cjs", - "import": "./src/lib.node.js", - "types": "./src/lib.d.ts" + "import": "./src/lib.node.js" } }, "author": "Irakli Gozalishvili (https://gozala.io)", From 824f8fee4674c910bd4fc56f2ca0d2536e4303da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Sat, 26 Aug 2023 21:51:12 +0200 Subject: [PATCH 2/2] chore: fix changeset --- .changeset/silver-sloths-lay.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.changeset/silver-sloths-lay.md b/.changeset/silver-sloths-lay.md index 44ecf050..ccf849b2 100644 --- a/.changeset/silver-sloths-lay.md +++ b/.changeset/silver-sloths-lay.md @@ -1,9 +1,9 @@ --- -"@remix-run/web-blob": patch -"@remix-run/web-fetch": patch -"@remix-run/web-file": patch -"@remix-run/web-form-data": patch -"@remix-run/web-stream": patch +"@web-std/blob": patch +"@web-std/fetch": patch +"@web-std/file": patch +"@web-std/form-data": patch +"@web-std/stream": patch --- Move types conditional export to the top of the list to align with [the node guidance](https://nodejs.org/api/packages.html#community-conditions-definitions)