Skip to content

Commit 985b4fb

Browse files
authored
Packaging: add default condition for exports (#524)
1 parent 6faaf2c commit 985b4fb

File tree

31 files changed

+742
-210
lines changed

31 files changed

+742
-210
lines changed

connect/package.json

+23-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wormhole-foundation/sdk-connect",
3-
"version": "0.6.6",
3+
"version": "0.6.7-beta.0",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
@@ -20,23 +20,43 @@
2020
"description": "The core package for the Connect SDK, used in conjunction with 1 or more of the chain packages",
2121
"exports": {
2222
".": {
23+
"react-native": {
24+
"import": "./dist/esm/index.js",
25+
"require": "./dist/cjs/index.js",
26+
"types": "./dist/cjs/index.d.ts",
27+
"default": "./dist/cjs/index.js"
28+
},
2329
"import": {
2430
"types": "./dist/esm/index.d.ts",
2531
"default": "./dist/esm/index.js"
2632
},
2733
"require": {
2834
"types": "./dist/cjs/index.d.ts",
2935
"default": "./dist/cjs/index.js"
36+
},
37+
"default": {
38+
"types": "./dist/cjs/index.d.ts",
39+
"default": "./dist/cjs/index.js"
3040
}
3141
},
3242
"./tokens": {
43+
"react-native": {
44+
"import": "./dist/esm/tokens.js",
45+
"require": "./dist/cjs/tokens.js",
46+
"types": "./dist/cjs/tokens.d.ts",
47+
"default": "./dist/cjs/tokens.js"
48+
},
3349
"import": {
3450
"types": "./dist/esm/tokens.d.ts",
3551
"default": "./dist/esm/tokens.js"
3652
},
3753
"require": {
3854
"types": "./dist/cjs/tokens.d.ts",
3955
"default": "./dist/cjs/tokens.js"
56+
},
57+
"default": {
58+
"types": "./dist/cjs/tokens.d.ts",
59+
"default": "./dist/cjs/tokens.js"
4060
}
4161
}
4262
},
@@ -75,8 +95,8 @@
7595
},
7696
"dependencies": {
7797
"axios": "^1.4.0",
78-
"@wormhole-foundation/sdk-base": "0.6.6",
79-
"@wormhole-foundation/sdk-definitions": "0.6.6"
98+
"@wormhole-foundation/sdk-base": "0.6.7-beta.0",
99+
"@wormhole-foundation/sdk-definitions": "0.6.7-beta.0"
80100
},
81101
"type": "module"
82102
}

core/base/package.json

+41-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wormhole-foundation/sdk-base",
3-
"version": "0.6.6",
3+
"version": "0.6.7-beta.0",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
@@ -18,43 +18,83 @@
1818
"module": "./dist/esm/index.js",
1919
"exports": {
2020
".": {
21+
"react-native": {
22+
"import": "./dist/esm/index.js",
23+
"require": "./dist/cjs/index.js",
24+
"types": "./dist/cjs/index.d.ts",
25+
"default": "./dist/cjs/index.js"
26+
},
2127
"import": {
2228
"types": "./dist/esm/index.d.ts",
2329
"default": "./dist/esm/index.js"
2430
},
2531
"require": {
2632
"types": "./dist/cjs/index.d.ts",
2733
"default": "./dist/cjs/index.js"
34+
},
35+
"default": {
36+
"types": "./dist/cjs/index.d.ts",
37+
"default": "./dist/cjs/index.js"
2838
}
2939
},
3040
"./constants": {
41+
"react-native": {
42+
"import": "./dist/esm/constants/index.js",
43+
"require": "./dist/cjs/constants/index.js",
44+
"types": "./dist/cjs/constants/index.d.ts",
45+
"default": "./dist/cjs/constants/index.js"
46+
},
3147
"import": {
3248
"types": "./dist/esm/constants/index.d.ts",
3349
"default": "./dist/esm/constants/index.js"
3450
},
3551
"require": {
3652
"types": "./dist/cjs/constants/index.d.ts",
3753
"default": "./dist/cjs/constants/index.js"
54+
},
55+
"default": {
56+
"types": "./dist/cjs/constants/index.d.ts",
57+
"default": "./dist/cjs/constants/index.js"
3858
}
3959
},
4060
"./tokens": {
61+
"react-native": {
62+
"import": "./dist/esm/constants/tokens/index.js",
63+
"require": "./dist/cjs/constants/tokens/index.js",
64+
"types": "./dist/cjs/constants/tokens/index.d.ts",
65+
"default": "./dist/cjs/constants/tokens/index.js"
66+
},
4167
"import": {
4268
"types": "./dist/esm/constants/tokens/index.d.ts",
4369
"default": "./dist/esm/constants/tokens/index.js"
4470
},
4571
"require": {
4672
"types": "./dist/cjs/constants/tokens/index.d.ts",
4773
"default": "./dist/cjs/constants/tokens/index.js"
74+
},
75+
"default": {
76+
"types": "./dist/cjs/constants/tokens/index.d.ts",
77+
"default": "./dist/cjs/constants/tokens/index.js"
4878
}
4979
},
5080
"./contracts": {
81+
"react-native": {
82+
"import": "./dist/esm/constants/contracts/index.js",
83+
"require": "./dist/cjs/constants/contracts/index.js",
84+
"types": "./dist/cjs/constants/contracts/index.d.ts",
85+
"default": "./dist/cjs/constants/contracts/index.js"
86+
},
5187
"import": {
5288
"types": "./dist/esm/constants/contracts/index.d.ts",
5389
"default": "./dist/esm/constants/contracts/index.js"
5490
},
5591
"require": {
5692
"types": "./dist/cjs/constants/contracts/index.d.ts",
5793
"default": "./dist/cjs/constants/contracts/index.js"
94+
},
95+
"default": {
96+
"types": "./dist/cjs/constants/contracts/index.d.ts",
97+
"default": "./dist/cjs/constants/contracts/index.js"
5898
}
5999
}
60100
},

