Skip to content

Commit

Permalink
chore: update React Native in example (#13250)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Sep 12, 2022
1 parent d0ed4e6 commit c23a462
Show file tree
Hide file tree
Showing 6 changed files with 290 additions and 392 deletions.
18 changes: 0 additions & 18 deletions .yarn/patches/react-native-npm-0.68.1-8830b7be0d.patch

This file was deleted.

7 changes: 6 additions & 1 deletion examples/react-native/babel.config.js
@@ -1,5 +1,10 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.

const {createRequire} = require('module');

const rnRequire = createRequire(require.resolve('react-native'));

module.exports = {
presets: ['module:metro-react-native-babel-preset'],
// RN bundles this preset, so let's load it instead of depending on it ourselves
presets: [rnRequire.resolve('metro-react-native-babel-preset')],
};
1 change: 0 additions & 1 deletion examples/react-native/jest.config.js
Expand Up @@ -2,7 +2,6 @@ const {resolve} = require('path');

module.exports = {
preset: 'react-native',
testEnvironment: 'jsdom',
// this is specific to the Jest repo, not generally needed (the files we ignore will be in node_modules which is ignored by default)
transformIgnorePatterns: [resolve(__dirname, '../../packages')],
};
7 changes: 3 additions & 4 deletions examples/react-native/package.json
Expand Up @@ -7,15 +7,14 @@
"test": "jest"
},
"dependencies": {
"react": "18.0.0",
"react-native": "0.69.2"
"react": "18.1.0",
"react-native": "0.70.0"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/preset-env": "^7.1.0",
"babel-jest": "workspace:^",
"jest": "workspace:^",
"metro-react-native-babel-preset": "0.70.3",
"react-test-renderer": "18.0.0"
"react-test-renderer": "18.1.0"
}
}
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -174,8 +174,7 @@
"babel-jest": "workspace:^",
"enzyme/cheerio": "=1.0.0-rc.3",
"jest": "workspace:^",
"jest-environment-node": "workspace:^",
"react-native@0.69.2": "patch:react-native@npm:0.69.2#.yarn/patches/react-native-npm-0.68.1-8830b7be0d.patch"
"jest-environment-node": "workspace:^"
},
"packageManager": "yarn@3.2.3"
}

0 comments on commit c23a462

Please sign in to comment.