Skip to content

Commit 1065837

Browse files
feat(template-generator): upgrade native expo templates to sdk 57
1 parent dbfabdc commit 1065837

9 files changed

Lines changed: 192 additions & 168 deletions

File tree

apps/cli/test/pnpm-workspace.test.ts

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ describe("pnpm workspace", () => {
4242

4343
expect(workspace.allowBuilds).toMatchObject({
4444
esbuild: true,
45-
msw: true,
4645
sharp: true,
4746
workerd: true,
4847
});
@@ -118,7 +117,28 @@ describe("pnpm workspace", () => {
118117
expect(workspace.allowBuilds).toEqual({ esbuild: true });
119118
});
120119

121-
it("adds only the React UI approval when no other build-script deps are expected", async () => {
120+
it("adds esbuild approval for Turborepo stacks", async () => {
121+
const workspace = await readPnpmWorkspace({
122+
projectName: "pnpm-turborepo",
123+
frontend: ["tanstack-router"],
124+
backend: "hono",
125+
runtime: "bun",
126+
api: "trpc",
127+
database: "sqlite",
128+
orm: "drizzle",
129+
auth: "none",
130+
payments: "none",
131+
addons: ["turborepo"],
132+
examples: ["none"],
133+
dbSetup: "none",
134+
webDeploy: "none",
135+
serverDeploy: "none",
136+
});
137+
138+
expect(workspace.allowBuilds).toEqual({ esbuild: true });
139+
});
140+
141+
it("does not add build approvals for TanStack Router without lifecycle-script dependencies", async () => {
122142
const workspace = await readPnpmWorkspace({
123143
projectName: "pnpm-react-ui",
124144
frontend: ["tanstack-router"],
@@ -136,7 +156,28 @@ describe("pnpm workspace", () => {
136156
serverDeploy: "none",
137157
});
138158

139-
expect(workspace.allowBuilds).toEqual({ msw: true });
159+
expect(workspace.allowBuilds).toBeUndefined();
160+
});
161+
162+
it("adds esbuild approval for a plain React Router frontend", async () => {
163+
const workspace = await readPnpmWorkspace({
164+
projectName: "pnpm-react-router-ui",
165+
frontend: ["react-router"],
166+
backend: "none",
167+
runtime: "none",
168+
api: "none",
169+
database: "none",
170+
orm: "none",
171+
auth: "none",
172+
payments: "none",
173+
addons: ["none"],
174+
examples: ["none"],
175+
dbSetup: "none",
176+
webDeploy: "none",
177+
serverDeploy: "none",
178+
});
179+
180+
expect(workspace.allowBuilds).toEqual({ esbuild: true });
140181
});
141182

142183
it("adds build approvals for a plain Next.js frontend", async () => {
@@ -158,7 +199,6 @@ describe("pnpm workspace", () => {
158199
});
159200

160201
expect(workspace.allowBuilds).toEqual({
161-
msw: true,
162202
sharp: true,
163203
});
164204
});
@@ -188,7 +228,7 @@ describe("pnpm workspace", () => {
188228
});
189229
});
190230

191-
it("adds build approvals for native Expo stacks", async () => {
231+
it("does not add build approvals for native Expo stacks without lifecycle-script dependencies", async () => {
192232
const workspace = await readPnpmWorkspace({
193233
projectName: "pnpm-native-expo",
194234
frontend: ["native-bare"],
@@ -206,7 +246,7 @@ describe("pnpm workspace", () => {
206246
serverDeploy: "none",
207247
});
208248

209-
expect(workspace.allowBuilds).toEqual({ "msgpackr-extract": true });
249+
expect(workspace.allowBuilds).toBeUndefined();
210250
});
211251

212252
it("adds build approvals for Docker deploys so non-interactive installs succeed", async () => {

bun.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"lint-staged": "^17.0.4",
5858
"oxfmt": "catalog:",
5959
"oxlint": "^1.64.0",
60-
"turbo": "^2.9.12",
60+
"turbo": "^2.10.2",
6161
"typescript": "catalog:"
6262
},
6363
"lint-staged": {

packages/template-generator/src/templates.generated.ts

Lines changed: 68 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -25293,20 +25293,14 @@ declare module "cloudflare:workers" {
2529325293
["extras/pnpm-workspace.yaml.hbs", `packages:
2529425294
- "apps/*"
2529525295
- "packages/*"
25296-
{{#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 "vite-plus") (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "tanstack-start") (includes frontend "next") (includes frontend "nuxt") (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
25296+
{{#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"))}}
2529725297

2529825298
# pnpm 11 blocks dependency lifecycle scripts unless they are approved here.
2529925299
# Entries are scoped to packages this generated stack can pull in.
2530025300
allowBuilds:
25301-
{{#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"))}}
25301+
{{#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"))}}
2530225302
esbuild: true
2530325303
{{/if}}
25304-
{{#if (or (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "tanstack-start") (includes frontend "next"))}}
25305-
msw: true
25306-
{{/if}}
25307-
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
25308-
msgpackr-extract: true
25309-
{{/if}}
2531025304
{{#if (includes frontend "nuxt")}}
2531125305
"@parcel/watcher": true
2531225306
vue-demi: true
@@ -26756,39 +26750,38 @@ module.exports = config;
2675626750
"web": "expo start --web"
2675726751
},
2675826752
"dependencies": {
26759-
"@expo/ui": "~56.0.12",
26753+
"@expo/ui": "~57.0.1",
2676026754
"@expo/vector-icons": "^15.1.1",
26761-
"@tanstack/react-query": "^5.99.2",
26755+
"@tanstack/react-query": "^5.101.2",
2676226756
{{#if (includes examples "ai")}}
2676326757
"@stardazed/streams-text-encoding": "^1.0.2",
26764-
"@ungap/structured-clone": "^1.3.0",
26758+
"@ungap/structured-clone": "^1.3.2",
2676526759
{{/if}}
26766-
"expo": "~56.0.3",
26767-
"expo-constants": "~56.0.14",
26768-
"expo-crypto": "~56.0.3",
26769-
"expo-font": "~56.0.5",
26770-
"expo-linking": "~56.0.11",
26771-
"expo-network": "~56.0.4",
26772-
"expo-router": "~56.2.5",
26773-
"expo-secure-store": "~56.0.4",
26774-
"expo-splash-screen": "~56.0.9",
26775-
"expo-status-bar": "~56.0.4",
26776-
"expo-system-ui": "~56.0.5",
26777-
"expo-web-browser": "~56.0.5",
26760+
"expo": "~57.0.1",
26761+
"expo-constants": "~57.0.2",
26762+
"expo-crypto": "~57.0.0",
26763+
"expo-font": "~57.0.0",
26764+
"expo-linking": "~57.0.1",
26765+
"expo-network": "~57.0.0",
26766+
"expo-router": "~57.0.2",
26767+
"expo-secure-store": "~57.0.0",
26768+
"expo-splash-screen": "~57.0.1",
26769+
"expo-status-bar": "~57.0.0",
26770+
"expo-system-ui": "~57.0.0",
26771+
"expo-web-browser": "~57.0.0",
2677826772
"react": "19.2.3",
2677926773
"react-dom": "19.2.3",
26780-
"react-native": "0.85.3",
26781-
"react-native-gesture-handler": "~2.31.1",
26782-
"react-native-reanimated": "4.3.1",
26774+
"react-native": "0.86.0",
26775+
"react-native-gesture-handler": "~2.32.0",
26776+
"react-native-reanimated": "4.5.0",
2678326777
"react-native-safe-area-context": "~5.7.0",
2678426778
"react-native-screens": "4.25.2",
2678526779
"react-native-web": "~0.21.0",
26786-
"react-native-worklets": "0.8.3"
26780+
"react-native-worklets": "0.10.0"
2678726781
},
2678826782
"devDependencies": {
26789-
"@babel/core": "^7.29.0",
26790-
"@types/react": "~19.2.14",
26791-
"typescript": "^6"
26783+
"@types/react": "~19.2.17",
26784+
"typescript": "~6.0.3"
2679226785
},
2679326786
"private": true
2679426787
}
@@ -28089,40 +28082,39 @@ module.exports = config;
2808928082
"@expo/vector-icons": "^15.1.1",
2809028083
{{#if (includes examples "ai")}}
2809128084
"@stardazed/streams-text-encoding": "^1.0.2",
28092-
"@ungap/structured-clone": "^1.3.0",
28085+
"@ungap/structured-clone": "^1.3.2",
2809328086
{{/if}}
28094-
"babel-preset-expo": "~56.0.0",
28095-
"expo": "~56.0.3",
28096-
"expo-constants": "~56.0.14",
28097-
"expo-crypto": "~56.0.3",
28098-
"expo-dev-client": "~56.0.14",
28099-
"expo-font": "~56.0.5",
28100-
"expo-linking": "~56.0.11",
28101-
"expo-network": "~56.0.4",
28102-
"expo-router": "~56.2.5",
28103-
"expo-secure-store": "~56.0.4",
28104-
"expo-splash-screen": "~56.0.9",
28105-
"expo-status-bar": "~56.0.4",
28106-
"expo-system-ui": "~56.0.5",
28107-
"expo-web-browser": "~56.0.5",
28087+
"babel-preset-expo": "~57.0.1",
28088+
"expo": "~57.0.1",
28089+
"expo-constants": "~57.0.2",
28090+
"expo-crypto": "~57.0.0",
28091+
"expo-dev-client": "~57.0.3",
28092+
"expo-font": "~57.0.0",
28093+
"expo-linking": "~57.0.1",
28094+
"expo-network": "~57.0.0",
28095+
"expo-router": "~57.0.2",
28096+
"expo-secure-store": "~57.0.0",
28097+
"expo-splash-screen": "~57.0.1",
28098+
"expo-status-bar": "~57.0.0",
28099+
"expo-system-ui": "~57.0.0",
28100+
"expo-web-browser": "~57.0.0",
2810828101
"react": "19.2.3",
2810928102
"react-dom": "19.2.3",
28110-
"react-native": "0.85.3",
28111-
"react-native-edge-to-edge": "^1.8.1",
28112-
"react-native-gesture-handler": "~2.31.1",
28113-
"react-native-nitro-modules": "^0.35.7",
28114-
"react-native-reanimated": "4.3.1",
28103+
"react-native": "0.86.0",
28104+
"react-native-gesture-handler": "~2.32.0",
28105+
"react-native-nitro-modules": "0.36.1",
28106+
"react-native-reanimated": "4.5.0",
2811528107
"react-native-safe-area-context": "~5.7.0",
2811628108
"react-native-screens": "4.25.2",
28117-
"react-native-unistyles": "^3.2.4",
28109+
"react-native-unistyles": "^3.2.5",
2811828110
"react-native-web": "~0.21.0",
28119-
"react-native-worklets": "0.8.3"
28111+
"react-native-worklets": "0.10.0"
2812028112
},
2812128113
"devDependencies": {
2812228114
"ajv": "^8.20.0",
28123-
"@babel/core": "^7.29.0",
28124-
"@types/react": "~19.2.14",
28125-
"typescript": "^6"
28115+
"@babel/core": "^7.29.7",
28116+
"@types/react": "~19.2.17",
28117+
"typescript": "~6.0.3"
2812628118
}
2812728119
}
2812828120
`],
@@ -29220,44 +29212,44 @@ module.exports = uniwindConfig;
2922029212
"web": "expo start --web"
2922129213
},
2922229214
"dependencies": {
29223-
"@expo/metro-runtime": "~56.0.11",
29215+
"@expo/metro-runtime": "~57.0.2",
2922429216
"@expo/vector-icons": "^15.1.1",
2922529217
"@gorhom/bottom-sheet": "^5.2.14",
2922629218
{{#if (includes examples "ai")}}
2922729219
"@stardazed/streams-text-encoding": "^1.0.2",
29228-
"@ungap/structured-clone": "^1.3.0",
29220+
"@ungap/structured-clone": "^1.3.2",
2922929221
{{/if}}
29230-
"expo": "~56.0.3",
29231-
"expo-constants": "~56.0.14",
29232-
"expo-font": "~56.0.5",
29233-
"expo-haptics": "~56.0.3",
29234-
"expo-linking": "~56.0.11",
29235-
"expo-network": "~56.0.4",
29236-
"expo-router": "~56.2.5",
29237-
"expo-secure-store": "~56.0.4",
29238-
"expo-status-bar": "~56.0.4",
29239-
"expo-web-browser": "~56.0.5",
29222+
"expo": "~57.0.1",
29223+
"expo-constants": "~57.0.2",
29224+
"expo-font": "~57.0.0",
29225+
"expo-haptics": "~57.0.0",
29226+
"expo-linking": "~57.0.1",
29227+
"expo-network": "~57.0.0",
29228+
"expo-router": "~57.0.2",
29229+
"expo-secure-store": "~57.0.0",
29230+
"expo-status-bar": "~57.0.0",
29231+
"expo-web-browser": "~57.0.0",
2924029232
"heroui-native": "^1.0.4",
2924129233
"react": "19.2.3",
2924229234
"react-dom": "19.2.3",
29243-
"react-native": "0.85.3",
29244-
"react-native-gesture-handler": "~2.31.1",
29245-
"react-native-keyboard-controller": "1.21.6",
29246-
"react-native-reanimated": "4.3.1",
29235+
"react-native": "0.86.0",
29236+
"react-native-gesture-handler": "~2.32.0",
29237+
"react-native-keyboard-controller": "1.21.9",
29238+
"react-native-reanimated": "4.5.0",
2924729239
"react-native-safe-area-context": "~5.7.0",
2924829240
"react-native-screens": "4.25.2",
2924929241
"react-native-svg": "15.15.4",
2925029242
"react-native-web": "~0.21.0",
29251-
"react-native-worklets": "0.8.3",
29243+
"react-native-worklets": "0.10.0",
2925229244
"tailwind-merge": "^3.6.0",
2925329245
"tailwind-variants": "^3.2.2",
29254-
"tailwindcss": "^4.3.0",
29246+
"tailwindcss": "^4.3.2",
2925529247
"uniwind": "^1.9.0"
2925629248
},
2925729249
"devDependencies": {
29258-
"@types/node": "^25.9.1",
29259-
"@types/react": "~19.2.14",
29260-
"typescript": "^6"
29250+
"@types/node": "^26.0.1",
29251+
"@types/react": "~19.2.17",
29252+
"typescript": "~6.0.3"
2926129253
}
2926229254
}
2926329255
`],

packages/template-generator/src/utils/add-deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export const dependencyVersionMap = {
9393
fastify: "^5.3.3",
9494
"@fastify/cors": "^11.0.1",
9595

96-
turbo: "^2.9.16",
96+
turbo: "^2.10.2",
9797
nx: "^22.7.5",
9898
"vite-plus": "0.1.24",
9999
rolldown: "1.1.0",

packages/template-generator/templates/extras/pnpm-workspace.yaml.hbs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
packages:
22
- "apps/*"
33
- "packages/*"
4-
{{#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 "vite-plus") (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "tanstack-start") (includes frontend "next") (includes frontend "nuxt") (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
4+
{{#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"))}}
55

66
# pnpm 11 blocks dependency lifecycle scripts unless they are approved here.
77
# Entries are scoped to packages this generated stack can pull in.
88
allowBuilds:
9-
{{#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"))}}
9+
{{#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"))}}
1010
esbuild: true
1111
{{/if}}
12-
{{#if (or (includes frontend "tanstack-router") (includes frontend "react-router") (includes frontend "tanstack-start") (includes frontend "next"))}}
13-
msw: true
14-
{{/if}}
15-
{{#if (or (includes frontend "native-bare") (includes frontend "native-uniwind") (includes frontend "native-unistyles"))}}
16-
msgpackr-extract: true
17-
{{/if}}
1812
{{#if (includes frontend "nuxt")}}
1913
"@parcel/watcher": true
2014
vue-demi: true

0 commit comments

Comments
 (0)