Skip to content

Commit f0fbcc5

Browse files
committed
fix: drop commonjs module to avoid dual package hazard
1 parent 30b822e commit f0fbcc5

File tree

14 files changed

+129
-270
lines changed

14 files changed

+129
-270
lines changed

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"mock-require-assets": "^0.0.3",
5959
"nodemon": "^3.0.3",
6060
"npm-run-all2": "^6.2.2",
61-
"react-native-builder-bob": "^0.39.1",
61+
"react-native-builder-bob": "^0.40.0",
6262
"react-test-renderer": "18.2.0",
6363
"serve": "^14.2.1",
6464
"typescript": "^5.5.2",

packages/bottom-tabs/package.json

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,13 @@
1818
"directory": "packages/bottom-tabs"
1919
},
2020
"source": "./src/index.tsx",
21-
"main": "./lib/commonjs/index.js",
22-
"module": "./lib/module/index.js",
23-
"types": "./lib/typescript/commonjs/src/index.d.ts",
21+
"main": "./lib/module/index.js",
2422
"exports": {
2523
".": {
26-
"import": {
27-
"types": "./lib/typescript/module/src/index.d.ts",
28-
"default": "./lib/module/index.js"
29-
},
30-
"require": {
31-
"types": "./lib/typescript/commonjs/src/index.d.ts",
32-
"default": "./lib/commonjs/index.js"
33-
}
34-
}
24+
"types": "./lib/typescript/src/index.d.ts",
25+
"default": "./lib/module/index.js"
26+
},
27+
"./package.json": "./package.json"
3528
},
3629
"files": [
3730
"src",
@@ -59,7 +52,7 @@
5952
"del-cli": "^5.1.0",
6053
"react": "18.3.1",
6154
"react-native": "0.76.2",
62-
"react-native-builder-bob": "^0.39.1",
55+
"react-native-builder-bob": "^0.40.0",
6356
"react-native-safe-area-context": "4.12.0",
6457
"react-native-screens": "^4.3.0",
6558
"typescript": "^5.5.2"
@@ -75,12 +68,6 @@
7568
"source": "src",
7669
"output": "lib",
7770
"targets": [
78-
[
79-
"commonjs",
80-
{
81-
"esm": true
82-
}
83-
],
8471
[
8572
"module",
8673
{
@@ -90,8 +77,7 @@
9077
[
9178
"typescript",
9279
{
93-
"project": "tsconfig.build.json",
94-
"esm": true
80+
"project": "tsconfig.build.json"
9581
}
9682
]
9783
]

packages/core/package.json

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,13 @@
1818
},
1919
"homepage": "https://reactnavigation.org",
2020
"source": "./src/index.tsx",
21-
"main": "./lib/commonjs/index.js",
22-
"module": "./lib/module/index.js",
23-
"types": "./lib/typescript/commonjs/src/index.d.ts",
21+
"main": "./lib/module/index.js",
2422
"exports": {
2523
".": {
26-
"import": {
27-
"types": "./lib/typescript/module/src/index.d.ts",
28-
"default": "./lib/module/index.js"
29-
},
30-
"require": {
31-
"types": "./lib/typescript/commonjs/src/index.d.ts",
32-
"default": "./lib/commonjs/index.js"
33-
}
34-
}
24+
"types": "./lib/typescript/src/index.d.ts",
25+
"default": "./lib/module/index.js"
26+
},
27+
"./package.json": "./package.json"
3528
},
3629
"files": [
3730
"src",
@@ -63,7 +56,7 @@
6356
"del-cli": "^5.1.0",
6457
"immer": "^10.0.3",
6558
"react": "18.3.1",
66-
"react-native-builder-bob": "^0.39.1",
59+
"react-native-builder-bob": "^0.40.0",
6760
"react-test-renderer": "18.2.0",
6861
"typescript": "^5.5.2"
6962
},
@@ -74,12 +67,6 @@
7467
"source": "src",
7568
"output": "lib",
7669
"targets": [
77-
[
78-
"commonjs",
79-
{
80-
"esm": true
81-
}
82-
],
8370
[
8471
"module",
8572
{
@@ -89,8 +76,7 @@
8976
[
9077
"typescript",
9178
{
92-
"project": "tsconfig.build.json",
93-
"esm": true
79+
"project": "tsconfig.build.json"
9480
}
9581
]
9682
]

packages/devtools/package.json

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,13 @@
1818
},
1919
"homepage": "https://reactnavigation.org",
2020
"source": "./src/index.tsx",
21-
"main": "./lib/commonjs/index.js",
22-
"module": "./lib/module/index.js",
23-
"types": "./lib/typescript/commonjs/src/index.d.ts",
21+
"main": "./lib/module/index.js",
2422
"exports": {
2523
".": {
26-
"import": {
27-
"types": "./lib/typescript/module/src/index.d.ts",
28-
"default": "./lib/module/index.js"
29-
},
30-
"require": {
31-
"types": "./lib/typescript/commonjs/src/index.d.ts",
32-
"default": "./lib/commonjs/index.js"
33-
}
34-
}
24+
"types": "./lib/typescript/src/index.d.ts",
25+
"default": "./lib/module/index.js"
26+
},
27+
"./package.json": "./package.json"
3528
},
3629
"files": [
3730
"src",
@@ -56,7 +49,7 @@
5649
"@types/react": "~18.3.12",
5750
"del-cli": "^5.1.0",
5851
"react": "18.3.1",
59-
"react-native-builder-bob": "^0.39.1",
52+
"react-native-builder-bob": "^0.40.0",
6053
"typescript": "^5.5.2"
6154
},
6255
"peerDependencies": {
@@ -66,12 +59,6 @@
6659
"source": "src",
6760
"output": "lib",
6861
"targets": [
69-
[
70-
"commonjs",
71-
{
72-
"esm": true
73-
}
74-
],
7562
[
7663
"module",
7764
{
@@ -81,8 +68,7 @@
8168
[
8269
"typescript",
8370
{
84-
"project": "tsconfig.build.json",
85-
"esm": true
71+
"project": "tsconfig.build.json"
8672
}
8773
]
8874
]

packages/drawer/package.json

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,13 @@
2323
},
2424
"homepage": "https://reactnavigation.org/docs/drawer-navigator/",
2525
"source": "./src/index.tsx",
26-
"main": "./lib/commonjs/index.js",
27-
"module": "./lib/module/index.js",
28-
"types": "./lib/typescript/commonjs/src/index.d.ts",
26+
"main": "./lib/module/index.js",
2927
"exports": {
3028
".": {
31-
"import": {
32-
"types": "./lib/typescript/module/src/index.d.ts",
33-
"default": "./lib/module/index.js"
34-
},
35-
"require": {
36-
"types": "./lib/typescript/commonjs/src/index.d.ts",
37-
"default": "./lib/commonjs/index.js"
38-
}
39-
}
29+
"types": "./lib/typescript/src/index.d.ts",
30+
"default": "./lib/module/index.js"
31+
},
32+
"./package.json": "./package.json"
4033
},
4134
"files": [
4235
"src",
@@ -65,7 +58,7 @@
6558
"del-cli": "^5.1.0",
6659
"react": "18.3.1",
6760
"react-native": "0.76.2",
68-
"react-native-builder-bob": "^0.39.1",
61+
"react-native-builder-bob": "^0.40.0",
6962
"react-native-gesture-handler": "~2.20.2",
7063
"react-native-reanimated": "~3.16.1",
7164
"react-native-safe-area-context": "4.12.0",
@@ -85,12 +78,6 @@
8578
"source": "src",
8679
"output": "lib",
8780
"targets": [
88-
[
89-
"commonjs",
90-
{
91-
"esm": true
92-
}
93-
],
9481
[
9582
"module",
9683
{
@@ -100,8 +87,7 @@
10087
[
10188
"typescript",
10289
{
103-
"project": "tsconfig.build.json",
104-
"esm": true
90+
"project": "tsconfig.build.json"
10591
}
10692
]
10793
]

packages/elements/package.json

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,13 @@
1919
},
2020
"homepage": "https://reactnavigation.org",
2121
"source": "./src/index.tsx",
22-
"main": "./lib/commonjs/index.js",
23-
"module": "./lib/module/index.js",
24-
"types": "./lib/typescript/commonjs/src/index.d.ts",
22+
"main": "./lib/module/index.js",
2523
"exports": {
2624
".": {
27-
"import": {
28-
"types": "./lib/typescript/module/src/index.d.ts",
29-
"default": "./lib/module/index.js"
30-
},
31-
"require": {
32-
"types": "./lib/typescript/commonjs/src/index.d.ts",
33-
"default": "./lib/commonjs/index.js"
34-
}
35-
}
25+
"types": "./lib/typescript/src/index.d.ts",
26+
"default": "./lib/module/index.js"
27+
},
28+
"./package.json": "./package.json"
3629
},
3730
"files": [
3831
"src",
@@ -59,7 +52,7 @@
5952
"del-cli": "^5.1.0",
6053
"react": "18.3.1",
6154
"react-native": "0.76.2",
62-
"react-native-builder-bob": "^0.39.1",
55+
"react-native-builder-bob": "^0.40.0",
6356
"typescript": "^5.5.2"
6457
},
6558
"peerDependencies": {
@@ -78,12 +71,6 @@
7871
"source": "src",
7972
"output": "lib",
8073
"targets": [
81-
[
82-
"commonjs",
83-
{
84-
"esm": true
85-
}
86-
],
8774
[
8875
"module",
8976
{
@@ -93,8 +80,7 @@
9380
[
9481
"typescript",
9582
{
96-
"project": "tsconfig.build.json",
97-
"esm": true
83+
"project": "tsconfig.build.json"
9884
}
9985
]
10086
]

packages/material-top-tabs/package.json

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,13 @@
2323
},
2424
"homepage": "https://reactnavigation.org/docs/material-top-tab-navigator/",
2525
"source": "./src/index.tsx",
26-
"main": "./lib/commonjs/index.js",
27-
"module": "./lib/module/index.js",
28-
"types": "./lib/typescript/commonjs/src/index.d.ts",
26+
"main": "./lib/module/index.js",
2927
"exports": {
3028
".": {
31-
"import": {
32-
"types": "./lib/typescript/module/src/index.d.ts",
33-
"default": "./lib/module/index.js"
34-
},
35-
"require": {
36-
"types": "./lib/typescript/commonjs/src/index.d.ts",
37-
"default": "./lib/commonjs/index.js"
38-
}
39-
}
29+
"types": "./lib/typescript/src/index.d.ts",
30+
"default": "./lib/module/index.js"
31+
},
32+
"./package.json": "./package.json"
4033
},
4134
"files": [
4235
"src",
@@ -64,7 +57,7 @@
6457
"del-cli": "^5.1.0",
6558
"react": "18.3.1",
6659
"react-native": "0.76.2",
67-
"react-native-builder-bob": "^0.39.1",
60+
"react-native-builder-bob": "^0.40.0",
6861
"react-native-pager-view": "6.5.1",
6962
"typescript": "^5.5.2"
7063
},
@@ -78,12 +71,6 @@
7871
"source": "src",
7972
"output": "lib",
8073
"targets": [
81-
[
82-
"commonjs",
83-
{
84-
"esm": true
85-
}
86-
],
8774
[
8875
"module",
8976
{
@@ -93,8 +80,7 @@
9380
[
9481
"typescript",
9582
{
96-
"project": "tsconfig.build.json",
97-
"esm": true
83+
"project": "tsconfig.build.json"
9884
}
9985
]
10086
]

0 commit comments

Comments
 (0)