core/definitions/package.json

+22-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wormhole-foundation/sdk-definitions",
3-
"version": "0.6.6",
3+
"version": "0.6.7-beta.0",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
@@ -21,23 +21,43 @@
2121
],
2222
"exports": {
2323
".": {
24+
"react-native": {
25+
"import": "./dist/esm/index.js",
26+
"require": "./dist/cjs/index.js",
27+
"types": "./dist/cjs/index.d.ts",
28+
"default": "./dist/cjs/index.js"
29+
},
2430
"require": {
2531
"types": "./dist/cjs/index.d.ts",
2632
"default": "./dist/cjs/index.js"
2733
},
2834
"import": {
2935
"types": "./dist/esm/index.d.ts",
3036
"default": "./dist/esm/index.js"
37+
},
38+
"default": {
39+
"types": "./dist/cjs/index.d.ts",
40+
"default": "./dist/cjs/index.js"
3141
}
3242
},
3343
"./testing": {
44+
"react-native": {
45+
"import": "./dist/esm/testing/index.js",
46+
"require": "./dist/cjs/testing/index.js",
47+
"types": "./dist/cjs/testing/index.d.ts",
48+
"default": "./dist/cjs/testing/index.js"
49+
},
3450
"require": {
3551
"types": "./dist/cjs/testing/index.d.ts",
3652
"default": "./dist/cjs/testing/index.js"
3753
},
3854
"import": {
3955
"types": "./dist/esm/testing/index.d.ts",
4056
"default": "./dist/esm/testing/index.js"
57+
},
58+
"default": {
59+
"types": "./dist/cjs/testing/index.d.ts",
60+
"default": "./dist/cjs/testing/index.js"
4161
}
4262
}
4363
},
@@ -66,7 +86,7 @@
6686
"dependencies": {
6787
"@noble/hashes": "^1.3.1",
6888
"@noble/curves": "^1.4.0",
69-
"@wormhole-foundation/sdk-base": "0.6.6"
89+
"@wormhole-foundation/sdk-base": "0.6.7-beta.0"
7090
},
7191
"type": "module"
7292
}

core/icons/package.json

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wormhole-foundation/sdk-icons",
3-
"version": "0.6.6",
3+
"version": "0.6.7-beta.0",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
@@ -18,13 +18,23 @@
1818
"module": "./dist/esm/index.js",
1919
"exports": {
2020
".": {
21+
"react-native": {
22+
"import": "./dist/esm/index.js",
23+
"require": "./dist/cjs/index.js",
24+
"types": "./dist/cjs/index.d.ts",
25+
"default": "./dist/cjs/index.js"
26+
},
2127
"import": {
2228
"types": "./dist/esm/index.d.ts",
2329
"default": "./dist/esm/index.js"
2430
},
2531
"require": {
2632
"types": "./dist/cjs/index.d.ts",
2733
"default": "./dist/cjs/index.js"
34+
},
35+
"default": {
36+
"types": "./dist/cjs/index.d.ts",
37+
"default": "./dist/cjs/index.js"
2838
}
2939
}
3040
},
@@ -40,7 +50,7 @@
4050
"dist/cjs"
4151
],
4252
"dependencies": {
43-
"@wormhole-foundation/sdk-base": "0.6.6"
53+
"@wormhole-foundation/sdk-base": "0.6.7-beta.0"
4454
},
4555
"sideEffects": false,
4656
"scripts": {

examples/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@wormhole-foundation/connect-sdk-examples",
3-
"version": "0.6.6",
3+
"version": "0.6.7-beta.0",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/wormhole-foundation/connect-sdk.git"
@@ -51,6 +51,6 @@
5151
"tsx": "^4.7.0"
5252
},
5353
"dependencies": {
54-
"@wormhole-foundation/sdk": "0.6.6"
54+
"@wormhole-foundation/sdk": "0.6.7-beta.0"
5555
}
5656
}

0 commit comments

Comments
 (0)