From 089220341a6d3290f4151bb4c605ed2a5d6b4a90 Mon Sep 17 00:00:00 2001 From: natew Date: Tue, 15 Oct 2024 05:01:03 +0900 Subject: [PATCH 1/3] rename to testflight + fix background not updating as fast --- .../.env.default | 0 .../.gitignore | 0 .../README.md | 0 .../app.json | 0 .../app/(feed)/_layout.tsx | 0 .../app/(feed)/index.tsx | 5 +- .../app/(feed)/post/[id]+ssr.tsx | 0 .../app/_layout.css | 0 .../app/_layout.tsx | 0 .../app/api/authentication+api.tsx | 0 .../app/notifications+spa.tsx | 0 .../app/profile.tsx | 0 .../assets/app-icon.png | Bin .../assets/splash.png | Bin .../biome.json | 0 .../code/brand/Logo.tsx | 0 .../code/brand/one-ball.png | Bin .../code/data.ts | 0 .../code/db/connection.ts | 0 .../code/db/drizzle.config.ts | 0 .../migrations/0000_clean_justin_hammer.sql | 0 .../code/db/migrations/0000_tiny_joseph.sql | 0 .../db/migrations/meta/0000_snapshot.json | 0 .../code/db/migrations/meta/_journal.json | 0 .../code/db/run-migrations.ts | 0 .../code/db/schema.ts | 0 .../code/db/seed.ts | 0 .../code/feed/FeedCard.tsx | 0 .../code/home/HomeIcons.tsx | 0 .../code/home/HomeLayout.native.tsx | 0 .../code/home/HomeLayout.tsx | 0 .../code/notifications/NotificationCard.tsx | 0 .../code/notifications/data.ts | 0 .../code/styles/base.css | 0 .../code/styles/tamagui.css | 0 .../code/theme/ToggleThemeButton.tsx | 0 .../code/ui/Card.tsx | 0 .../code/ui/Image.tsx | 0 .../code/ui/PageContainer.tsx | 1 + .../config/tamagui.config.ts | 0 .../docker-compose.yml | 0 .../package.json | 2 +- .../public/app-icon.png | Bin .../public/favicon.svg | 0 .../public/splash.png | Bin .../public/tamagui.css | 0 .../react-native.config.cjs | 0 .../routes.d.ts | 0 .../tsconfig.json | 0 .../vite.config.ts | 0 package.json | 9 +-- scripts/dev.ts | 19 +++++ yarn.lock | 66 +++++++++--------- 53 files changed, 57 insertions(+), 45 deletions(-) rename examples/{one-testflight-demo => testflight}/.env.default (100%) rename examples/{one-testflight-demo => testflight}/.gitignore (100%) rename examples/{one-testflight-demo => testflight}/README.md (100%) rename examples/{one-testflight-demo => testflight}/app.json (100%) rename examples/{one-testflight-demo => testflight}/app/(feed)/_layout.tsx (100%) rename examples/{one-testflight-demo => testflight}/app/(feed)/index.tsx (74%) rename examples/{one-testflight-demo => testflight}/app/(feed)/post/[id]+ssr.tsx (100%) rename examples/{one-testflight-demo => testflight}/app/_layout.css (100%) rename examples/{one-testflight-demo => testflight}/app/_layout.tsx (100%) rename examples/{one-testflight-demo => testflight}/app/api/authentication+api.tsx (100%) rename examples/{one-testflight-demo => testflight}/app/notifications+spa.tsx (100%) rename examples/{one-testflight-demo => testflight}/app/profile.tsx (100%) rename examples/{one-testflight-demo => testflight}/assets/app-icon.png (100%) rename examples/{one-testflight-demo => testflight}/assets/splash.png (100%) rename examples/{one-testflight-demo => testflight}/biome.json (100%) rename examples/{one-testflight-demo => testflight}/code/brand/Logo.tsx (100%) rename examples/{one-testflight-demo => testflight}/code/brand/one-ball.png (100%) rename examples/{one-testflight-demo => testflight}/code/data.ts (100%) rename examples/{one-testflight-demo => testflight}/code/db/connection.ts (100%) rename examples/{one-testflight-demo => testflight}/code/db/drizzle.config.ts (100%) rename examples/{one-testflight-demo => testflight}/code/db/migrations/0000_clean_justin_hammer.sql (100%) rename examples/{one-testflight-demo => testflight}/code/db/migrations/0000_tiny_joseph.sql (100%) rename examples/{one-testflight-demo => testflight}/code/db/migrations/meta/0000_snapshot.json (100%) rename examples/{one-testflight-demo => testflight}/code/db/migrations/meta/_journal.json (100%) rename examples/{one-testflight-demo => testflight}/code/db/run-migrations.ts (100%) rename examples/{one-testflight-demo => testflight}/code/db/schema.ts (100%) rename examples/{one-testflight-demo => testflight}/code/db/seed.ts (100%) rename examples/{one-testflight-demo => testflight}/code/feed/FeedCard.tsx (100%) rename examples/{one-testflight-demo => testflight}/code/home/HomeIcons.tsx (100%) rename examples/{one-testflight-demo => testflight}/code/home/HomeLayout.native.tsx (100%) rename examples/{one-testflight-demo => testflight}/code/home/HomeLayout.tsx (100%) rename examples/{one-testflight-demo => testflight}/code/notifications/NotificationCard.tsx (100%) rename examples/{one-testflight-demo => testflight}/code/notifications/data.ts (100%) rename examples/{one-testflight-demo => testflight}/code/styles/base.css (100%) rename examples/{one-testflight-demo => testflight}/code/styles/tamagui.css (100%) rename examples/{one-testflight-demo => testflight}/code/theme/ToggleThemeButton.tsx (100%) rename examples/{one-testflight-demo => testflight}/code/ui/Card.tsx (100%) rename examples/{one-testflight-demo => testflight}/code/ui/Image.tsx (100%) rename examples/{one-testflight-demo => testflight}/code/ui/PageContainer.tsx (90%) rename examples/{one-testflight-demo => testflight}/config/tamagui.config.ts (100%) rename examples/{one-testflight-demo => testflight}/docker-compose.yml (100%) rename examples/{one-testflight-demo => testflight}/package.json (97%) rename examples/{one-testflight-demo => testflight}/public/app-icon.png (100%) rename examples/{one-testflight-demo => testflight}/public/favicon.svg (100%) rename examples/{one-testflight-demo => testflight}/public/splash.png (100%) rename examples/{one-testflight-demo => testflight}/public/tamagui.css (100%) rename examples/{one-testflight-demo => testflight}/react-native.config.cjs (100%) rename examples/{one-testflight-demo => testflight}/routes.d.ts (100%) rename examples/{one-testflight-demo => testflight}/tsconfig.json (100%) rename examples/{one-testflight-demo => testflight}/vite.config.ts (100%) create mode 100644 scripts/dev.ts diff --git a/examples/one-testflight-demo/.env.default b/examples/testflight/.env.default similarity index 100% rename from examples/one-testflight-demo/.env.default rename to examples/testflight/.env.default diff --git a/examples/one-testflight-demo/.gitignore b/examples/testflight/.gitignore similarity index 100% rename from examples/one-testflight-demo/.gitignore rename to examples/testflight/.gitignore diff --git a/examples/one-testflight-demo/README.md b/examples/testflight/README.md similarity index 100% rename from examples/one-testflight-demo/README.md rename to examples/testflight/README.md diff --git a/examples/one-testflight-demo/app.json b/examples/testflight/app.json similarity index 100% rename from examples/one-testflight-demo/app.json rename to examples/testflight/app.json diff --git a/examples/one-testflight-demo/app/(feed)/_layout.tsx b/examples/testflight/app/(feed)/_layout.tsx similarity index 100% rename from examples/one-testflight-demo/app/(feed)/_layout.tsx rename to examples/testflight/app/(feed)/_layout.tsx diff --git a/examples/one-testflight-demo/app/(feed)/index.tsx b/examples/testflight/app/(feed)/index.tsx similarity index 74% rename from examples/one-testflight-demo/app/(feed)/index.tsx rename to examples/testflight/app/(feed)/index.tsx index 0968389bd..8722c7d9b 100644 --- a/examples/one-testflight-demo/app/(feed)/index.tsx +++ b/examples/testflight/app/(feed)/index.tsx @@ -1,9 +1,6 @@ -import { desc, eq, sql } from 'drizzle-orm' -import { getURL, Stack, useLoader, type LoaderProps } from 'one' +import { Stack } from 'one' import { RefreshControl } from 'react-native' import { ScrollView } from 'tamagui' -import { db } from '~/code/db/connection' -import { likes, posts, replies, reposts, users } from '~/code/db/schema' import { FeedCard } from '~/code/feed/FeedCard' import { PageContainer } from '~/code/ui/PageContainer' diff --git a/examples/one-testflight-demo/app/(feed)/post/[id]+ssr.tsx b/examples/testflight/app/(feed)/post/[id]+ssr.tsx similarity index 100% rename from examples/one-testflight-demo/app/(feed)/post/[id]+ssr.tsx rename to examples/testflight/app/(feed)/post/[id]+ssr.tsx diff --git a/examples/one-testflight-demo/app/_layout.css b/examples/testflight/app/_layout.css similarity index 100% rename from examples/one-testflight-demo/app/_layout.css rename to examples/testflight/app/_layout.css diff --git a/examples/one-testflight-demo/app/_layout.tsx b/examples/testflight/app/_layout.tsx similarity index 100% rename from examples/one-testflight-demo/app/_layout.tsx rename to examples/testflight/app/_layout.tsx diff --git a/examples/one-testflight-demo/app/api/authentication+api.tsx b/examples/testflight/app/api/authentication+api.tsx similarity index 100% rename from examples/one-testflight-demo/app/api/authentication+api.tsx rename to examples/testflight/app/api/authentication+api.tsx diff --git a/examples/one-testflight-demo/app/notifications+spa.tsx b/examples/testflight/app/notifications+spa.tsx similarity index 100% rename from examples/one-testflight-demo/app/notifications+spa.tsx rename to examples/testflight/app/notifications+spa.tsx diff --git a/examples/one-testflight-demo/app/profile.tsx b/examples/testflight/app/profile.tsx similarity index 100% rename from examples/one-testflight-demo/app/profile.tsx rename to examples/testflight/app/profile.tsx diff --git a/examples/one-testflight-demo/assets/app-icon.png b/examples/testflight/assets/app-icon.png similarity index 100% rename from examples/one-testflight-demo/assets/app-icon.png rename to examples/testflight/assets/app-icon.png diff --git a/examples/one-testflight-demo/assets/splash.png b/examples/testflight/assets/splash.png similarity index 100% rename from examples/one-testflight-demo/assets/splash.png rename to examples/testflight/assets/splash.png diff --git a/examples/one-testflight-demo/biome.json b/examples/testflight/biome.json similarity index 100% rename from examples/one-testflight-demo/biome.json rename to examples/testflight/biome.json diff --git a/examples/one-testflight-demo/code/brand/Logo.tsx b/examples/testflight/code/brand/Logo.tsx similarity index 100% rename from examples/one-testflight-demo/code/brand/Logo.tsx rename to examples/testflight/code/brand/Logo.tsx diff --git a/examples/one-testflight-demo/code/brand/one-ball.png b/examples/testflight/code/brand/one-ball.png similarity index 100% rename from examples/one-testflight-demo/code/brand/one-ball.png rename to examples/testflight/code/brand/one-ball.png diff --git a/examples/one-testflight-demo/code/data.ts b/examples/testflight/code/data.ts similarity index 100% rename from examples/one-testflight-demo/code/data.ts rename to examples/testflight/code/data.ts diff --git a/examples/one-testflight-demo/code/db/connection.ts b/examples/testflight/code/db/connection.ts similarity index 100% rename from examples/one-testflight-demo/code/db/connection.ts rename to examples/testflight/code/db/connection.ts diff --git a/examples/one-testflight-demo/code/db/drizzle.config.ts b/examples/testflight/code/db/drizzle.config.ts similarity index 100% rename from examples/one-testflight-demo/code/db/drizzle.config.ts rename to examples/testflight/code/db/drizzle.config.ts diff --git a/examples/one-testflight-demo/code/db/migrations/0000_clean_justin_hammer.sql b/examples/testflight/code/db/migrations/0000_clean_justin_hammer.sql similarity index 100% rename from examples/one-testflight-demo/code/db/migrations/0000_clean_justin_hammer.sql rename to examples/testflight/code/db/migrations/0000_clean_justin_hammer.sql diff --git a/examples/one-testflight-demo/code/db/migrations/0000_tiny_joseph.sql b/examples/testflight/code/db/migrations/0000_tiny_joseph.sql similarity index 100% rename from examples/one-testflight-demo/code/db/migrations/0000_tiny_joseph.sql rename to examples/testflight/code/db/migrations/0000_tiny_joseph.sql diff --git a/examples/one-testflight-demo/code/db/migrations/meta/0000_snapshot.json b/examples/testflight/code/db/migrations/meta/0000_snapshot.json similarity index 100% rename from examples/one-testflight-demo/code/db/migrations/meta/0000_snapshot.json rename to examples/testflight/code/db/migrations/meta/0000_snapshot.json diff --git a/examples/one-testflight-demo/code/db/migrations/meta/_journal.json b/examples/testflight/code/db/migrations/meta/_journal.json similarity index 100% rename from examples/one-testflight-demo/code/db/migrations/meta/_journal.json rename to examples/testflight/code/db/migrations/meta/_journal.json diff --git a/examples/one-testflight-demo/code/db/run-migrations.ts b/examples/testflight/code/db/run-migrations.ts similarity index 100% rename from examples/one-testflight-demo/code/db/run-migrations.ts rename to examples/testflight/code/db/run-migrations.ts diff --git a/examples/one-testflight-demo/code/db/schema.ts b/examples/testflight/code/db/schema.ts similarity index 100% rename from examples/one-testflight-demo/code/db/schema.ts rename to examples/testflight/code/db/schema.ts diff --git a/examples/one-testflight-demo/code/db/seed.ts b/examples/testflight/code/db/seed.ts similarity index 100% rename from examples/one-testflight-demo/code/db/seed.ts rename to examples/testflight/code/db/seed.ts diff --git a/examples/one-testflight-demo/code/feed/FeedCard.tsx b/examples/testflight/code/feed/FeedCard.tsx similarity index 100% rename from examples/one-testflight-demo/code/feed/FeedCard.tsx rename to examples/testflight/code/feed/FeedCard.tsx diff --git a/examples/one-testflight-demo/code/home/HomeIcons.tsx b/examples/testflight/code/home/HomeIcons.tsx similarity index 100% rename from examples/one-testflight-demo/code/home/HomeIcons.tsx rename to examples/testflight/code/home/HomeIcons.tsx diff --git a/examples/one-testflight-demo/code/home/HomeLayout.native.tsx b/examples/testflight/code/home/HomeLayout.native.tsx similarity index 100% rename from examples/one-testflight-demo/code/home/HomeLayout.native.tsx rename to examples/testflight/code/home/HomeLayout.native.tsx diff --git a/examples/one-testflight-demo/code/home/HomeLayout.tsx b/examples/testflight/code/home/HomeLayout.tsx similarity index 100% rename from examples/one-testflight-demo/code/home/HomeLayout.tsx rename to examples/testflight/code/home/HomeLayout.tsx diff --git a/examples/one-testflight-demo/code/notifications/NotificationCard.tsx b/examples/testflight/code/notifications/NotificationCard.tsx similarity index 100% rename from examples/one-testflight-demo/code/notifications/NotificationCard.tsx rename to examples/testflight/code/notifications/NotificationCard.tsx diff --git a/examples/one-testflight-demo/code/notifications/data.ts b/examples/testflight/code/notifications/data.ts similarity index 100% rename from examples/one-testflight-demo/code/notifications/data.ts rename to examples/testflight/code/notifications/data.ts diff --git a/examples/one-testflight-demo/code/styles/base.css b/examples/testflight/code/styles/base.css similarity index 100% rename from examples/one-testflight-demo/code/styles/base.css rename to examples/testflight/code/styles/base.css diff --git a/examples/one-testflight-demo/code/styles/tamagui.css b/examples/testflight/code/styles/tamagui.css similarity index 100% rename from examples/one-testflight-demo/code/styles/tamagui.css rename to examples/testflight/code/styles/tamagui.css diff --git a/examples/one-testflight-demo/code/theme/ToggleThemeButton.tsx b/examples/testflight/code/theme/ToggleThemeButton.tsx similarity index 100% rename from examples/one-testflight-demo/code/theme/ToggleThemeButton.tsx rename to examples/testflight/code/theme/ToggleThemeButton.tsx diff --git a/examples/one-testflight-demo/code/ui/Card.tsx b/examples/testflight/code/ui/Card.tsx similarity index 100% rename from examples/one-testflight-demo/code/ui/Card.tsx rename to examples/testflight/code/ui/Card.tsx diff --git a/examples/one-testflight-demo/code/ui/Image.tsx b/examples/testflight/code/ui/Image.tsx similarity index 100% rename from examples/one-testflight-demo/code/ui/Image.tsx rename to examples/testflight/code/ui/Image.tsx diff --git a/examples/one-testflight-demo/code/ui/PageContainer.tsx b/examples/testflight/code/ui/PageContainer.tsx similarity index 90% rename from examples/one-testflight-demo/code/ui/PageContainer.tsx rename to examples/testflight/code/ui/PageContainer.tsx index 479179ca9..4109167b8 100644 --- a/examples/one-testflight-demo/code/ui/PageContainer.tsx +++ b/examples/testflight/code/ui/PageContainer.tsx @@ -4,6 +4,7 @@ export const PageContainer = styled(View, { w: '100%', maw: 600, mx: 'auto', + bg: '$color1', '$platform-web': { py: '$4', diff --git a/examples/one-testflight-demo/config/tamagui.config.ts b/examples/testflight/config/tamagui.config.ts similarity index 100% rename from examples/one-testflight-demo/config/tamagui.config.ts rename to examples/testflight/config/tamagui.config.ts diff --git a/examples/one-testflight-demo/docker-compose.yml b/examples/testflight/docker-compose.yml similarity index 100% rename from examples/one-testflight-demo/docker-compose.yml rename to examples/testflight/docker-compose.yml diff --git a/examples/one-testflight-demo/package.json b/examples/testflight/package.json similarity index 97% rename from examples/one-testflight-demo/package.json rename to examples/testflight/package.json index 558b8c1be..2294c5182 100644 --- a/examples/one-testflight-demo/package.json +++ b/examples/testflight/package.json @@ -1,5 +1,5 @@ { - "name": "example-recommended-appstore", + "name": "example-testflight", "version": "1.1.311", "private": true, "type": "module", diff --git a/examples/one-testflight-demo/public/app-icon.png b/examples/testflight/public/app-icon.png similarity index 100% rename from examples/one-testflight-demo/public/app-icon.png rename to examples/testflight/public/app-icon.png diff --git a/examples/one-testflight-demo/public/favicon.svg b/examples/testflight/public/favicon.svg similarity index 100% rename from examples/one-testflight-demo/public/favicon.svg rename to examples/testflight/public/favicon.svg diff --git a/examples/one-testflight-demo/public/splash.png b/examples/testflight/public/splash.png similarity index 100% rename from examples/one-testflight-demo/public/splash.png rename to examples/testflight/public/splash.png diff --git a/examples/one-testflight-demo/public/tamagui.css b/examples/testflight/public/tamagui.css similarity index 100% rename from examples/one-testflight-demo/public/tamagui.css rename to examples/testflight/public/tamagui.css diff --git a/examples/one-testflight-demo/react-native.config.cjs b/examples/testflight/react-native.config.cjs similarity index 100% rename from examples/one-testflight-demo/react-native.config.cjs rename to examples/testflight/react-native.config.cjs diff --git a/examples/one-testflight-demo/routes.d.ts b/examples/testflight/routes.d.ts similarity index 100% rename from examples/one-testflight-demo/routes.d.ts rename to examples/testflight/routes.d.ts diff --git a/examples/one-testflight-demo/tsconfig.json b/examples/testflight/tsconfig.json similarity index 100% rename from examples/one-testflight-demo/tsconfig.json rename to examples/testflight/tsconfig.json diff --git a/examples/one-testflight-demo/vite.config.ts b/examples/testflight/vite.config.ts similarity index 100% rename from examples/one-testflight-demo/vite.config.ts rename to examples/testflight/vite.config.ts diff --git a/package.json b/package.json index fb3927ebf..293007c98 100644 --- a/package.json +++ b/package.json @@ -31,13 +31,8 @@ "fix": "manypkg fix", "lint:fix": "ultra -r --no-pretty lint:fix", "lint": "ultra -r --no-pretty lint", - "dev:example-test": "yarn workspace example-test dev", - "dev:example-zero": "yarn workspace example-zero dev", - "dev:example-tamagui": "yarn workspace example-tamagui dev", - "dev:example-basic": "yarn workspace example-basic dev", - "dev:example-recommended": "yarn workspace example-recommended dev", - "dev:example-weird-deps": "yarn workspace example-weird-deps dev", - "dev:example-fullstack": "yarn workspace example-fullstack dev", + "dev:example": "node -r esbuild-register ./scripts/dev.ts example", + "dev:test": "node -r esbuild-register ./scripts/dev.ts test", "upgrade:tamagui": "yarn up '*tamagui*' '@tamagui/*'", "upgrade:tamagui:canary": "yarn up '*tamagui*'@canary '@tamagui/*'@canary", "test": "yarn turbo:run --concurrency=1 test", diff --git a/scripts/dev.ts b/scripts/dev.ts new file mode 100644 index 000000000..5aa562635 --- /dev/null +++ b/scripts/dev.ts @@ -0,0 +1,19 @@ +import { execSync } from 'node:child_process' + +const prefix = process.argv[2] // 'example' or 'test' +const workspace = process.argv[3] // The workspace name (e.g., 'basic', 'fullstack') + +if (!prefix || !workspace) { + console.error('Usage: yarn dev:example ') + console.error('Example: yarn dev:example example basic') + process.exit(1) +} + +try { + const command = `yarn workspace ${prefix}-${workspace} dev` + console.info(`Running: ${command}`) + execSync(command, { stdio: 'inherit' }) +} catch (error) { + console.error(`Failed to start workspace ${prefix}-${workspace}:`, error) + process.exit(1) +} diff --git a/yarn.lock b/yarn.lock index 5d9e96d5b..5a1278d78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11850,39 +11850,6 @@ __metadata: languageName: unknown linkType: soft -"example-recommended-appstore@workspace:examples/one-testflight-demo": - version: 0.0.0-use.local - resolution: "example-recommended-appstore@workspace:examples/one-testflight-demo" - dependencies: - "@biomejs/biome": "npm:^1.8.3" - "@dotenvx/dotenvx": "npm:^1.12.1" - "@faker-js/faker": "npm:next" - "@tamagui/config": "npm:^1.115.0" - "@tamagui/image-next": "npm:^1.115.0" - "@tamagui/lucide-icons": "npm:^1.115.0" - "@tamagui/vite-plugin": "npm:^1.115.0" - "@vxrn/color-scheme": "npm:1.1.311" - better-sqlite3: "npm:^11.2.1" - dotenv: "npm:^16.4.5" - drizzle-kit: "npm:^0.24.2" - drizzle-orm: "npm:^0.33.0" - expo: "npm:~51.0.28" - expo-modules-core: "npm:^1.12.24" - one: "npm:1.1.311" - postgres: "npm:^3.4.4" - react: "npm:^18.3.1" - react-native: "npm:0.74.5" - react-native-reanimated: "npm:~3.10.1" - react-native-safe-area-context: "npm:4.10.5" - react-native-screens: "npm:3.31.1" - react-native-svg: "npm:15.2.0" - react-native-web: "npm:^0.19.12" - tamagui: "npm:^1.115.0" - tsx: "npm:^4.19.0" - vite: "npm:6.0.0-beta.1" - languageName: unknown - linkType: soft - "example-recommended@workspace:examples/one-recommended": version: 0.0.0-use.local resolution: "example-recommended@workspace:examples/one-recommended" @@ -11999,6 +11966,39 @@ __metadata: languageName: unknown linkType: soft +"example-testflight@workspace:examples/testflight": + version: 0.0.0-use.local + resolution: "example-testflight@workspace:examples/testflight" + dependencies: + "@biomejs/biome": "npm:^1.8.3" + "@dotenvx/dotenvx": "npm:^1.12.1" + "@faker-js/faker": "npm:next" + "@tamagui/config": "npm:^1.115.0" + "@tamagui/image-next": "npm:^1.115.0" + "@tamagui/lucide-icons": "npm:^1.115.0" + "@tamagui/vite-plugin": "npm:^1.115.0" + "@vxrn/color-scheme": "npm:1.1.311" + better-sqlite3: "npm:^11.2.1" + dotenv: "npm:^16.4.5" + drizzle-kit: "npm:^0.24.2" + drizzle-orm: "npm:^0.33.0" + expo: "npm:~51.0.28" + expo-modules-core: "npm:^1.12.24" + one: "npm:1.1.311" + postgres: "npm:^3.4.4" + react: "npm:^18.3.1" + react-native: "npm:0.74.5" + react-native-reanimated: "npm:~3.10.1" + react-native-safe-area-context: "npm:4.10.5" + react-native-screens: "npm:3.31.1" + react-native-svg: "npm:15.2.0" + react-native-web: "npm:^0.19.12" + tamagui: "npm:^1.115.0" + tsx: "npm:^4.19.0" + vite: "npm:6.0.0-beta.1" + languageName: unknown + linkType: soft + "example-weird-deps@workspace:tests/weird-deps": version: 0.0.0-use.local resolution: "example-weird-deps@workspace:tests/weird-deps" From 0d754e1e33dde6c51c646e6aca29a36d71887180 Mon Sep 17 00:00:00 2001 From: natew Date: Tue, 15 Oct 2024 05:15:04 +0900 Subject: [PATCH 2/3] add bottom tabs - wip not building ios --- examples/testflight/app.json | 12 +++++- .../testflight/code/layouts/BottomTabs.tsx | 23 +++++++++++ examples/testflight/package.json | 2 + yarn.lock | 40 ++++++++++++++++++- 4 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 examples/testflight/code/layouts/BottomTabs.tsx diff --git a/examples/testflight/app.json b/examples/testflight/app.json index ee1b51b3b..18abb6947 100644 --- a/examples/testflight/app.json +++ b/examples/testflight/app.json @@ -10,7 +10,17 @@ }, "sdkVersion": "51.0.0", "platforms": ["ios", "android"], - "plugins": ["vxrn/expo-plugin"], + "plugins": [ + "vxrn/expo-plugin", + [ + "expo-build-properties", + { + "ios": { + "deploymentTarget": "14.0" + } + } + ] + ], "android": { "package": "dev.onestack.demo.social" }, diff --git a/examples/testflight/code/layouts/BottomTabs.tsx b/examples/testflight/code/layouts/BottomTabs.tsx new file mode 100644 index 000000000..1c1285a17 --- /dev/null +++ b/examples/testflight/code/layouts/BottomTabs.tsx @@ -0,0 +1,23 @@ +import { withLayoutContext } from 'one' +import { + createNativeBottomTabNavigator, + type NativeBottomTabNavigationEventMap, + NativeBottomTabNavigationOptions, + // @ts-ignore +} from 'react-native-bottom-tabs/react-navigation' + +// This should be imported from react-native-bottom-tabs/react-navigation which is +// exporting NativeBottomTabNavigationOptions but the types seem to be broken at +// at the moment.. +import type { BottomTabNavigationOptions } from '@react-navigation/bottom-tabs' + +import type { ParamListBase, TabNavigationState } from '@react-navigation/native' + +const { Navigator } = createNativeBottomTabNavigator() + +export const NativeTabs = withLayoutContext< + BottomTabNavigationOptions, + typeof Navigator, + TabNavigationState, + NativeBottomTabNavigationEventMap +>(Navigator) diff --git a/examples/testflight/package.json b/examples/testflight/package.json index 2294c5182..748eb2b79 100644 --- a/examples/testflight/package.json +++ b/examples/testflight/package.json @@ -33,11 +33,13 @@ "drizzle-kit": "^0.24.2", "drizzle-orm": "^0.33.0", "expo": "~51.0.28", + "expo-build-properties": "^0.12.5", "expo-modules-core": "^1.12.24", "one": "1.1.311", "postgres": "^3.4.4", "react": "^18.3.1", "react-native": "0.74.5", + "react-native-bottom-tabs": "^0.0.10", "react-native-reanimated": "~3.10.1", "react-native-safe-area-context": "4.10.5", "react-native-screens": "3.31.1", diff --git a/yarn.lock b/yarn.lock index 5a1278d78..1b17d8687 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8580,7 +8580,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^8.0.1": +"ajv@npm:^8.0.1, ajv@npm:^8.11.0": version: 8.17.1 resolution: "ajv@npm:8.17.1" dependencies: @@ -11983,11 +11983,13 @@ __metadata: drizzle-kit: "npm:^0.24.2" drizzle-orm: "npm:^0.33.0" expo: "npm:~51.0.28" + expo-build-properties: "npm:^0.12.5" expo-modules-core: "npm:^1.12.24" one: "npm:1.1.311" postgres: "npm:^3.4.4" react: "npm:^18.3.1" react-native: "npm:0.74.5" + react-native-bottom-tabs: "npm:^0.0.10" react-native-reanimated: "npm:~3.10.1" react-native-safe-area-context: "npm:4.10.5" react-native-screens: "npm:3.31.1" @@ -12099,6 +12101,18 @@ __metadata: languageName: unknown linkType: soft +"expo-build-properties@npm:^0.12.5": + version: 0.12.5 + resolution: "expo-build-properties@npm:0.12.5" + dependencies: + ajv: "npm:^8.11.0" + semver: "npm:^7.6.0" + peerDependencies: + expo: "*" + checksum: 10/22a1c3fbe6ef00efe13976612766c665390df033d84203bb8d8133fec5d9291be333341119f35b4f5e60932b5829e9ac10c7aaa1a28cbfb5fa689b1b7917229a + languageName: node + linkType: hard + "expo-camera@npm:^15.0.16": version: 15.0.16 resolution: "expo-camera@npm:15.0.16" @@ -18040,6 +18054,23 @@ __metadata: languageName: node linkType: hard +"react-native-bottom-tabs@npm:^0.0.10": + version: 0.0.10 + resolution: "react-native-bottom-tabs@npm:0.0.10" + dependencies: + sf-symbols-typescript: "npm:^2.0.0" + use-latest-callback: "npm:^0.2.1" + peerDependencies: + "@react-navigation/native": ">=6" + react: "*" + react-native: "*" + peerDependenciesMeta: + "@react-navigation/native": + optional: true + checksum: 10/81d0d365d330036649a7d35bfd13bbda06359e4d7acf63b031d826f85d211ff4b6d84fee798d53adc996d54b2a0514b9a3436793dd1b743d7e051d0ee5b313ff + languageName: node + linkType: hard + "react-native-gesture-handler@npm:^2.18.1": version: 2.19.0 resolution: "react-native-gesture-handler@npm:2.19.0" @@ -19279,6 +19310,13 @@ __metadata: languageName: node linkType: hard +"sf-symbols-typescript@npm:^2.0.0": + version: 2.0.0 + resolution: "sf-symbols-typescript@npm:2.0.0" + checksum: 10/dde81c01265bdff16f527e1242af03793460c3c5f34ca6950ab1ca73a3bccd54ebabfcd56961658e72f94baac06ad620134a0bc03b0674dd543d4883c7d5e18f + languageName: node + linkType: hard + "shallow-clone@npm:^3.0.0": version: 3.0.1 resolution: "shallow-clone@npm:3.0.1" From d804a973877536d72e133142952d62561e31bbfe Mon Sep 17 00:00:00 2001 From: natew Date: Tue, 15 Oct 2024 06:35:31 +0900 Subject: [PATCH 3/3] fix resolve for now --- .../testflight/code/home/HomeLayout.native.tsx | 12 ++++++------ examples/testflight/vite.config.ts | 16 ++++++++++++++-- packages/one/src/vite.ts | 1 + packages/one/types/vite.d.ts | 1 + packages/resolve/tsconfig.json | 1 + 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/examples/testflight/code/home/HomeLayout.native.tsx b/examples/testflight/code/home/HomeLayout.native.tsx index d16b192d9..d5953144d 100644 --- a/examples/testflight/code/home/HomeLayout.native.tsx +++ b/examples/testflight/code/home/HomeLayout.native.tsx @@ -1,4 +1,4 @@ -import { Tabs } from 'one' +import { NativeTabs } from '../layouts/BottomTabs' import { HomeIcons } from './HomeIcons' import { useTheme } from 'tamagui' @@ -6,14 +6,14 @@ export function HomeLayout() { const theme = useTheme() return ( - - - - , }} /> - + ) } diff --git a/examples/testflight/vite.config.ts b/examples/testflight/vite.config.ts index 2a2d29cc5..7dd87bcef 100644 --- a/examples/testflight/vite.config.ts +++ b/examples/testflight/vite.config.ts @@ -1,8 +1,20 @@ -import type { UserConfig } from 'vite' -import { one } from 'one/vite' import { tamaguiPlugin } from '@tamagui/vite-plugin' +import { join } from 'node:path' +import { one } from 'one/vite' +import type { UserConfig } from 'vite' + +const rnbtp = join( + import.meta.dirname, + 'node_modules/react-native-bottom-tabs/lib/module/react-navigation/index.js' +) export default { + resolve: { + alias: { + 'react-native-bottom-tabs/react-navigation': rnbtp, + }, + }, + plugins: [ one({ web: { diff --git a/packages/one/src/vite.ts b/packages/one/src/vite.ts index 04e8c08a8..db38e72f1 100644 --- a/packages/one/src/vite.ts +++ b/packages/one/src/vite.ts @@ -9,3 +9,4 @@ export { setCurrentRequestHeaders } from './vite/headers' export { build } from './vite/build' export { one } from './vite/one' +export { resolvePath } from '@vxrn/resolve' diff --git a/packages/one/types/vite.d.ts b/packages/one/types/vite.d.ts index e3a49c779..2d943bc2c 100644 --- a/packages/one/types/vite.d.ts +++ b/packages/one/types/vite.d.ts @@ -6,4 +6,5 @@ export { makePluginWebOnly } from './vite/makePluginWebOnly'; export { setCurrentRequestHeaders } from './vite/headers'; export { build } from './vite/build'; export { one } from './vite/one'; +export { resolvePath } from '@vxrn/resolve'; //# sourceMappingURL=vite.d.ts.map \ No newline at end of file diff --git a/packages/resolve/tsconfig.json b/packages/resolve/tsconfig.json index 6b74372c1..b8edcd6c4 100644 --- a/packages/resolve/tsconfig.json +++ b/packages/resolve/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": { + "module": "ES2022", "composite": true, }, "references": []