Skip to content

Commit e7c07d9

Browse files
Copilottido64
andauthored
fix: support react-native-macos and react-native-windows 0.81 (#2644)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tido64 <4123478+tido64@users.noreply.github.com>
1 parent 0935466 commit e7c07d9

3 files changed

Lines changed: 29 additions & 7 deletions

File tree

packages/app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@
100100
"@expo/config-plugins": ">=5.0",
101101
"react": "18.2 - 19.2",
102102
"react-native": "0.76 - 0.83 || >=0.83.0-0 <0.84.0",
103-
"react-native-macos": "^0.0.0-0 || 0.76 - 0.79",
104-
"react-native-windows": "^0.0.0-0 || 0.76 - 0.80"
103+
"react-native-macos": "^0.0.0-0 || 0.76 - 0.81",
104+
"react-native-windows": "^0.0.0-0 || 0.76 - 0.81"
105105
},
106106
"peerDependenciesMeta": {
107107
"@callstack/react-native-visionos": {

packages/app/test/configure/getPlatformPackage.test.ts

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,41 @@ import { describe, it } from "node:test";
33
import { getPlatformPackage } from "../../scripts/configure.mjs";
44

55
describe("getPlatformPackage()", () => {
6-
const name = "react-native-macos";
6+
const macosName = "react-native-macos";
7+
const windowsName = "react-native-windows";
78

89
it("returns dependency when target version is inside range", (t) => {
910
const warnMock = t.mock.method(console, "warn", () => null);
1011

1112
for (const targetVersion of ["0.0.0-canary", "^0.0.0-canary"]) {
1213
const pkg = getPlatformPackage("macos", targetVersion);
13-
deepEqual(pkg, { [name]: "^0.0.0" });
14+
deepEqual(pkg, { [macosName]: "^0.0.0" });
1415
}
1516

1617
for (const targetVersion of ["0.78", "0.78.6", "^0.78", "^0.78.6"]) {
1718
const pkg = getPlatformPackage("macos", targetVersion);
18-
deepEqual(pkg, { [name]: "^0.78.0" });
19+
deepEqual(pkg, { [macosName]: "^0.78.0" });
20+
}
21+
22+
for (const targetVersion of ["0.81", "0.81.0", "^0.81", "^0.81.0"]) {
23+
const pkg = getPlatformPackage("macos", targetVersion);
24+
deepEqual(pkg, { [macosName]: "^0.81.0" });
25+
}
26+
27+
equal(warnMock.mock.calls.length, 0);
28+
});
29+
30+
it("returns dependency for windows when target version is inside range", (t) => {
31+
const warnMock = t.mock.method(console, "warn", () => null);
32+
33+
for (const targetVersion of ["0.80", "0.80.0", "^0.80", "^0.80.0"]) {
34+
const pkg = getPlatformPackage("windows", targetVersion);
35+
deepEqual(pkg, { [windowsName]: "^0.80.0" });
36+
}
37+
38+
for (const targetVersion of ["0.81", "0.81.0", "^0.81", "^0.81.0"]) {
39+
const pkg = getPlatformPackage("windows", targetVersion);
40+
deepEqual(pkg, { [windowsName]: "^0.81.0" });
1941
}
2042

2143
equal(warnMock.mock.calls.length, 0);

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12388,8 +12388,8 @@ __metadata:
1238812388
"@expo/config-plugins": ">=5.0"
1238912389
react: 18.2 - 19.2
1239012390
react-native: 0.76 - 0.83 || >=0.83.0-0 <0.84.0
12391-
react-native-macos: ^0.0.0-0 || 0.76 - 0.79
12392-
react-native-windows: ^0.0.0-0 || 0.76 - 0.80
12391+
react-native-macos: ^0.0.0-0 || 0.76 - 0.81
12392+
react-native-windows: ^0.0.0-0 || 0.76 - 0.81
1239312393
peerDependenciesMeta:
1239412394
"@callstack/react-native-visionos":
1239512395
optional: true

0 commit comments

Comments
 (0)