Skip to content

feat(template-generator): upgrade native expo templates to sdk 57#1091

Merged
AmanVarshney01 merged 1 commit into
mainfrom
aman/upgrade-expo-sdk-57
Jun 30, 2026
Merged

feat(template-generator): upgrade native expo templates to sdk 57#1091
AmanVarshney01 merged 1 commit into
mainfrom
aman/upgrade-expo-sdk-57

Conversation

@AmanVarshney01

@AmanVarshney01 AmanVarshney01 commented Jun 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • upgrade native bare, Uniwind, and Unistyles Expo templates to Expo SDK 57 / React Native 0.86-compatible package versions
  • refresh Uniwind, Unistyles, HeroUI Native, Tailwind, worklets, gesture/reanimated, and related native package pins from the latest docs and Expo bundled package map
  • update Turborepo to the latest stable 2.10.2 in the repo and generated Turborepo stacks
  • tighten pnpm allowBuilds output to match pnpm approve-builds results: add missing esbuild for React Router/Turborepo stacks, keep real approvals like sharp, workerd, Prisma, Nuxt watcher deps, and remove stale msw/native msgpackr-extract approvals
  • regenerate the embedded template bundle used by the CLI

Verification

  • bun test test/frontend.test.ts from apps/cli
  • bun test test/pnpm-workspace.test.ts test/addons.test.ts from apps/cli
  • bun run check
  • bun run build
  • scaffolded native-bare, native-uniwind, and native-unistyles into /tmp/bts-expo-sdk57 and verified with npm/Expo checks
  • scaffolded native-bare, native-uniwind, and native-unistyles into /tmp/bts-expo-pnpm with --package-manager pnpm
  • for each generated pnpm native app:
    • pnpm install --config.strict-dep-builds=true
    • pnpm approve-builds --all -> no packages awaiting approval
    • pnpm exec expo install --fix -> dependencies up to date
    • pnpm exec expo install --check --json -> upToDate: true
    • pnpm exec tsc --noEmit
    • pnpm dlx expo-doctor@latest -> 20/20 checks passed
    • pnpm exec expo export --platform web --clear
  • verified pnpm build approvals with pnpm install --config.strict-dep-builds=true and pnpm approve-builds --all on representative generated stacks: React Router, Next.js, Nuxt, Prisma, Cloudflare/workerd, Vite+, and Turborepo

Docs checked

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
create-better-t-stack-web Ready Ready Preview, Comment Jun 30, 2026 10:53pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Workspace build-approval rules, Turbo version selection, and native Expo/React Native template dependencies are updated across the template generator, with matching changes in generated template output and tests.

Changes

Template generator, workspace approvals, and native template version bumps

Layer / File(s) Summary
Workspace build approvals and Turbo versioning
packages/template-generator/templates/extras/pnpm-workspace.yaml.hbs, packages/template-generator/src/templates.generated.ts, apps/cli/test/pnpm-workspace.test.ts, package.json, packages/template-generator/src/utils/add-deps.ts
allowBuilds conditions are rewritten, workspace approval tests are updated for the new esbuild and negative cases, and Turbo is bumped in both the root package and the dependency version map.
Native template manifest version bumps
packages/template-generator/templates/frontend/native/bare/package.json.hbs, packages/template-generator/templates/frontend/native/unistyles/package.json.hbs, packages/template-generator/templates/frontend/native/uniwind/package.json.hbs
Expo, React Native, Tailwind, AI example, and devDependency versions are updated across the three native template manifests.
Generated native template synchronization
packages/template-generator/src/templates.generated.ts
The generated native dependency blocks are regenerated to match the updated bare, unistyles, and uniwind template manifests.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: upgrading the native Expo templates to SDK 57.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 68f4c678bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"expo": "~57.0.1",
"expo-constants": "~57.0.2",
"expo-crypto": "~57.0.0",
"expo-dev-client": "~57.0.3",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align expo-dev-client with SDK 57 bundle

