Skip to content

Commit 892899e

Browse files
committed
General upgrade changes
1 parent 95d4892 commit 892899e

File tree

9 files changed

+12893
-8593
lines changed

9 files changed

+12893
-8593
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ expoDemo/android/gradlew.bat
4343
node_modules/
4444
npm-debug.log
4545
yarn-error.log
46+
.yarn
4647

4748
.vscode
4849

@@ -77,3 +78,7 @@ expoDemo/ios/Pods
7778

7879
# Temporary files created by Metro to check the health of the file watcher
7980
.metro-health-check*
81+
82+
83+
# testing
84+
/coverage

.node-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-3.6.4.cjs

Gemfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
source 'https://rubygems.org'
22

33
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
4-
ruby '>= 2.6.10'
5-
gem 'cocoapods', '>= 1.11.3'
4+
ruby ">= 2.6.10"
5+
6+
# Cocoapods 1.15 introduced a bug which break the build. We will remove the upper
7+
# bound in the template on Cocoapods with next React Native release.
8+
gem 'cocoapods', '>= 1.13', '< 1.15'
9+
gem 'activesupport', '>= 6.1.7.5', '< 7.1.0'
10+

babel.config.js

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@ module.exports = {
55
plugins: ['react-native-reanimated/plugin']
66
}
77
},
8-
presets: ['module:metro-react-native-babel-preset'],
9-
plugins: ['react-native-reanimated/plugin']
8+
presets: ['module:@react-native/babel-preset'],
9+
plugins: [
10+
'react-native-reanimated/plugin',
11+
[
12+
'module-resolver',
13+
{
14+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
15+
root: ['.'],
16+
alias: {
17+
'react-native-ui-lib': './src/index.ts',
18+
commons: './src/commons',
19+
helpers: './src/helpers',
20+
utils: './src/utils',
21+
hooks: './src/hooks',
22+
optionalDeps: './src/optionalDependencies',
23+
services: './src/services',
24+
style: './src/style'
25+
}
26+
}
27+
]
28+
]
1029
};

metro.config.js

Lines changed: 56 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,60 @@
1-
const {getDefaultConfig} = require('metro-config');
1+
// const {getDefaultConfig} = require('@react-native/metro-config');
2+
3+
// /**
4+
// * Metro configuration
5+
// * https://facebook.github.io/metro/docs/configuration
6+
// *
7+
// * @type {import('metro-config').MetroConfig}
8+
// */
9+
// module.exports = (async () => {
10+
// const {
11+
// resolver: {sourceExts, assetExts}
12+
// } = await getDefaultConfig();
13+
// return {
14+
// transformer: {
15+
// getTransformOptions: async () => ({
16+
// transform: {
17+
// experimentalImportSupport: false,
18+
// inlineRequires: false
19+
// }
20+
// }),
21+
// babelTransformerPath: require.resolve('react-native-svg-transformer')
22+
// },
23+
// resolver: {
24+
// assetExts: assetExts.filter(ext => ext !== 'svg'),
25+
// sourceExts: [...sourceExts, 'svg']
26+
// }
27+
// };
28+
// })();
29+
30+
// RN73
31+
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
32+
33+
// const {
34+
// resolver: {sourceExts, assetExts}
35+
// } = getDefaultConfig();
236

337
/**
4-
* Metro configuration for React Native
5-
* https://github.com/facebook/react-native
38+
* Metro configuration
39+
* https://facebook.github.io/metro/docs/configuration
640
*
7-
* @format
41+
* @type {import('metro-config').MetroConfig}
842
*/
9-
module.exports = (async () => {
10-
const {
11-
resolver: {sourceExts, assetExts}
12-
} = await getDefaultConfig();
13-
return {
14-
transformer: {
15-
getTransformOptions: async () => ({
16-
transform: {
17-
experimentalImportSupport: false,
18-
inlineRequires: false
19-
}
20-
}),
21-
babelTransformerPath: require.resolve('react-native-svg-transformer')
22-
},
23-
resolver: {
24-
assetExts: assetExts.filter(ext => ext !== 'svg'),
25-
sourceExts: [...sourceExts, 'svg']
26-
}
27-
};
28-
})();
43+
44+
const config = {
45+
// transformer: {
46+
// getTransformOptions: async () => ({
47+
// transform: {
48+
// experimentalImportSupport: false,
49+
// inlineRequires: false
50+
// }
51+
// }),
52+
// babelTransformerPath: require.resolve('react-native-svg-transformer')
53+
// },
54+
// resolver: {
55+
// assetExts: assetExts.filter(ext => ext !== 'svg'),
56+
// sourceExts: [...sourceExts, 'svg']
57+
// }
58+
};
59+
60+
module.exports = mergeConfig(getDefaultConfig(__dirname), config);

