Skip to content
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

Feature: Update packages & run app and pages directories in parallel #23

Merged
merged 7 commits into from
May 29, 2024

Conversation

jonsherrard
Copy link
Contributor

@jonsherrard jonsherrard commented Apr 26, 2024

Addresses some of the concerns in tamagui/tamagui#2589

  • Updates to latest Next 14

  • Updates to Solito 4

  • Updates packages in general

  • Runs App Directory Routes AND Pages Directory routes in parallel

  • Crucially switches to using app directory as the default

├── apps
│   ├── next
│       ├── app
│       │   ├── TamaguiProvider.tsx
│       │   ├── layout.tsx
│       │   ├── page.tsx # Root /
│       │   └── user
│       │       └── [id]
│       │           └── page.tsx # /user/nate
│       ├── pages
│       │   ├── _app.tsx
│       │   ├── _document.tsx
│       │   ├── pages-example
│       │   │   └── index.tsx # /pages-example
│       │   └── pages-example-user
│       │       └── [id].tsx # /pages-example-user/nate
│       ├── tsconfig.json
│       ├── types.d.tsA
│       ├── next-env.d.ts
│       ├── package.json
│       └── vercel.json
├── package.json

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@babel/plugin-syntax-flow@7.24.1 None 0 5.42 kB nicolo-ribaudo
npm/@babel/plugin-transform-block-scoped-functions@7.24.1 None 0 6.55 kB nicolo-ribaudo
npm/@babel/plugin-transform-destructuring@7.24.1 None 0 81.9 kB nicolo-ribaudo
npm/@babel/plugin-transform-export-namespace-from@7.24.1 None 0 8.19 kB nicolo-ribaudo
npm/@babel/plugin-transform-flow-strip-types@7.24.1 None 0 17.7 kB nicolo-ribaudo
npm/@babel/plugin-transform-for-of@7.24.1 None 0 44.7 kB nicolo-ribaudo
npm/@babel/plugin-transform-member-expression-literals@7.24.1 None 0 4.94 kB nicolo-ribaudo
npm/@babel/plugin-transform-object-rest-spread@7.24.1 None 0 72.8 kB nicolo-ribaudo
npm/@babel/plugin-transform-object-super@7.24.1 None 0 9.23 kB nicolo-ribaudo
npm/@babel/plugin-transform-private-methods@7.24.1 None +2 443 kB nicolo-ribaudo
npm/@babel/plugin-transform-private-property-in-object@7.24.1 None 0 20 kB nicolo-ribaudo
npm/@babel/plugin-transform-property-literals@7.24.1 None 0 4.72 kB nicolo-ribaudo
npm/@babel/plugin-transform-template-literals@7.24.1 None 0 15.9 kB nicolo-ribaudo
npm/@babel/preset-react@7.24.1 None +2 33 kB nicolo-ribaudo
npm/@cspotcode/source-map-support@0.8.1 filesystem +1 194 kB cspotcode
npm/@edge-runtime/format@2.2.1 None 0 50.7 kB kikobeats
npm/@edge-runtime/node-utils@2.3.0 eval, unsafe 0 1.46 MB kikobeats
npm/@edge-runtime/ponyfill@2.4.2 network 0 19.2 kB kikobeats
npm/@edge-runtime/primitives@4.1.0 eval, unsafe 0 751 kB kikobeats
npm/@edge-runtime/vm@3.2.0 eval, unsafe 0 61.8 kB kikobeats
npm/@eslint/eslintrc@3.0.2 filesystem, unsafe 0 668 kB eslintbot
npm/@eslint/js@9.1.1 None 0 14.3 kB eslintbot
npm/@humanwhocodes/config-array@0.13.0 None 0 58.4 kB nzakas
npm/@humanwhocodes/retry@0.2.3 None 0 40.1 kB nzakas
npm/@isaacs/cliui@8.0.2 None +1 76.1 kB isaacs
npm/@manypkg/cli@0.21.4 environment, filesystem 0 186 kB manypkg-release-bot
npm/@manypkg/find-root@2.2.1 environment, filesystem 0 25.8 kB manypkg-release-bot
npm/@manypkg/get-packages@2.2.1 environment 0 21.4 kB manypkg-release-bot
npm/@manypkg/tools@1.1.0 environment, filesystem 0 69.6 kB manypkg-release-bot
npm/@npmcli/agent@2.2.2 environment, network 0 17.7 kB npm-cli-ops
npm/@npmcli/fs@3.1.0 filesystem 0 26.5 kB lukekarrys
npm/@pkgjs/parseargs@0.11.0 None 0 74.2 kB oss-bot
npm/@pnpm/config.env-replace@1.1.0 None 0 15.2 kB zkochan
npm/@pnpm/network.ca-file@1.0.2 Transitive: environment, filesystem +1 45.5 kB zkochan
npm/@pnpm/npm-conf@2.2.2 environment, filesystem 0 28.3 kB zkochan
npm/@sindresorhus/is@5.6.0 None 0 61.3 kB sindresorhus
npm/@szmarczak/http-timer@5.0.1 None 0 10.2 kB szmarczak
npm/@types/http-cache-semantics@4.0.4 None 0 9.28 kB types
npm/abbrev@2.0.0 None 0 4.83 kB lukekarrys
npm/agent-base@7.1.1 network 0 31.2 kB tootallnate
npm/ansi-regex@6.0.1 None 0 5.67 kB qix
npm/cacache@18.0.2 filesystem +1 521 kB npm-cli-ops
npm/cacheable-lookup@7.0.0 None 0 25.2 kB sindresorhus
npm/cacheable-request@10.2.14 None 0 69.1 kB jaredwray
npm/check-dependency-version-consistency@4.1.0 None +2 126 kB bmishkin
npm/commander@10.0.1 environment, filesystem, shell 0 174 kB abetomo
npm/config-chain@1.1.13 environment, filesystem, network 0 15 kB isaacs
npm/decompress-response@6.0.0 None +1 11.5 kB sindresorhus
npm/defer-to-connect@2.0.1 None 0 5.44 kB szmarczak
npm/eastasianwidth@0.2.0 None 0 13.6 kB komagata
npm/eslint-scope@8.0.1 None 0 148 kB eslintbot
npm/eslint-visitor-keys@4.0.0 None 0 32.3 kB eslintbot
npm/eslint@9.1.1 environment, filesystem +3 3.11 MB eslintbot
npm/espree@10.0.1 None 0 73.6 kB eslintbot
npm/file-entry-cache@8.0.0 filesystem 0 16 kB jaredwray
npm/flat-cache@4.0.1 filesystem 0 29.3 kB jaredwray
npm/foreground-child@3.1.1 shell 0 60.4 kB isaacs
npm/form-data-encoder@2.1.4 None 0 37.6 kB octetstream
npm/fs-minipass@3.0.3 filesystem 0 14.4 kB npm-cli-ops
npm/get-stream@6.0.1 None 0 12.2 kB sindresorhus
npm/glob@10.3.12 Transitive: environment +1 895 kB isaacs
npm/globals@14.0.0 None 0 117 kB sindresorhus
npm/got@12.6.1 None 0 248 kB sindresorhus
npm/http-proxy-agent@7.0.2 network 0 23.3 kB tootallnate
npm/http2-wrapper@2.2.1 network 0 75.9 kB szmarczak
npm/https-proxy-agent@7.0.4 network 0 35.3 kB tootallnate
npm/isexe@3.1.1 environment, filesystem 0 43 kB isaacs
npm/jackspeak@2.3.6 environment 0 253 kB isaacs
npm/jju@1.4.0 filesystem 0 70.4 kB rlidwka
npm/lowercase-keys@3.0.0 None 0 3.32 kB sindresorhus
npm/make-fetch-happen@13.0.0 network 0 52.5 kB npm-cli-ops
npm/mimic-response@4.0.0 None 0 6.2 kB sindresorhus
npm/minipass-collect@2.0.1 None 0 4.96 kB isaacs
npm/minipass-fetch@3.0.4 environment, network 0 46.8 kB npm-cli-ops
npm/node-gyp@10.1.0 environment, shell +2 1.83 MB lukekarrys
npm/nopt@7.2.0 None 0 26.1 kB npm-cli-ops
npm/normalize-url@8.0.1 None 0 25.9 kB sindresorhus
npm/object-assign@4.1.1 None 0 5.49 kB sindresorhus
npm/p-cancelable@3.0.0 None 0 13.4 kB sindresorhus
npm/package-json@8.1.1 None 0 12.9 kB sindresorhus
npm/path-scurry@1.10.2 filesystem 0 533 kB isaacs
npm/prettier@3.2.5 environment, filesystem, unsafe 0 8.39 MB prettier-bot
npm/proc-log@3.0.0 None 0 5.21 kB lukekarrys
npm/proto-list@1.2.4 None 0 4.86 kB isaacs
npm/quick-lru@5.1.1 None 0 8.64 kB sindresorhus
npm/registry-auth-token@5.0.2 environment 0 15.1 kB rexxars
npm/registry-url@6.0.1 None 0 4.29 kB sindresorhus
npm/resolve-alpn@1.2.1 network 0 4.64 kB szmarczak
npm/responselike@3.0.0 None 0 5.55 kB sindresorhus
npm/signal-exit@4.1.0 None 0 77 kB isaacs
npm/socks-proxy-agent@8.0.3 network 0 25.1 kB tootallnate
npm/ssri@10.0.5 None 0 38.7 kB npm-cli-ops
npm/string-width@5.1.2 None +1 10.1 kB sindresorhus
npm/tr46@0.0.3 None 0 268 kB sebmaster
npm/tslib@2.6.2 None 0 84 kB typescript-bot
npm/type-fest@3.13.1 None 0 274 kB sindresorhus
npm/unique-filename@3.0.0 None 0 3.41 kB lukekarrys
npm/unique-slug@4.0.0 None 0 2.58 kB lukekarrys
npm/webidl-conversions@3.0.1 None 0 12.4 kB sebmaster
npm/wrap-ansi@8.1.0 None +1 29.3 kB sindresorhus

