Skip to content

Commit 39f1e50

Browse files
committed
test: scope mocha-remote patches via root resolutions
Root resolutions dedupe patched mocha-remote-client for jet on all platforms. Remove tests workspace resolutions, direct devDeps, and metro resolver workaround.
1 parent d40a308 commit 39f1e50

5 files changed

Lines changed: 7 additions & 34 deletions

File tree

.yarn/patches/jet-npm-0.9.0-dev.13-3321aeea6e.patch

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,6 @@ index 897b62288ae128e1ce071142fa3de136caa99239..2f8dd9edf79f6c095b4357307bdac5ea
8989
}
9090
return Promise.resolve();
9191
});
92-
diff --git a/package.json b/package.json
93-
index f4b80c1fc36e797773da47e1f60f88396b3ce4b1..2b27ce84091712dce55bdd782ee1dd05bbcc06a5 100644
94-
--- a/package.json
95-
+++ b/package.json
96-
@@ -157,8 +157,8 @@
97-
"cosmiconfig": "^9.0.0",
98-
"istanbul-lib-coverage": "^3.2.2",
99-
"mocha": "^11.1.0",
100-
- "mocha-remote-client": "^1.13.0",
101-
- "mocha-remote-server": "^1.13.0",
102-
+ "mocha-remote-client": "patch:mocha-remote-client@npm%3A1.13.2#~/.yarn/patches/mocha-remote-client-npm-1.13.2-a2e7596aba.patch",
103-
+ "mocha-remote-server": "patch:mocha-remote-server@npm%3A1.13.2#~/.yarn/patches/mocha-remote-server-npm-1.13.2-619a29d2e3.patch",
104-
"nyc": "^17.1.0",
105-
"yargs": "^17.7.2",
106-
"zod": "^3.24.1"
10792
diff --git a/src/index.tsx b/src/index.tsx
10893
index 1b28aca3fe817fee3e8701ac5096df6fc608bc39..17c631309f88a8017a9fd01e3420df2b4bab140e 100644
10994
--- a/src/index.tsx

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@
116116
"typescript-eslint": "^8.59.1"
117117
},
118118
"resolutions": {
119-
"@types/react": "~19.0.0"
119+
"@types/react": "~19.0.0",
120+
"mocha-remote-client@npm:^1.13.0": "patch:mocha-remote-client@npm%3A1.13.2#~/.yarn/patches/mocha-remote-client-npm-1.13.2-a2e7596aba.patch",
121+
"mocha-remote-server@npm:^1.13.0": "patch:mocha-remote-server@npm%3A1.13.2#~/.yarn/patches/mocha-remote-server-npm-1.13.2-619a29d2e3.patch"
120122
},
121123
"workspaces": {
122124
"packages": [

tests/metro.config.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@ const config = {
6262
},
6363
),
6464
resolveRequest(context, moduleName, platform) {
65-
if (moduleName === 'mocha-remote-client') {
66-
return {
67-
type: 'sourceFile',
68-
filePath: join(__dirname, 'node_modules/mocha-remote-client/dist/browser.bundle.mjs'),
69-
};
70-
}
7165
if (moduleName === '@react-native-firebase/firestore/pipelines') {
7266
const filePath = join(rootDir, 'packages', 'firestore', 'lib', 'pipelines', 'index.ts');
7367
return { type: 'sourceFile', filePath };

tests/package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,10 @@
5353
"jest-environment-node": "^30.3.0",
5454
"jet": "patch:jet@npm%3A0.9.0-dev.13#~/.yarn/patches/jet-npm-0.9.0-dev.13-3321aeea6e.patch",
5555
"mocha": "^11.7.5",
56-
"mocha-remote-client": "patch:mocha-remote-client@npm%3A1.13.2#~/.yarn/patches/mocha-remote-client-npm-1.13.2-a2e7596aba.patch",
57-
"mocha-remote-server": "patch:mocha-remote-server@npm%3A1.13.2#~/.yarn/patches/mocha-remote-server-npm-1.13.2-619a29d2e3.patch",
5856
"nyc": "^18.0.0",
5957
"patch-package": "^8.0.1",
6058
"should": "^13.2.3",
6159
"should-sinon": "0.0.6",
6260
"sinon": "21.1.2"
63-
},
64-
"resolutions": {
65-
"mocha-remote-client": "patch:mocha-remote-client@npm%3A1.13.2#~/.yarn/patches/mocha-remote-client-npm-1.13.2-a2e7596aba.patch",
66-
"mocha-remote-server": "patch:mocha-remote-server@npm%3A1.13.2#~/.yarn/patches/mocha-remote-server-npm-1.13.2-619a29d2e3.patch"
6761
}
6862
}

yarn.lock

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16339,7 +16339,7 @@ __metadata:
1633916339

1634016340
"jet@patch:jet@npm%3A0.9.0-dev.13#~/.yarn/patches/jet-npm-0.9.0-dev.13-3321aeea6e.patch":
1634116341
version: 0.9.0-dev.13
16342-
resolution: "jet@patch:jet@npm%3A0.9.0-dev.13#~/.yarn/patches/jet-npm-0.9.0-dev.13-3321aeea6e.patch::version=0.9.0-dev.13&hash=af70d6"
16342+
resolution: "jet@patch:jet@npm%3A0.9.0-dev.13#~/.yarn/patches/jet-npm-0.9.0-dev.13-3321aeea6e.patch::version=0.9.0-dev.13&hash=a382e4"
1634316343
dependencies:
1634416344
"@types/mocha": "npm:^10.0.10"
1634516345
babel-plugin-istanbul: "npm:^7.0.0"
@@ -16356,7 +16356,7 @@ __metadata:
1635616356
react-native: "*"
1635716357
bin:
1635816358
jet: jet.js
16359-
checksum: 10/dfc19ae55f22c83364e5d6649d86d1ccf58b19e3864c2cf0bcffe275342fc4023eb47dd45f6e2b95aeb4598c1a2cc2956b0b97dd3a4871fd241e0d8b6895b74a
16359+
checksum: 10/bbe7d95aa70494c5511e74acdba983249cc3f170ffa5ed0259329208963f96e3a2d7dc602e6755eb139bc5b06242bd32e8bd4335f9bf813fac403001e39be34a
1636016360
languageName: node
1636116361
linkType: hard
1636216362

@@ -19506,7 +19506,7 @@ __metadata:
1950619506
languageName: node
1950719507
linkType: hard
1950819508

19509-
"mocha-remote-client@npm:1.13.2, mocha-remote-client@npm:^1.13.0":
19509+
"mocha-remote-client@npm:1.13.2":
1951019510
version: 1.13.2
1951119511
resolution: "mocha-remote-client@npm:1.13.2"
1951219512
dependencies:
@@ -19539,7 +19539,7 @@ __metadata:
1953919539
languageName: node
1954019540
linkType: hard
1954119541

19542-
"mocha-remote-server@npm:1.13.2, mocha-remote-server@npm:^1.13.0":
19542+
"mocha-remote-server@npm:1.13.2":
1954319543
version: 1.13.2
1954419544
resolution: "mocha-remote-server@npm:1.13.2"
1954519545
dependencies:
@@ -22325,8 +22325,6 @@ __metadata:
2232522325
jest-environment-node: "npm:^30.3.0"
2232622326
jet: "patch:jet@npm%3A0.9.0-dev.13#~/.yarn/patches/jet-npm-0.9.0-dev.13-3321aeea6e.patch"
2232722327
mocha: "npm:^11.7.5"
22328-
mocha-remote-client: "patch:mocha-remote-client@npm%3A1.13.2#~/.yarn/patches/mocha-remote-client-npm-1.13.2-a2e7596aba.patch"
22329-
mocha-remote-server: "patch:mocha-remote-server@npm%3A1.13.2#~/.yarn/patches/mocha-remote-server-npm-1.13.2-619a29d2e3.patch"
2233022328
nyc: "npm:^18.0.0"
2233122329
patch-package: "npm:^8.0.1"
2233222330
postinstall-postinstall: "npm:2.1.0"

0 commit comments

Comments
 (0)