Skip to content

Commit ffa7234

Browse files
authored
feat(deps): Support React Native v0.80.0 (#38)
1 parent fe86246 commit ffa7234

File tree

12 files changed

+2067
-1863
lines changed

12 files changed

+2067
-1863
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI
22

33
on:
44
push:
5-
branches: main
5+
branches: [main]
66
pull_request:
77
workflow_call:
88

@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
nodejs: [18, 19, 20, 21, 22, 23]
18+
nodejs: [20, 21, 22, 23, 24]
1919

2020
steps:
2121
- uses: actions/checkout@v4

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CodeQL
22

33
on:
44
push:
5-
branches: main
5+
branches: [main]
66
pull_request:
7-
branches: main
7+
branches: [main]
88

99
concurrency:
1010
group: codeql-${{ github.ref_name }}

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
23.11.0
1+
24.2.0

.yarn/releases/yarn-4.9.1.cjs renamed to .yarn/releases/yarn-4.9.2.cjs

Lines changed: 273 additions & 279 deletions
Large diffs are not rendered by default.

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ plugins:
99
path: .yarn/plugins/@yarnpkg/plugin-engines.cjs
1010
spec: "https://raw.githubusercontent.com/devoto13/yarn-plugin-engines/main/bundles/%40yarnpkg/plugin-engines.js"
1111

12-
yarnPath: .yarn/releases/yarn-4.9.1.cjs
12+
yarnPath: .yarn/releases/yarn-4.9.2.cjs

package.json

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -62,50 +62,51 @@
6262
"test": "NODE_OPTIONS=\"--no-experimental-detect-module\" vitest",
6363
"test:ci": "vitest"
6464
},
65-
"packageManager": "yarn@4.9.1",
65+
"packageManager": "yarn@4.9.2",
6666
"dependencies": {
67-
"@babel/core": "^7.26.10",
68-
"@babel/register": "^7.25.9",
69-
"debug": "^4.4.0",
67+
"@babel/core": "^7.27.4",
68+
"@babel/register": "^7.27.1",
69+
"babel-plugin-module-resolver": "^5.0.2",
70+
"debug": "^4.4.1",
7071
"dot-prop-immutable": "^2.1.1",
71-
"rewiremock": "^3.14.5",
72+
"rewiremock": "^3.14.6",
7273
"supports-color": "^10.0.0",
73-
"ts-pattern": "^5.7.0"
74+
"ts-pattern": "^5.7.1"
7475
},
7576
"devDependencies": {
7677
"@assertive-ts/core": "^2.1.0",
77-
"@eslint/js": "^9.24.0",
78-
"@react-native/babel-preset": "^0.79.1",
79-
"@stylistic/eslint-plugin": "^4.2.0",
78+
"@eslint/js": "^9.29.0",
79+
"@react-native/babel-preset": "^0.80.0",
80+
"@stylistic/eslint-plugin": "^4.4.1",
8081
"@testing-library/react-native": "^13.2.0",
8182
"@types/babel__core": "^7.20.5",
8283
"@types/babel__register": "^7.17.3",
8384
"@types/debug": "^4.1.12",
84-
"@types/node": "^22.14.1",
85-
"@types/react": "^19.1.2",
85+
"@types/node": "^24.0.3",
86+
"@types/react": "^19.1.8",
8687
"@types/react-test-renderer": "^19.1.0",
8788
"@types/sinon": "^17.0.4",
88-
"eslint": "^9.24.0",
89-
"eslint-import-resolver-typescript": "^4.3.2",
89+
"eslint": "^9.29.0",
90+
"eslint-import-resolver-typescript": "^4.4.3",
9091
"eslint-plugin-import": "^2.31.0",
91-
"eslint-plugin-jsdoc": "^50.6.9",
92-
"eslint-plugin-perfectionist": "^4.11.0",
92+
"eslint-plugin-jsdoc": "^51.0.1",
93+
"eslint-plugin-perfectionist": "^4.14.0",
9394
"eslint-plugin-react": "^7.37.5",
9495
"eslint-plugin-sonarjs": "^3.0.2",
95-
"globals": "^16.0.0",
96+
"globals": "^16.2.0",
9697
"react": "19.1.0",
97-
"react-native": "^0.79.1",
98-
"react-native-svg": "^15.11.2",
98+
"react-native": "^0.80.0",
99+
"react-native-svg": "^15.12.0",
99100
"react-test-renderer": "^19.1.0",
100-
"semantic-release": "^24.2.3",
101+
"semantic-release": "^24.2.5",
101102
"semantic-release-yarn": "^3.0.2",
102-
"sinon": "^20.0.0",
103+
"sinon": "^21.0.0",
103104
"tslib": "^2.8.1",
104105
"typescript": "^5.8.3",
105-
"typescript-eslint": "^8.30.1",
106-
"vite": "^6.2.6",
107-
"vite-plugin-dts": "^4.5.3",
108-
"vitest": "^3.1.1"
106+
"typescript-eslint": "^8.34.1",
107+
"vite": "^6.3.5",
108+
"vite-plugin-dts": "^4.5.4",
109+
"vitest": "^3.2.3"
109110
},
110111
"peerDependencies": {
111112
"@react-native/babel-preset": ">=0.73.18",

src/helpers/mockComponent.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ export function mockComponent<P, C extends ComponentClass<PropsWithChildren<P>>>
1616
RealComponent: C,
1717
instanceMethods?: AllNativeMethods,
1818
): C {
19-
const SuperClass: ComponentClass<PropsWithChildren<P>> = typeof RealComponent === "function"
19+
const isFunction = typeof RealComponent === "function";
20+
const isClass = get(RealComponent.prototype, "constructor") instanceof Component;
21+
const SuperClass: ComponentClass<PropsWithChildren<P>> = isFunction && isClass
2022
? RealComponent
2123
: Component;
2224
const name = (RealComponent.displayName ?? "")

src/lib/Animated/AnimatedMock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Animated } from "react-native";
22

33
import { AnimatedValueMock } from "./AnimatedValueMock";
4-
import { AnimatedValueXYMock } from "./AnimatedValueXY";
4+
import { AnimatedValueXYMock } from "./AnimatedValueXYMock";
55

66
export const AnimatedMock: typeof Animated = {
77
...Animated,

src/lib/babelRegister.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,25 @@ register({
99
".jsx",
1010
],
1111
only: [/[/\\]node_modules[/\\](react-native|@react-native)[/\\]/],
12+
plugins: [
13+
["module-resolver", {
14+
resolvePath(sourcePath: string) {
15+
if (sourcePath.startsWith(".")) {
16+
const hastePaths = [
17+
"/Image",
18+
"/Platform",
19+
"/PlatformColorValueTypes",
20+
"/BaseViewConfig",
21+
];
22+
23+
return hastePaths.some(path => sourcePath.endsWith(path))
24+
? `${sourcePath}.ios`
25+
: undefined;
26+
}
27+
28+
return undefined;
29+
},
30+
}],
31+
],
1232
presets: ["module:@react-native/babel-preset"],
1333
});

0 commit comments

Comments
 (0)