-
Notifications
You must be signed in to change notification settings - Fork 406
chore: repo maintenance #1247
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
base: main
Are you sure you want to change the base?
chore: repo maintenance #1247
Changes from 14 commits
961d409
8f451e1
d36808d
a5f8e12
07c93dc
77376da
48f7454
23e7e4b
f923c15
8c18a18
962b56d
bb77c56
11bb1cb
13728c5
384cf33
fa6a80c
06883d2
7563ba0
dbbdb62
7c3ad8a
9969b8e
95b59f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "@uploadthing/react": minor | ||
| --- | ||
|
|
||
| feat: add tanstack start ssr integration |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "uploadthing": minor | ||
| --- | ||
|
|
||
| feat: add `react-router` adapter |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ export default function FileScreen() { | |
|
|
||
| return ( | ||
| <> | ||
| <Stack.Screen options={{ title: name, headerBackTitleVisible: false }} /> | ||
| <Stack.Screen options={{ title: name, headerBackVisible: false }} /> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, let's read the file to understand the context around line 17
cat -n examples/minimal-expo/app/f/[key].tsxRepository: pingdotgg/uploadthing Length of output: 186 🌐 Web query:
💡 Result: Yes — expo-router (Stack) supports headerBackVisible on Stack.Screen options (it uses React Navigation's native-stack under the hood). It will hide/show the header back button and has no effect on the first screen in the stack. Example: export default function Layout() { Sources: Expo Router docs (Stack header options). [1] React Navigation native-stack docs (headerBackVisible). [2] References Ensure users can still navigate back after hiding the header back button
🤖 Prompt for AI Agents |
||
| <View className="flex h-full items-center justify-center"> | ||
| {!isImage(name) ? ( | ||
| <View className="flex flex-col items-center gap-4"> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| @tailwind base; | ||
| @tailwind components; | ||
| @tailwind utilities; | ||
| @import "tailwindcss/theme.css" layer(theme); | ||
| @import "tailwindcss/preflight.css" layer(base); | ||
| @import "tailwindcss/utilities.css"; | ||
|
|
||
| @import "nativewind/theme"; | ||
|
Comment on lines
+1
to
+5
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🌐 Web query:
💡 Result: Quick config guide — NativeWind + Tailwind CSS v4
References
If you want, I can generate a ready-to-run example repo config (package.json, tailwind.config.js, global.css, and metro/babel snippets). 🌐 Web query:
💡 Result: Short answer — for Tailwind CSS v4 with NativeWind you must switch from @tailwind directives to CSS @import layer imports and include NativeWind's theme. Example global CSS:
Notes:
Sources: 🏁 Script executed: # Find and examine package.json in minimal-expo to check versions
find . -path "*/minimal-expo/package.json" -type f | head -1 | xargs cat 2>/dev/nullRepository: pingdotgg/uploadthing Length of output: 1756 🏁 Script executed: # Search for other CSS files with Tailwind imports to compare patterns
rg -t css "@import.*tailwindcss" --max-count=20Repository: pingdotgg/uploadthing Length of output: 1143 Add The import pattern is correct for NativeWind + Tailwind v4 integration (documented in NativeWind's official setup guide). However, line 3 should include the explicit layer declaration to match the pattern used elsewhere in the codebase (packages/vue, packages/svelte, packages/react, packages/solid all use @import "tailwindcss/utilities.css" layer(utilities);🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1 @@ | ||
| import "@bacons/text-decoder/install"; | ||
| import "expo-router/entry"; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,53 +1,7 @@ | ||
| const { getDefaultConfig } = require("expo/metro-config"); | ||
| // const { FileStore } = require("@expo/metro-config/file-store"); | ||
| const { withNativeWind } = require("nativewind/metro"); | ||
| const path = require("path"); | ||
| const { withNativewind } = require("nativewind/metro"); | ||
|
|
||
| module.exports = withTurborepoManagedCache( | ||
| withMonorepoPaths( | ||
| withNativeWind(getDefaultConfig(__dirname), { | ||
| input: "./app/styles.css", | ||
| configPath: "./tailwind.config.ts", | ||
| }), | ||
| ), | ||
| ); | ||
| const config = getDefaultConfig(__dirname); | ||
|
|
||
| /** | ||
| * Add the monorepo paths to the Metro config. | ||
| * This allows Metro to resolve modules from the monorepo. | ||
| * | ||
| * @see https://docs.expo.dev/guides/monorepos/#modify-the-metro-config | ||
| * @param {import('expo/metro-config').MetroConfig} config | ||
| * @returns {import('expo/metro-config').MetroConfig} | ||
| */ | ||
| function withMonorepoPaths(config) { | ||
| const projectRoot = __dirname; | ||
| const workspaceRoot = path.resolve(projectRoot, "../.."); | ||
|
|
||
| // #1 - Watch all files in the monorepo | ||
| config.watchFolders = [workspaceRoot]; | ||
|
|
||
| // #2 - Resolve modules within the project's `node_modules` first, then all monorepo modules | ||
| config.resolver.nodeModulesPaths = [ | ||
| path.resolve(projectRoot, "node_modules"), | ||
| path.resolve(workspaceRoot, "node_modules"), | ||
| ]; | ||
|
|
||
| return config; | ||
| } | ||
|
|
||
| /** | ||
| * Move the Metro cache to the `node_modules/.cache/metro` folder. | ||
| * This repository configured Turborepo to use this cache location as well. | ||
| * If you have any environment variables, you can configure Turborepo to invalidate it when needed. | ||
| * | ||
| * @see https://turbo.build/repo/docs/reference/configuration#env | ||
| * @param {import('expo/metro-config').MetroConfig} config | ||
| * @returns {import('expo/metro-config').MetroConfig} | ||
| */ | ||
| function withTurborepoManagedCache(config) { | ||
| // config.cacheStores = [ | ||
| // new FileStore({ root: path.join(__dirname, "node_modules/.cache/metro") }), | ||
| // ]; | ||
| return config; | ||
| } | ||
| /** @type {import('expo/metro-config').MetroConfig} */ | ||
| module.exports = withNativewind(config); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,3 @@ | ||
| /// <reference types="nativewind/types" /> | ||
| /// <reference types="react-native-css/types" /> | ||
|
|
||
| // NOTE: This file should not be edited and should be committed with your source code. It is generated by react-native-css. If you need to move or disable this file, please see the documentation. |
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.
🧩 Analysis chain
🏁 Script executed:
Repository: pingdotgg/uploadthing
Length of output: 1978
🏁 Script executed:
Repository: pingdotgg/uploadthing
Length of output: 237
Add React Compiler Babel plugin to support
reactCompilerexperiment.The
reactCompilerflag inexperimentsrequires thebabel-plugin-react-compilerBabel plugin to actually compile. The currentbabel.config.jsonly includesreact-native-reanimated/pluginand is missing the React Compiler plugin configuration. Without it, thereactCompilerflag will have no effect. Add the plugin tobabel.config.js:The other flags (
tsconfigPaths,typedRoutes,reactCanary) are compatible with Expo 54 and React 19.1.4.🤖 Prompt for AI Agents