-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Bump dependencies + update example setup #1164
base: main
Are you sure you want to change the base?
Conversation
|
b2e7ed4
to
8ebe385
Compare
8ebe385
to
3b78ef5
Compare
807e315
to
7ca39b1
Compare
@tido64 test are passing now, ready for review 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move the example apps out of package folders entirely?
@tido64 I don't mind moving examples out, but feels like they are good where they are now |
a8491ff
to
b4fabf6
Compare
const path = require("path"); | ||
const { getDefaultConfig } = require("@react-native/metro-config"); | ||
const { getConfig } = require("react-native-builder-bob/metro-config"); | ||
const pkg = require("../package.json"); | ||
|
||
const root = path.resolve(__dirname, ".."); | ||
|
||
/** | ||
* Metro configuration | ||
* https://facebook.github.io/metro/docs/configuration | ||
* | ||
* @type {import('metro-config').MetroConfig} | ||
*/ | ||
module.exports = getConfig(getDefaultConfig(__dirname), { | ||
root, | ||
pkg, | ||
project: __dirname, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should keep the contents of the previous file:
const path = require("path"); | |
const { getDefaultConfig } = require("@react-native/metro-config"); | |
const { getConfig } = require("react-native-builder-bob/metro-config"); | |
const pkg = require("../package.json"); | |
const root = path.resolve(__dirname, ".."); | |
/** | |
* Metro configuration | |
* https://facebook.github.io/metro/docs/configuration | |
* | |
* @type {import('metro-config').MetroConfig} | |
*/ | |
module.exports = getConfig(getDefaultConfig(__dirname), { | |
root, | |
pkg, | |
project: __dirname, | |
}); | |
const { makeMetroConfig } = require("@rnx-kit/metro-config"); | |
const path = require("node:path"); | |
module.exports = makeMetroConfig({ | |
projectRoot: path.join(__dirname, "example"), | |
watchFolders: [__dirname], | |
resolver: { | |
extraNodeModules: { | |
"@react-native-async-storage/async-storage": __dirname, | |
}, | |
}, | |
transformer: { | |
getTransformOptions: async () => ({ | |
transform: { | |
experimentalImportSupport: false, | |
inlineRequires: false, | |
}, | |
}), | |
}, | |
}); |
This will ensure RN works in future versions as well.
} | ||
], | ||
"resources": { | ||
"android": ["index.android.jsbundle"], | ||
"ios": ["index.ios.jsbundle"], | ||
"macos": ["index.macos.jsbundle"] | ||
"macos": ["index.macos.jsbundle"], | ||
"windows": ["main.windows.bundle"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this right? Why is it the only platform using main.*
?
@@ -23,6 +23,7 @@ | |||
"Evan Bacon <[email protected]> (https://github.com/evanbacon)", | |||
"Tommy Nguyen <[email protected]> (https://github.com/tido64)" | |||
], | |||
"source": "src/index", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, which tool is using this field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should copy from the other metro.config.js
.
Summary
For each storage (default and sqlite), I'm "detaching" example RN app from the actual library implementation, by moving examples to be their own workspace. This makes it less noisy in terms of config files and what's actually is a part of lib or not.
Additionally, I bumped dependencies to almost latest. Tested most of it myself, to confirm it works, but had some issues with macOS RNCore dependency - will investigate it in a while. @tido64 could I ask you to check out the Windows example, if it works? 🙏