🚮 Removed packages: npm/@babel/plugin-syntax-flow@7.21.4, npm/@babel/plugin-syntax-jsx@7.21.4, npm/@babel/plugin-transform-block-scoped-functions@7.18.6, npm/@babel/plugin-transform-destructuring@7.21.3, npm/@babel/plugin-transform-flow-strip-types@7.21.0, npm/@babel/plugin-transform-for-of@7.21.0, npm/@babel/plugin-transform-member-expression-literals@7.18.6, npm/@babel/plugin-transform-object-super@7.18.6, npm/@babel/plugin-transform-property-literals@7.18.6, npm/@babel/plugin-transform-template-literals@7.18.9, npm/@babel/preset-react@7.23.3, npm/@bacons/react-views@1.1.3, npm/@changesets/types@4.1.0, npm/@eslint/eslintrc@2.1.4, npm/@jest/create-cache-key-function@29.7.0, npm/@manypkg/cli@0.19.2, npm/@manypkg/find-root@1.1.0, npm/@manypkg/get-packages@1.1.3, npm/@npmcli/fs@2.1.2, npm/@npmcli/move-file@2.0.1, npm/@react-native-community/cli-platform-android@13.5.1, npm/@react-native-community/cli-platform-ios@13.5.1, npm/@react-native-community/cli@13.5.1, npm/@react-native/assets-registry@0.74.0, npm/@sindresorhus/is@0.14.0, npm/@szmarczak/http-timer@1.1.2, npm/@tootallnate/once@2.0.0, npm/@types/node@12.20.55, npm/@types/node@18.19.31, npm/agentkeepalive@4.5.0, npm/are-we-there-yet@3.0.1, npm/cacache@16.1.3, npm/cacheable-request@6.1.0, npm/check-dependency-version-consistency@3.3.0, npm/clone-response@1.0.3, npm/decompress-response@3.3.0, npm/defer-to-connect@1.1.3, npm/duplexer3@0.1.5, npm/end-of-stream@1.4.4, npm/eslint@8.57.0, npm/espree@9.6.1, npm/file-entry-cache@6.0.1, npm/flat-cache@3.2.0, npm/gauge@4.0.4, npm/get-stream@4.1.0, npm/globals@13.24.0, npm/got@9.6.0, npm/http-proxy-agent@5.0.0, npm/https-proxy-agent@5.0.1, npm/humanize-ms@1.2.1, npm/inflight@1.0.6, npm/lowercase-keys@1.0.1, npm/make-fetch-happen@10.2.1, npm/mimic-response@1.0.1, npm/minipass-collect@1.0.2, npm/minipass-fetch@2.1.2, npm/node-gyp@9.4.1, npm/nopt@6.0.0, npm/normalize-url@4.5.1, npm/npmlog@6.0.2, npm/once@1.4.0, npm/p-cancelable@1.1.0, npm/package-json@6.5.0, npm/prepend-http@2.0.0, npm/prettier@2.8.8, npm/pump@3.0.0, npm/react-native@1000.0.0, npm/readable-stream@3.6.2, npm/registry-auth-token@4.2.2, npm/registry-url@5.1.0, npm/responselike@1.0.2, npm/rimraf@3.0.2, npm/socks-proxy-agent@7.0.0, npm/ssri@9.0.1, npm/string_decoder@1.3.0, npm/to-readable-stream@1.0.0, npm/turbo@1.10.3, npm/type-fest@2.19.0, npm/unique-filename@2.0.1, npm/unique-slug@3.0.0, npm/url-parse-lax@3.0.0, npm/wide-align@1.1.5