package.json

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"url": "https://github.com/wix/react-native-ui-lib"
1515
},
1616
"scripts": {
17-
"start": "watchman watch-del-all && export DEV_MODE=true && react-native start",
17+
"start": "watchman watch-del-all && react-native start",
1818
"start:web": "npm --prefix webDemo run start",
1919
"ios": "react-native run-ios",
2020
"android": "react-native run-android",
@@ -69,21 +69,25 @@
6969
"@react-native-community/blur": "4.3.0",
7070
"@react-native-community/datetimepicker": "^3.4.6",
7171
"@react-native-community/netinfo": "^5.6.2",
72+
"@react-native/babel-preset": "0.73.21",
73+
"@react-native/eslint-config": "0.73.2",
74+
"@react-native/metro-config": "0.73.5",
75+
"@react-native/typescript-config": "0.73.1",
7276
"@shopify/flash-list": "^1.2.1",
7377
"@testing-library/react-hooks": "^7.0.2",
7478
"@testing-library/react-native": "^11.5.2",
7579
"@types/hoist-non-react-statics": "^3.3.1",
7680
"@types/jest": "^29.2.1",
7781
"@types/lodash": "^4.0.0",
7882
"@types/prop-types": "^15.5.3",
79-
"@types/react": "18.2.72",
83+
"@types/react": "18.2.6",
8084
"@types/react-native": "0.71.2",
8185
"@types/tinycolor2": "^1.4.2",
8286
"@types/url-parse": "^1.4.3",
8387
"@typescript-eslint/eslint-plugin": "^5.3.1",
8488
"@typescript-eslint/parser": "^5.3.1",
8589
"@welldone-software/why-did-you-render": "^3.2.1",
86-
"babel-jest": "^29.2.1",
90+
"babel-jest": "^29.6.3",
8791
"babel-plugin-lodash": "^3.3.4",
8892
"babel-plugin-module-resolver": "^5.0.0",
8993
"eslint": "8.19.0",
@@ -92,7 +96,7 @@
9296
"eslint-plugin-react-hooks": "^4.0.4",
9397
"eslint-plugin-react-native": "^4.0.0",
9498
"eslint-plugin-uilib": "file:./eslint-rules",
95-
"jest": "^29.2.1",
99+
"jest": "^29.6.3",
96100
"light-date": "^1.2.0",
97101
"metro-react-native-babel-preset": "0.73.10",
98102
"moment": "^2.24.0",
@@ -104,27 +108,28 @@
104108
"react": "18.2.0",
105109
"react-autobind": "^1.0.6",
106110
"react-dom": "^18.2.0",
107-
"react-native": "0.71.12",
111+
"react-native": "0.73.9",
108112
"react-native-fs": "^2.20.0",
109113
"react-native-gesture-handler": "2.14.1",
110114
"react-native-haptic-feedback": "^1.11.0",
111115
"react-native-linear-gradient": "2.6.2",
112116
"react-native-mmkv": "2.11.0",
113-
"react-native-navigation": "7.32.1",
117+
"react-native-navigation": "7.40.1",
114118
"react-native-reanimated": "3.8.1",
115119
"react-native-shimmer-placeholder": "^2.0.6",
116120
"react-native-svg": "^13.7.0",
117121
"react-native-svg-transformer": "1.1.0",
118122
"react-test-renderer": "18.2.0",
119123
"reassure": "^0.4.1",
120124
"shell-utils": "^1.0.10",
121-
"typescript": "4.9.5"
125+
"typescript": "5.0.4"
122126
},
123127
"peerDependencies": {
124128
"react": ">=17.0.1",
125129
"react-native": ">=0.64.1",
126130
"react-native-gesture-handler": ">=2.5.0",
127-
"react-native-reanimated": ">=2.0.0"
131+
"react-native-reanimated": ">=2.0.0",
132+
"react-native-ui-lib": "*"
128133
},
129134
"jest": {
130135
"preset": "react-native",
@@ -147,5 +152,9 @@
147152
"fakeTimers": {
148153
"legacyFakeTimers": true
149154
}
150-
}
155+
},
156+
"engines": {
157+
"node": ">=18"
158+
},
159+
"packageManager": "[email protected]"
151160
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// "declarationDir": "./generatedTypes",
2121
"baseUrl": ".",
2222
"paths": {
23-
"react-native-ui-lib": ["src/index.ts"],
23+
"react-native-ui-lib": ["./src/index.ts"],
2424
"commons": ["./src/commons"],
2525
"helpers": ["./src/helpers"],
2626
"utils": ["./src/utils"],

0 commit comments

Comments
 (0)