Skip to content

Commit f47e4aa

Browse files
authored
chore: upgrade dependencies (#362)
* chore: upgrade dependencies * Change node version * Upgrade node * organise imports
1 parent 83bc568 commit f47e4aa

File tree

5 files changed

+2400
-3287
lines changed

5 files changed

+2400
-3287
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/node:12.7.0
5+
- image: circleci/node:12.22.0
66
working_directory: /home/circleci/rosetta
77
steps:
88
- checkout

metro.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module.exports = {
1010
getTransformOptions: async () => ({
1111
transform: {
1212
experimentalImportSupport: false,
13-
inlineRequires: false,
13+
inlineRequires: true,
1414
},
1515
}),
1616
},

package.json

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,39 +24,40 @@
2424
"object-hash": "2.2.0",
2525
"react-fast-compare": "3.2.0",
2626
"shortid": "2.2.16",
27-
"use-global-hook": "0.2.1"
27+
"use-global-hook": "0.3.0"
2828
},
2929
"peerDependencies": {
3030
"react": "*",
3131
"react-native": "*"
3232
},
3333
"devDependencies": {
34-
"@babel/core": "7.15.5",
35-
"@babel/runtime": "7.15.4",
34+
"@babel/core": "7.12.9",
35+
"@babel/runtime": "7.12.5",
3636
"@react-native-community/eslint-config": "3.0.1",
37-
"@testing-library/jest-native": "3.4.3",
38-
"@testing-library/react-native": "7.2.0",
39-
"@types/jest": "25.2.3",
40-
"@types/object-hash": "1.3.4",
41-
"@types/react-native": "0.63.46",
37+
"@testing-library/jest-native": "4.0.4",
38+
"@testing-library/react-native": "9.0.0",
39+
"@types/jest": "27.4.0",
40+
"@types/object-hash": "2.2.1",
41+
"@types/react-native": "0.66.15",
4242
"@types/react-test-renderer": "17.0.1",
4343
"@types/shortid": "0.0.29",
44-
"@types/use-global-hook": "0.1.4",
44+
"@types/use-global-hook": "0.1.5",
4545
"babel-jest": "26.6.3",
4646
"codecov": "3.8.3",
4747
"eslint": "7.32.0",
4848
"eslint-plugin-prettier": "4.0.0",
49+
"@typescript-eslint/parser": "5.7.0",
4950
"istanbul": "0.4.5",
5051
"istanbul-api": "3.0.0",
51-
"istanbul-reports": "3.0.2",
52-
"jest": "25.1.0",
53-
"metro-react-native-babel-preset": "0.65.0",
54-
"prettier": "2.4.1",
55-
"prettier-eslint": "12.0.0",
56-
"react": "16.13.1",
57-
"react-native": "0.63.4",
58-
"react-test-renderer": "16.13.1",
59-
"typescript": "3.8.3"
52+
"istanbul-reports": "3.1.3",
53+
"jest": "26.6.3",
54+
"metro-react-native-babel-preset": "0.66.2",
55+
"prettier": "2.5.1",
56+
"prettier-eslint": "13.0.0",
57+
"react": "17.0.2",
58+
"react-native": "0.67.1",
59+
"react-test-renderer": "17.0.2",
60+
"typescript": "4.4.4"
6061
},
6162
"keywords": [
6263
"react",
@@ -83,9 +84,6 @@
8384
"json",
8485
"node"
8586
],
86-
"transformIgnorePatterns": [
87-
"node_modules/(?!(jest-)|react-native|react-navigation|react-clone-referenced-element|mobx-react|use-global-hook)"
88-
],
8987
"modulePathIgnorePatterns": [
9088
"<rootDir>/examples/"
9189
],

src/NestedListView.test.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import * as React from 'react';
2-
import { Pressable, Text, View } from 'react-native';
3-
import NestedListView, { INode, NestedRow } from '.';
2+
import { Text, View } from 'react-native';
3+
import { INode } from './NodeView';
44
import { render, waitFor, fireEvent } from '@testing-library/react-native';
5+
import { NestedListView } from './NestedListView';
6+
import { NestedRow } from './NestedRow';
57

68
let mockCounter = 0;
79

@@ -361,19 +363,23 @@ describe('NestedListView', () => {
361363

362364
const mockIsTheLast = jest.fn();
363365

364-
const { UNSAFE_getByType } = render(
366+
const { getByText } = render(
365367
<NestedListView
366368
renderNode={(item: INode, level: number, isLastItem: boolean) => {
367369
mockIsTheLast(isLastItem);
368370

369-
return <NestedRow level={level}>{item.title}</NestedRow>;
371+
return (
372+
<NestedRow level={level}>
373+
<Text>{item.title}</Text>
374+
</NestedRow>
375+
);
370376
}}
371377
data={data}
372378
/>,
373379
);
374380

375381
await waitFor(() => {
376-
const child1 = UNSAFE_getByType(Pressable);
382+
const child1 = getByText('child1');
377383

378384
if (child1) {
379385
fireEvent.press(child1);

0 commit comments

Comments
 (0)