For generated native-unistyles apps, this pins expo-dev-client to ~57.0.3, but the Expo SDK 57 DevClient reference lists the bundled version as ~57.0.2 (https://docs.expo.dev/versions/latest/sdk/dev-client/). Since Expo's upgrade flow asks users to run npx expo install --fix/expo-doctor, this template will be reported as out of sync and may be rewritten immediately after scaffolding; use the SDK-bundled range here.

Useful? React with 👍 / 👎.

@AmanVarshney01 AmanVarshney01 force-pushed the aman/upgrade-expo-sdk-57 branch from a3f633c to 1065837 Compare June 30, 2026 22:52
@AmanVarshney01 AmanVarshney01 merged commit 91cbe66 into main Jun 30, 2026
3 checks passed
@AmanVarshney01 AmanVarshney01 deleted the aman/upgrade-expo-sdk-57 branch June 30, 2026 22:57

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8a5f9299-cd5f-4a31-b7d5-9ce3f6d2ab21

📥 Commits

Reviewing files that changed from the base of the PR and between a3f633c and 1065837.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • apps/cli/test/pnpm-workspace.test.ts
  • package.json
  • packages/template-generator/src/templates.generated.ts
  • packages/template-generator/src/utils/add-deps.ts
  • packages/template-generator/templates/extras/pnpm-workspace.yaml.hbs
  • packages/template-generator/templates/frontend/native/bare/package.json.hbs
  • packages/template-generator/templates/frontend/native/unistyles/package.json.hbs
  • packages/template-generator/templates/frontend/native/uniwind/package.json.hbs
✅ Files skipped from review due to trivial changes (1)
  • packages/template-generator/src/utils/add-deps.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • packages/template-generator/templates/frontend/native/bare/package.json.hbs
  • packages/template-generator/templates/frontend/native/uniwind/package.json.hbs
  • packages/template-generator/templates/frontend/native/unistyles/package.json.hbs

Comment on lines +4 to 11
{{#if (or (eq runtime "node") (eq webDeploy "cloudflare") (eq serverDeploy "cloudflare") (eq webDeploy "docker") (eq serverDeploy "docker") (eq orm "prisma") (includes addons "lefthook") (includes addons "nx") (includes addons "pwa") (includes addons "turborepo") (includes addons "vite-plus") (includes frontend "react-router") (includes frontend "next") (includes frontend "nuxt"))}}

# pnpm 11 blocks dependency lifecycle scripts unless they are approved here.
# Entries are scoped to packages this generated stack can pull in.
allowBuilds:
{{#if (or (eq runtime "node") (eq webDeploy "cloudflare") (eq serverDeploy "cloudflare") (eq webDeploy "docker") (eq serverDeploy "docker") (includes addons "vite-plus") (includes frontend "tanstack-start") (includes frontend "nuxt"))}}
{{#if (or (eq runtime "node") (eq webDeploy "cloudflare") (eq serverDeploy "cloudflare") (eq webDeploy "docker") (eq serverDeploy "docker") (includes addons "turborepo") (includes addons "vite-plus") (includes frontend "react-router") (includes frontend "nuxt"))}}
esbuild: true
{{/if}}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Confirm the exact native frontend flag values and whether any native template
# dependency needs build-script approval (msgpackr-extract, msw, native modules).
rg -nP '"native-(bare|uniwind|unistyles)"' packages/template-generator/src -C2
rg -nP 'msgpackr-extract|msw' packages/template-generator -C3

Repository: AmanVarshney01/create-better-t-stack

Length of output: 25978


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect the workspace template and the native/package gating logic around it.
ast-grep outline packages/template-generator/templates/extras/pnpm-workspace.yaml.hbs --view expanded || true
sed -n '1,120p' packages/template-generator/templates/extras/pnpm-workspace.yaml.hbs

echo
echo '--- template handler wiring ---'
sed -n '1,220p' packages/template-generator/src/template-handlers/extras.ts

echo
echo '--- package/config native detection ---'
sed -n '1,120p' packages/template-generator/src/template-handlers/packages.ts

echo
echo '--- search for allowBuilds / pnpm-workspace usage ---'
rg -n "allowBuilds|pnpm-workspace|ignoredBuiltDependencies|onlyBuiltDependencies|builtDependencies" packages/template-generator -C 3

Repository: AmanVarshney01/create-better-t-stack

Length of output: 11000


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- pnpm-related extras ---'
sed -n '1,220p' packages/template-generator/templates/extras/_npmrc.hbs

echo
echo '--- native package templates (deps) ---'
rg -n "msgpackr-extract|msw|sharp|esbuild|workerd|prisma|lefthook|nx|postinstall|prepare|install" packages/template-generator/src/templates.generated.ts packages/template-generator/templates packages/template-generator/src -C 2

echo
echo '--- native stack package handling ---'
sed -n '1,220p' packages/template-generator/src/template-handlers/frontend.ts
sed -n '1,220p' packages/template-generator/src/template-handlers/packages.ts

Repository: AmanVarshney01/create-better-t-stack

Length of output: 50393


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- native template manifests ---'
fd -a 'package.json.hbs' packages/template-generator/templates/frontend | rg 'native|expo' || true
fd -a '*.hbs' packages/template-generator/templates/frontend/native packages/template-generator/templates/frontend | rg 'native|expo' || true

echo
echo '--- inspect native-related package.json templates ---'
for f in \
  $(fd -a 'package.json.hbs' packages/template-generator/templates | rg 'native|expo' || true)
do
  echo "### $f"
  sed -n '1,220p' "$f"
  echo
done

echo
echo '--- search for lifecycle scripts in native-related generated templates ---'
rg -n '"(preinstall|install|postinstall|prepare|prepack|postpack|prepublishOnly|postpublish)"\s*:' packages/template-generator/templates packages/template-generator/src/templates.generated.ts -C 2 | rg 'native|expo|worklets|reanimated|gesture|svg|router|skia|mmkv|sentry|secure-store|async-storage' -C 2

Repository: AmanVarshney01/create-better-t-stack

Length of output: 5566


🌐 Web query:

npm package manifests for react-native-reanimated react-native-worklets react-native-gesture-handler react-native-nitro-modules expo-dev-client install postinstall scripts

💡 Result:

In the React Native ecosystem, the use of postinstall scripts within package manifests is generally discouraged due to potential security risks and interference with package manager processes [1]. Below is a breakdown of the status for the requested packages: 1. react-native-reanimated: Does not include a postinstall script [1]. Older versions historically required workarounds like jetifier in postinstall [2], but modern configurations rely on standard build processes [3]. 2. react-native-worklets: Generally does not rely on postinstall scripts for end-user installation [4][5]. 3. react-native-gesture-handler: Does not include a postinstall script [6]. As with other libraries, historical needs for jetifier in postinstall are no longer applicable to modern React Native versions [7]. 4. react-native-nitro-modules: Has been observed containing a postinstall script (e.g., "postinstall": "bun build || exit 0") in some versions, which has occasionally caused issues in specific environments [8]. Users have sometimes employed patch-package to override or nullify this script in their local node_modules when conflicts arise [8]. 5. expo-dev-client: Does not use a postinstall script [9][10]. Configuration is managed via the Expo CLI (npx expo install) and standard native build processes like pod install [9][10]. Note: While these libraries generally avoid postinstall scripts, projects often use patch-package in their own package.json postinstall scripts to apply hotfixes to dependencies when necessary [11][12][13][14][15]. Additionally, Expo provides dedicated build lifecycle hooks (e.g., eas-build-post-install) for managing tasks during CI/CD builds, which should be used instead of standard postinstall scripts for environment-specific build steps [16].

Citations:


🌐 Web query:

react-native-nitro-modules 0.36.1 npm registry package.json scripts postinstall

💡 Result:

In the react-native-nitro-modules package, the postinstall script historically includes the command "bun build || exit 0;" [1][2][3]. This script is designed to trigger a build process using the Bun runtime upon package installation [1]. If you encounter issues with this script during installation—such as environments where Bun is not available or where the script fails—it has been noted in community discussions that some users mitigate this by patching the package.json to replace the command with a simple "exit 0;" [1]. The package is a core library for Nitro Modules, providing statically compiled bindings for React Native [4][5][6]. It is maintained as part of a monorepo, and its package.json scripts are integral to managing the library's build and versioning lifecycle [1][7].

Citations:


Include native-unistyles in the allowBuilds gate. native-unistyles pulls in react-native-nitro-modules, which has a postinstall script (bun build || exit 0), so a pure native pnpm workspace can lose the whole allowlist and get blocked on install.

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.

1 participant