View full report↗︎

@kaumac
Copy link

kaumac commented Apr 26, 2024

Hey @jonsherrard thanks for looking into this so quickly!

Everything looks good to me. The only thing I'd note is that it'd be great to have the toast working on all platforms (I understand this might not be directly related to this PR).

On the T4 stack starter they have built a toast that works both on web and on mobile:
https://github.com/timothymiller/t4-app

TBH I'm quite new to Tamagui and Expo so I don't quite understand what the difference is between the two starters

@jonsherrard
Copy link
Contributor Author

@natew I also have an update here that I think would make the starter more approachable.

It probably needs a note on watching and building the ui package as well.

jonsherrard#1

@kaumac
Copy link

kaumac commented Apr 26, 2024

@jonsherrard another fun one:
I noticed that the starter-free comes with a turbo.json file, but it doen't take advantage of turborepo.

For example, instead of:
"web": "yarn build && cd apps/next && yarn next"

On my project I do:
turbo dev --parallel --filter={@web,@ui}

With this I avoid the "cd'ing"into directories which might be confusing and run next and the tamagui ui scripts in parallel.

Just a suggestion because there's already a turbo.json on the starter

@natew
Copy link
Member

natew commented Apr 27, 2024

Huge, thanks for this amazing work. Once I get a chance I'll test this out and get it merged. I know we need to revisit RSC and improve a few things too.

@jonsherrard
Copy link
Contributor Author

Awesome. One thing that will need updating is the Expo side. I tried to give it a go, but Expo is totally broken on my laptop at the minute and I totally ran out of time. I can't even create-expo-app.

It should just be a case of fetching the [id] from createParams in new Solito 4 world and passing it to the screen.

Also let me know thoughts on jonsherrard#1 - if it's useful I can raise another PR

- toast works in app, pages & expo
- fixed theme className hydration error
- fixed SwitchThemeButton hydration errors
- made switching from app to pages much easier
@SamuraiF0x SamuraiF0x self-assigned this May 29, 2024
@natew natew merged commit 45ea6d8 into tamagui:main May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants