Skip to content

Commit c1339b9

Browse files
chore: promote types conditional exports to the top of the list (#88)
* Promote types conditional exports to the top of the list * chore: fix changeset --------- Co-authored-by: Matt Brophy <[email protected]>
1 parent 1da95bc commit c1339b9

File tree

6 files changed

+27
-16
lines changed

6 files changed

+27
-16
lines changed

.changeset/silver-sloths-lay.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@web-std/blob": patch
3+
"@web-std/fetch": patch
4+
"@web-std/file": patch
5+
"@web-std/form-data": patch
6+
"@web-std/stream": patch
7+
---
8+
9+
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)

packages/blob/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
"types": "./dist/src/lib.d.ts",
1919
"exports": {
2020
".": {
21+
"types": "./dist/src/lib.d.ts",
2122
"browser": "./src/lib.js",
2223
"require": "./dist/src/lib.node.cjs",
23-
"import": "./src/lib.node.js",
24-
"types": "./dist/src/lib.d.ts"
24+
"import": "./src/lib.node.js"
2525
}
2626
},
2727
"dependencies": {

packages/fetch/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@
99
"type": "module",
1010
"exports": {
1111
".": {
12+
"types": "./dist/src/lib.node.d.ts",
1213
"browser": "./src/lib.js",
1314
"require": "./dist/lib.node.cjs",
14-
"import": "./src/lib.node.js",
15-
"types": "./dist/src/lib.node.d.ts"
15+
"import": "./src/lib.node.js"
1616
},
1717
"./package.json": "./package.json",
1818
"./body": {
19-
"import": "./src/body.js",
20-
"types": "./dist/src/body.d.ts"
19+
"types": "./dist/src/body.d.ts",
20+
"import": "./src/body.js"
2121
},
2222
"./src/request.js": {
23-
"import": "./src/request.js",
24-
"types": "./dist/src/request.d.ts"
23+
"types": "./dist/src/request.d.ts",
24+
"import": "./src/request.js"
2525
},
2626
"./src/response.js": {
27-
"import": "./src/response.js",
28-
"types": "./dist/src/response.d.ts"
27+
"types": "./dist/src/response.d.ts",
28+
"import": "./src/response.js"
2929
},
3030
"./src/headers.js": {
31-
"import": "./src/headers.js",
32-
"types": "./dist/src/headers.d.ts"
31+
"types": "./dist/src/headers.d.ts",
32+
"import": "./src/headers.js"
3333
}
3434
},
3535
"files": [

packages/file/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@
2020
"browser": {
2121
"./src/lib.node.js": "./src/lib.js"
2222
},
23+
"types": "./dist/src/lib.d.ts",
2324
"exports": {
2425
".": {
26+
"types": "./dist/src/lib.d.ts",
2527
"browser": "./src/lib.js",
2628
"require": "./dist/src/lib.node.cjs",
2729
"node": "./src/lib.node.js"
2830
}
2931
},
30-
"types": "./dist/src/lib.d.ts",
3132
"dependencies": {
3233
"@web-std/blob": "^3.0.3"
3334
},

packages/form-data/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,18 @@
1515
"type": "module",
1616
"module": "./src/lib.js",
1717
"main": "./dist/src/lib.node.cjs",
18+
"types": "./dist/src/lib.d.ts",
1819
"browser": {
1920
"./src/lib.node.js": "./src/lib.js"
2021
},
2122
"exports": {
2223
".": {
24+
"types": "./dist/src/lib.d.ts",
2325
"browser": "./src/lib.js",
2426
"require": "./dist/src/lib.node.cjs",
2527
"import": "./src/lib.node.js"
2628
}
2729
},
28-
"types": "./dist/src/lib.d.ts",
2930
"dependencies": {
3031
"web-encoding": "1.1.5"
3132
},

packages/stream/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
},
2424
"exports": {
2525
".": {
26+
"types": "./src/lib.d.ts",
2627
"browser": "./src/lib.js",
2728
"require": "./src/stream.cjs",
28-
"import": "./src/lib.node.js",
29-
"types": "./src/lib.d.ts"
29+
"import": "./src/lib.node.js"
3030
}
3131
},
3232
"author": "Irakli Gozalishvili <[email protected]> (https://gozala.io)",

0 commit comments

Comments
 (0)