@tamagui/cli 3.0.0-beta.889.1 → 3.0.0-beta.901.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/migrate.cjs CHANGED
@@ -109,6 +109,7 @@ add a compatibility setting or restore condition-object parsing.
109
109
  - Import animations from \`@tamagui/config/animations-css\`, \`animations-rn\`, \`animations-reanimated\`, or \`animations-motion\`.
110
110
  - Apps using Sheet or animated-number hooks with the CSS driver must import \`createAnimations\` from \`@tamagui/animations-css/extras\`. The root entry omits those hooks.
111
111
  - Remove \`@tamagui/theme-builder\` and any V5 builder imports. Static \`@tamagui/themes/v5\`, \`/v5-subtle\`, and \`/v5-tokens\` imports remain supported.
112
+ - An app that GENERATES its v5 themes (\`createV5Theme\`, \`subtleChildrenThemes\`, \`createPalettes\`) has two ways to stay on v5 for this migration: run the builder once and serialize the result to a static literal, or import the same builders from \`@tamagui/config-v5\` (and \`@tamagui/config-v5/builder\`), the opt-in package that carries them. Take one of those when the themes are built from values the app only knows at runtime; the v6 recipe move below is a separate migration.
112
113
  - Use \`createThemes\`, \`levels\`, scales, and the other recipe helpers from \`@tamagui/themes/builder\`.
113
114
  - Remove \`componentThemes\`, \`templates\`, \`masks\`, \`childrenThemes\`, and \`grandChildrenThemes\`. Express hierarchy in the recipe tree, semantic values in scales, and exact one-theme overrides in \`values\`.
114
115
  - Component names no longer select uppercase theme segments automatically. Replace component themes with explicit normal theme or \`level2\` boundaries in component skins.
@@ -140,19 +141,10 @@ rg "@tamagui/theme-builder|v5-builder|createV5Theme|componentThemes|grandChildre
140
141
 
141
142
  ### 4. Migrate Sheet anatomy
142
143
 
143
- The v3 package does not ship a Sheet codemod. Migrate each callsite using the
144
- rules below.
145
-
146
- When working inside a Tamagui source checkout, you can run its source-only
147
- codemod first. Pass expanded file paths because the script does not expand a
148
- quoted glob:
149
-
150
- \`\`\`bash
151
- rg --files src -g '*.ts' -g '*.tsx' -0 \\
152
- | xargs -0 node ./scripts/codemods/sheet-frame-to-container.js
153
- \`\`\`
154
-
155
- Migration rules:
144
+ The flat-values codemod from step 1 rewrites every provable \`Sheet.Frame\` to
145
+ \`Sheet.Container\` with a \`Sheet.Background\` first child carrying the surface
146
+ props, and reports spreads and \`styled(Sheet.Frame, \u2026)\` targets for review.
147
+ Check each rewritten callsite against these rules:
156
148
 
157
149
  - Replace \`Sheet.Frame\` with \`Sheet.Container\` plus \`Sheet.Background\`.
158
150
  - Keep layout props such as \`padding\`, \`gap\`, \`height\`, \`maxHeight\`, and flex props on \`Sheet.Container\`.
@@ -231,8 +223,9 @@ when behavior itself needs active responsive or theme state.
231
223
  ### 6. Replace true tokens
232
224
 
233
225
  - Default v3 configs no longer export the legacy \`$true\` token key.
234
- - Component default size resolves to bare \`4\`.
235
- - Replace authored \`$true\` tokens with real bare keys such as \`4\`.
226
+ - The codemod writes \`$true\` on style props as \`4\` and reports a \`legacy-true-token\` warning; confirm the app's config aliased it there.
227
+ - On \`size\`, \`elevation\`, and \`iconSize\` it writes the boolean \`true\`, which resolves to the component default size.
228
+ - Token definitions and custom variants are not edited; search them for the alias by hand.
236
229
  - Do not change unrelated boolean props or boolean variant values.
237
230
 
238
231
  ### 7. Replace token stepping
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/cli",
3
- "version": "3.0.0-beta.889.1",
3
+ "version": "3.0.0-beta.901.1",
4
4
  "bin": {
5
5
  "tama": "dist/index.cjs",
6
6
  "tamagui": "dist/index.cjs"
@@ -51,12 +51,12 @@
51
51
  "test:web": "bun run test"
52
52
  },
53
53
  "dependencies": {
54
- "@tamagui/generate-themes": "3.0.0-beta.889.1",
55
- "@tamagui/metro-plugin": "3.0.0-beta.889.1",
56
- "@tamagui/static": "3.0.0-beta.889.1",
57
- "@tamagui/to-tailwind": "3.0.0-beta.889.1",
58
- "@tamagui/types": "3.0.0-beta.889.1",
59
- "@tamagui/vite-plugin": "3.0.0-beta.889.1",
54
+ "@tamagui/generate-themes": "3.0.0-beta.901.1",
55
+ "@tamagui/metro-plugin": "3.0.0-beta.901.1",
56
+ "@tamagui/static": "3.0.0-beta.901.1",
57
+ "@tamagui/to-tailwind": "3.0.0-beta.901.1",
58
+ "@tamagui/types": "3.0.0-beta.901.1",
59
+ "@tamagui/vite-plugin": "3.0.0-beta.901.1",
60
60
  "arg": "^5.0.2",
61
61
  "chalk": "^4.1.2",
62
62
  "change-case": "^4.1.2",
@@ -75,10 +75,10 @@
75
75
  "ts-morph": "^28.0.0",
76
76
  "typescript": "~6.0.3",
77
77
  "url": "^0.11.0",
78
- "@tamagui/language-service": "3.0.0-beta.889.1"
78
+ "@tamagui/language-service": "3.0.0-beta.901.1"
79
79
  },
80
80
  "devDependencies": {
81
- "@tamagui/build": "3.0.0-beta.889.1",
81
+ "@tamagui/build": "3.0.0-beta.901.1",
82
82
  "@types/chokidar": "^2.1.3",
83
83
  "@types/marked": "^5.0.0",
84
84
  "vitest": "4.1.0"
package/src/migrate.ts CHANGED
@@ -93,6 +93,7 @@ add a compatibility setting or restore condition-object parsing.
93
93
  - Import animations from \`@tamagui/config/animations-css\`, \`animations-rn\`, \`animations-reanimated\`, or \`animations-motion\`.
94
94
  - Apps using Sheet or animated-number hooks with the CSS driver must import \`createAnimations\` from \`@tamagui/animations-css/extras\`. The root entry omits those hooks.
95
95
  - Remove \`@tamagui/theme-builder\` and any V5 builder imports. Static \`@tamagui/themes/v5\`, \`/v5-subtle\`, and \`/v5-tokens\` imports remain supported.
96
+ - An app that GENERATES its v5 themes (\`createV5Theme\`, \`subtleChildrenThemes\`, \`createPalettes\`) has two ways to stay on v5 for this migration: run the builder once and serialize the result to a static literal, or import the same builders from \`@tamagui/config-v5\` (and \`@tamagui/config-v5/builder\`), the opt-in package that carries them. Take one of those when the themes are built from values the app only knows at runtime; the v6 recipe move below is a separate migration.
96
97
  - Use \`createThemes\`, \`levels\`, scales, and the other recipe helpers from \`@tamagui/themes/builder\`.
97
98
  - Remove \`componentThemes\`, \`templates\`, \`masks\`, \`childrenThemes\`, and \`grandChildrenThemes\`. Express hierarchy in the recipe tree, semantic values in scales, and exact one-theme overrides in \`values\`.
98
99
  - Component names no longer select uppercase theme segments automatically. Replace component themes with explicit normal theme or \`level2\` boundaries in component skins.
@@ -124,19 +125,10 @@ rg "@tamagui/theme-builder|v5-builder|createV5Theme|componentThemes|grandChildre
124
125
 
125
126
  ### 4. Migrate Sheet anatomy
126
127
 
127
- The v3 package does not ship a Sheet codemod. Migrate each callsite using the
128
- rules below.
129
-
130
- When working inside a Tamagui source checkout, you can run its source-only
131
- codemod first. Pass expanded file paths because the script does not expand a
132
- quoted glob:
133
-
134
- \`\`\`bash
135
- rg --files src -g '*.ts' -g '*.tsx' -0 \\
136
- | xargs -0 node ./scripts/codemods/sheet-frame-to-container.js
137
- \`\`\`
138
-
139
- Migration rules:
128
+ The flat-values codemod from step 1 rewrites every provable \`Sheet.Frame\` to
129
+ \`Sheet.Container\` with a \`Sheet.Background\` first child carrying the surface
130
+ props, and reports spreads and \`styled(Sheet.Frame, …)\` targets for review.
131
+ Check each rewritten callsite against these rules:
140
132
 
141
133
  - Replace \`Sheet.Frame\` with \`Sheet.Container\` plus \`Sheet.Background\`.
142
134
  - Keep layout props such as \`padding\`, \`gap\`, \`height\`, \`maxHeight\`, and flex props on \`Sheet.Container\`.
@@ -215,8 +207,9 @@ when behavior itself needs active responsive or theme state.
215
207
  ### 6. Replace true tokens
216
208
 
217
209
  - Default v3 configs no longer export the legacy \`$true\` token key.
218
- - Component default size resolves to bare \`4\`.
219
- - Replace authored \`$true\` tokens with real bare keys such as \`4\`.
210
+ - The codemod writes \`$true\` on style props as \`4\` and reports a \`legacy-true-token\` warning; confirm the app's config aliased it there.
211
+ - On \`size\`, \`elevation\`, and \`iconSize\` it writes the boolean \`true\`, which resolves to the component default size.
212
+ - Token definitions and custom variants are not edited; search them for the alias by hand.
220
213
  - Do not change unrelated boolean props or boolean variant values.
221
214
 
222
215
  ### 7. Replace token stepping