@tamagui/cli 3.0.0-beta.924.1 → 3.0.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.
@@ -1,6 +1,8 @@
1
+ var __create = Object.create;
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
4
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
7
  var __export = (target, all) => {
6
8
  for (var name in all) __defProp(target, name, {
@@ -17,17 +19,74 @@ var __copyProps = (to, from, except, desc) => {
17
19
  }
18
20
  return to;
19
21
  };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
+ value: mod,
24
+ enumerable: true
25
+ }) : target, mod));
20
26
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
27
  var setup_prompt_exports = {};
22
28
  __export(setup_prompt_exports, {
23
29
  getSetupPrompt: () => getSetupPrompt,
24
- printSetupPrompt: () => printSetupPrompt
30
+ printSetupPrompt: () => printSetupPrompt,
31
+ resolveStyleValueSyntax: () => resolveStyleValueSyntax,
32
+ setupPrompt: () => setupPrompt
25
33
  });
26
34
  module.exports = __toCommonJS(setup_prompt_exports);
27
- function printSetupPrompt() {
28
- process.stdout.write(getSetupPrompt());
35
+ var import_prompts = __toESM(require("prompts"));
36
+ async function resolveStyleValueSyntax(setting) {
37
+ if (setting === "string" || setting === "object" || setting === "both") {
38
+ return setting;
39
+ }
40
+ if (!process.stdin.isTTY) {
41
+ return "both";
42
+ }
43
+ const response = await (0, import_prompts.default)({
44
+ type: "select",
45
+ name: "syntax",
46
+ message: "Which style value syntax would you like to document?",
47
+ choices: [
48
+ {
49
+ title: "both - document both string and object syntax",
50
+ value: "both"
51
+ },
52
+ {
53
+ title: "string - e.g. bg=\"red hover:blue\"",
54
+ value: "string"
55
+ },
56
+ {
57
+ title: "object - e.g. bg={{ default: \"red\", hover: \"blue\" }}",
58
+ value: "object"
59
+ }
60
+ ],
61
+ initial: 0
62
+ });
63
+ return response.syntax || "both";
64
+ }
65
+ async function setupPrompt(options) {
66
+ const { generatePrompt } = require("./generate-prompt.cjs");
67
+ return await generatePrompt(options);
68
+ }
69
+ function printSetupPrompt(syntax) {
70
+ if (syntax) {
71
+ process.stdout.write(getSetupPrompt(syntax));
72
+ return;
73
+ }
74
+ if (!process.stdin.isTTY) {
75
+ process.stdout.write(getSetupPrompt("both"));
76
+ return;
77
+ }
78
+ resolveStyleValueSyntax().then((chosen) => {
79
+ process.stdout.write(getSetupPrompt(chosen));
80
+ });
29
81
  }
30
- function getSetupPrompt() {
82
+ function getSetupPrompt(syntax = "both") {
83
+ const styleExample = syntax === "string" ? "```tsx\n<View bg=\"background hover:background-hover\" p=\"4 sm:6\" />\n```" : syntax === "object" ? "```tsx\n<View bg={{ default: 'background', hover: 'background-hover' }} p={{ default: '4', sm: '6' }} />\n```" : `\`\`\`tsx
84
+ // string form
85
+ <View bg="background hover:background-hover" p="4 sm:6" />
86
+
87
+ // object form
88
+ <View bg={{ default: 'background', hover: 'background-hover' }} p={{ default: '4', sm: '6' }} />
89
+ \`\`\``;
31
90
  return `You are adding Tamagui v3 to a project that does not use it yet.
32
91
 
33
92
  Work like a careful coding agent:
@@ -68,8 +127,10 @@ import { createTamagui } from 'tamagui'
68
127
 
69
128
  export const config = createTamagui(defaultConfig)
70
129
 
130
+ type AppConfig = typeof config
131
+
71
132
  declare module 'tamagui' {
72
- interface TamaguiCustomConfig extends typeof config {}
133
+ interface TamaguiCustomConfig extends AppConfig {}
73
134
  }
74
135
  \`\`\`
75
136
 
@@ -87,7 +148,7 @@ import { config } from './tamagui.config'
87
148
  export default function App() {
88
149
  return (
89
150
  <TamaguiProvider config={config} defaultTheme="light">
90
- <View width={200} height={200} bg="background" />
151
+ <View w={200} h={200} bg="background" />
91
152
  </TamaguiProvider>
92
153
  )
93
154
  }
@@ -113,15 +174,13 @@ first.
113
174
  This is the part most likely to be written as if it were v2. In v3, token and
114
175
  theme names are bare, and conditions are flat clauses inside the value:
115
176
 
116
- \`\`\`tsx
117
- <View bg="background hover:background-hover" p="4 sm:6" />
118
- \`\`\`
177
+ ${styleExample}
119
178
 
120
179
  - No \`$\` sigils: \`bg="background"\`, not \`bg="$background"\`.
121
180
  - No condition objects: there is no \`hoverStyle={{ ... }}\` and no \`$sm={{ ... }}\`.
122
181
  - Modifiers chain left to right and read as prefixes: \`hover:sm:small\`.
123
182
  - Clauses work on variant props too, not just style props, so
124
- \`size="large sm:small"\` selects a different variant value per condition.
183
+ \`size="lg sm:sm"\` selects a different variant value per condition.
125
184
  - When two clauses both apply, the winner is decided by specificity, not by
126
185
  source order: first by platform (\`ios:\` beats \`native:\` beats unprefixed),
127
186
  then by how many conditions the clause carries, then by category
@@ -132,15 +191,15 @@ theme names are bare, and conditions are flat clauses inside the value:
132
191
  ## 7. Verify before reporting success
133
192
 
134
193
  \`\`\`bash
135
- npx tamagui check
194
+ npx tamagui check --strict
136
195
  \`\`\`
137
196
 
138
- \`tamagui check\` reports version mismatches, duplicate installs, lockfile
197
+ \`tamagui check --strict\` reports version mismatches, duplicate installs, lockfile
139
198
  problems, a missing config, and any v2 style syntax left in source. Then run the
140
199
  project's own typecheck and build, and start the app and confirm a Tamagui
141
200
  component renders with its styles applied. A passing typecheck is not sufficient:
142
- flat values are strings, so a misspelled token compiles cleanly and only shows up
143
- at runtime.
201
+ single-token values are checked when \`settings.allowedStyleValues\` is enabled,
202
+ but conditional payloads also need the strict checker.
144
203
 
145
204
  ## 8. Give the agent the project's own vocabulary
146
205
 
@@ -94,13 +94,21 @@ const bundledDefaultGrammarConfig = {
94
94
  ],
95
95
  themeNames: [
96
96
  "light",
97
+ "light_white",
97
98
  "dark_inverse",
99
+ "dark_white",
98
100
  "light_level2",
101
+ "light_white_level2",
99
102
  "dark_inverse_level2",
103
+ "dark_white_level2",
100
104
  "light_level2_level2",
101
105
  "light_level3",
106
+ "light_white_level2_level2",
107
+ "light_white_level3",
102
108
  "dark_inverse_level2_level2",
103
109
  "dark_inverse_level3",
110
+ "dark_white_level2_level2",
111
+ "dark_white_level3",
104
112
  "light_level2_level2_level2",
105
113
  "light_level2_level2_level3",
106
114
  "light_level2_level2_level4",
@@ -110,6 +118,15 @@ const bundledDefaultGrammarConfig = {
110
118
  "light_level3_level3",
111
119
  "light_level3_level4",
112
120
  "light_level4",
121
+ "light_white_level2_level2_level2",
122
+ "light_white_level2_level2_level3",
123
+ "light_white_level2_level2_level4",
124
+ "light_white_level2_level3",
125
+ "light_white_level2_level4",
126
+ "light_white_level3_level2",
127
+ "light_white_level3_level3",
128
+ "light_white_level3_level4",
129
+ "light_white_level4",
113
130
  "dark_inverse_level2_level2_level2",
114
131
  "dark_inverse_level2_level2_level3",
115
132
  "dark_inverse_level2_level2_level4",
@@ -119,40 +136,64 @@ const bundledDefaultGrammarConfig = {
119
136
  "dark_inverse_level3_level3",
120
137
  "dark_inverse_level3_level4",
121
138
  "dark_inverse_level4",
139
+ "dark_active",
140
+ "dark_active_level2",
141
+ "dark_active_level2_level2",
142
+ "dark_active_level2_level2_level2",
143
+ "dark_active_level2_level2_level3",
144
+ "dark_active_level2_level2_level4",
145
+ "dark_active_level2_level3",
146
+ "dark_active_level2_level4",
147
+ "dark_active_level3",
148
+ "dark_active_level3_level2",
149
+ "dark_active_level3_level3",
150
+ "dark_active_level3_level4",
151
+ "dark_active_level4",
152
+ "dark_white_level2_level2_level2",
153
+ "dark_white_level2_level2_level3",
154
+ "dark_white_level2_level2_level4",
155
+ "dark_white_level2_level3",
156
+ "dark_white_level2_level4",
157
+ "dark_white_level3_level2",
158
+ "dark_white_level3_level3",
159
+ "dark_white_level3_level4",
160
+ "dark_white_level4",
122
161
  "light_accent",
123
162
  "light_accent_level2",
124
163
  "light_accent_level2_level2",
125
- "light_accent_level3",
126
- "light_accent_level2_level2_level2",
127
- "light_accent_level2_level2_level3",
128
- "light_accent_level2_level2_level4",
129
164
  "light_accent_level2_level3",
130
165
  "light_accent_level2_level4",
131
- "light_accent_level3_level2",
132
- "light_accent_level3_level3",
133
- "light_accent_level3_level4",
166
+ "light_accent_level3",
134
167
  "light_accent_level4",
135
168
  "light_brand",
136
169
  "light_brand_level2",
137
170
  "light_brand_level2_level2",
138
- "light_brand_level3",
139
171
  "light_brand_level2_level2_level2",
140
172
  "light_brand_level2_level2_level3",
141
173
  "light_brand_level2_level2_level4",
142
174
  "light_brand_level2_level3",
143
175
  "light_brand_level2_level4",
176
+ "light_brand_level3",
144
177
  "light_brand_level3_level2",
145
178
  "light_brand_level3_level3",
146
179
  "light_brand_level3_level4",
147
180
  "light_brand_level4",
148
181
  "light_inverse",
182
+ "light_black",
149
183
  "dark",
184
+ "dark_black",
150
185
  "light_inverse_level2",
186
+ "light_black_level2",
151
187
  "dark_level2",
188
+ "dark_black_level2",
152
189
  "light_inverse_level2_level2",
153
190
  "light_inverse_level3",
191
+ "light_black_level2_level2",
192
+ "light_black_level3",
154
193
  "dark_level2_level2",
155
194
  "dark_level3",
195
+ "dark_black_level2_level2",
196
+ "dark_black_level3",
156
197
  "light_inverse_level2_level2_level2",
157
198
  "light_inverse_level2_level2_level3",
158
199
  "light_inverse_level2_level2_level4",
@@ -162,6 +203,28 @@ const bundledDefaultGrammarConfig = {
162
203
  "light_inverse_level3_level3",
163
204
  "light_inverse_level3_level4",
164
205
  "light_inverse_level4",
206
+ "light_active",
207
+ "light_active_level2",
208
+ "light_active_level2_level2",
209
+ "light_active_level2_level2_level2",
210
+ "light_active_level2_level2_level3",
211
+ "light_active_level2_level2_level4",
212
+ "light_active_level2_level3",
213
+ "light_active_level2_level4",
214
+ "light_active_level3",
215
+ "light_active_level3_level2",
216
+ "light_active_level3_level3",
217
+ "light_active_level3_level4",
218
+ "light_active_level4",
219
+ "light_black_level2_level2_level2",
220
+ "light_black_level2_level2_level3",
221
+ "light_black_level2_level2_level4",
222
+ "light_black_level2_level3",
223
+ "light_black_level2_level4",
224
+ "light_black_level3_level2",
225
+ "light_black_level3_level3",
226
+ "light_black_level3_level4",
227
+ "light_black_level4",
165
228
  "dark_level2_level2_level2",
166
229
  "dark_level2_level2_level3",
167
230
  "dark_level2_level2_level4",
@@ -171,54 +234,75 @@ const bundledDefaultGrammarConfig = {
171
234
  "dark_level3_level3",
172
235
  "dark_level3_level4",
173
236
  "dark_level4",
237
+ "dark_black_level2_level2_level2",
238
+ "dark_black_level2_level2_level3",
239
+ "dark_black_level2_level2_level4",
240
+ "dark_black_level2_level3",
241
+ "dark_black_level2_level4",
242
+ "dark_black_level3_level2",
243
+ "dark_black_level3_level3",
244
+ "dark_black_level3_level4",
245
+ "dark_black_level4",
174
246
  "light_red",
175
247
  "light_red_level2",
248
+ "light_red_level2_level2",
249
+ "light_red_level2_level3",
250
+ "light_red_level2_level4",
176
251
  "light_red_level3",
177
252
  "light_red_level4",
178
253
  "light_yellow",
179
254
  "light_yellow_level2",
255
+ "light_yellow_level2_level2",
256
+ "light_yellow_level2_level3",
257
+ "light_yellow_level2_level4",
180
258
  "light_yellow_level3",
181
259
  "light_yellow_level4",
182
260
  "light_green",
183
261
  "light_green_level2",
262
+ "light_green_level2_level2",
263
+ "light_green_level2_level3",
264
+ "light_green_level2_level4",
184
265
  "light_green_level3",
185
266
  "light_green_level4",
186
267
  "dark_accent",
187
268
  "dark_accent_level2",
188
269
  "dark_accent_level2_level2",
189
- "dark_accent_level3",
190
- "dark_accent_level2_level2_level2",
191
- "dark_accent_level2_level2_level3",
192
- "dark_accent_level2_level2_level4",
193
270
  "dark_accent_level2_level3",
194
271
  "dark_accent_level2_level4",
195
- "dark_accent_level3_level2",
196
- "dark_accent_level3_level3",
197
- "dark_accent_level3_level4",
272
+ "dark_accent_level3",
198
273
  "dark_accent_level4",
199
274
  "dark_brand",
200
275
  "dark_brand_level2",
201
276
  "dark_brand_level2_level2",
202
- "dark_brand_level3",
203
277
  "dark_brand_level2_level2_level2",
204
278
  "dark_brand_level2_level2_level3",
205
279
  "dark_brand_level2_level2_level4",
206
280
  "dark_brand_level2_level3",
207
281
  "dark_brand_level2_level4",
282
+ "dark_brand_level3",
208
283
  "dark_brand_level3_level2",
209
284
  "dark_brand_level3_level3",
210
285
  "dark_brand_level3_level4",
211
286
  "dark_brand_level4",
212
287
  "dark_red",
213
288
  "dark_red_level2",
289
+ "dark_red_level2_level2",
290
+ "dark_red_level2_level3",
291
+ "dark_red_level2_level4",
214
292
  "dark_red_level3",
215
293
  "dark_red_level4",
216
294
  "dark_yellow",
217
295
  "dark_yellow_level2",
296
+ "dark_yellow_level2_level2",
297
+ "dark_yellow_level2_level3",
298
+ "dark_yellow_level2_level4",
218
299
  "dark_yellow_level3",
219
300
  "dark_yellow_level4",
220
301
  "dark_green",
221
302
  "dark_green_level2",
303
+ "dark_green_level2_level2",
304
+ "dark_green_level2_level3",
305
+ "dark_green_level2_level4",
222
306
  "dark_green_level3",
223
307
  "dark_green_level4"
224
308
  ],
@@ -255,17 +339,25 @@ const bundledDefaultGrammarConfig = {
255
339
  "80",
256
340
  "96",
257
341
  "px",
342
+ "0.5",
258
343
  "0-5",
344
+ "1.5",
259
345
  "1-5",
346
+ "2.5",
260
347
  "2-5",
348
+ "3.5",
261
349
  "3-5",
262
350
  "-px",
351
+ "-0.5",
263
352
  "-0-5",
264
353
  "-1",
354
+ "-1.5",
265
355
  "-1-5",
266
356
  "-2",
357
+ "-2.5",
267
358
  "-2-5",
268
359
  "-3",
360
+ "-3.5",
269
361
  "-3-5",
270
362
  "-4",
271
363
  "-5",
@@ -326,9 +418,13 @@ const bundledDefaultGrammarConfig = {
326
418
  "80",
327
419
  "96",
328
420
  "px",
421
+ "0.5",
329
422
  "0-5",
423
+ "1.5",
330
424
  "1-5",
425
+ "2.5",
331
426
  "2-5",
427
+ "3.5",
332
428
  "3-5"
333
429
  ],
334
430
  radius: [
@@ -656,28 +752,22 @@ const bundledDefaultGrammarConfig = {
656
752
  "brand-800",
657
753
  "brand-900",
658
754
  "brand-950",
659
- "shadow-1",
660
- "shadow-2",
661
- "shadow-3",
662
- "shadow-4",
663
- "shadow-5",
664
- "shadow-6",
665
- "shadow-7",
666
- "color1",
667
- "color2",
668
- "color3",
669
- "color4",
670
- "color5",
671
- "color6",
672
- "color7",
673
- "color8",
674
- "color9",
675
- "color10",
676
- "color11",
755
+ "color-1",
756
+ "color-2",
757
+ "color-3",
758
+ "color-4",
759
+ "color-5",
760
+ "color-6",
761
+ "color-7",
762
+ "color-8",
763
+ "color-9",
764
+ "color-10",
765
+ "color-11",
677
766
  "background",
678
767
  "background-hover",
679
768
  "background-press",
680
769
  "background-focus",
770
+ "background-active",
681
771
  "border-color",
682
772
  "border-color-hover",
683
773
  "border-color-press",
@@ -690,7 +780,14 @@ const bundledDefaultGrammarConfig = {
690
780
  "outline-color",
691
781
  "shadow-color",
692
782
  "accent-background",
693
- "accent-color"
783
+ "accent-color",
784
+ "shadow-1",
785
+ "shadow-2",
786
+ "shadow-3",
787
+ "shadow-4",
788
+ "shadow-5",
789
+ "shadow-6",
790
+ "shadow-7"
694
791
  ],
695
792
  fontFamily: ["body", "heading"],
696
793
  fontSize: [
package/dist/upgrade.cjs CHANGED
@@ -29,8 +29,8 @@ __export(upgrade_exports, { upgrade: () => upgrade });
29
29
  module.exports = __toCommonJS(upgrade_exports);
30
30
  var import_chalk = __toESM(require("chalk"));
31
31
  var import_node_child_process = require("node:child_process");
32
+ var import_glob = require("glob");
32
33
  var import_node_fs = require("node:fs");
33
- var import_node_path = require("node:path");
34
34
  const TAMAGUI_PACKAGES_PATTERN = /^(@tamagui\/|tamagui$)/;
35
35
  const COMMIT_TYPE_ORDER = [
36
36
  "feat",
@@ -78,24 +78,18 @@ function parseVersionSpecifier(version) {
78
78
  cleanVersion: version
79
79
  };
80
80
  }
81
- function findPackageJsonFiles(root) {
82
- const files = [];
83
- const rootPkgPath = (0, import_node_path.join)(root, "package.json");
84
- if ((0, import_node_fs.existsSync)(rootPkgPath)) {
85
- files.push(rootPkgPath);
86
- }
87
- try {
88
- const result = (0, import_node_child_process.execSync)(`find "${root}" -name "package.json" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null`, {
89
- encoding: "utf-8",
90
- maxBuffer: 10 * 1024 * 1024
91
- });
92
- const foundFiles = result.trim().split("\n").filter(Boolean);
93
- files.push(...foundFiles.filter((f) => !files.includes(f)));
94
- } catch {}
95
- return files;
96
- }
97
81
  function findTamaguiPackages(root) {
98
- const packageJsonFiles = findPackageJsonFiles(root);
82
+ const packageJsonFiles = (0, import_glob.globSync)("**/package.json", {
83
+ cwd: root,
84
+ absolute: true,
85
+ nodir: true,
86
+ ignore: [
87
+ "**/node_modules/**",
88
+ "**/.git/**",
89
+ "**/dist/**",
90
+ "**/build/**"
91
+ ]
92
+ });
99
93
  const packages = [];
100
94
  for (const filePath of packageJsonFiles) {
101
95
  try {
@@ -129,7 +123,11 @@ function findTamaguiPackages(root) {
129
123
  }
130
124
  async function getLatestVersion() {
131
125
  try {
132
- const result = (0, import_node_child_process.execSync)("npm view tamagui version", { encoding: "utf-8" });
126
+ const result = (0, import_node_child_process.execFileSync)("npm", [
127
+ "view",
128
+ "tamagui",
129
+ "version"
130
+ ], { encoding: "utf-8" });
133
131
  return result.trim();
134
132
  } catch (err) {
135
133
  throw new Error("Failed to fetch latest tamagui version from npm");
@@ -180,7 +178,7 @@ function getChangelogFromGit(fromVersion, toVersion, debug) {
180
178
  const commits = [];
181
179
  try {
182
180
  try {
183
- (0, import_node_child_process.execSync)("git fetch --tags 2>/dev/null", {
181
+ (0, import_node_child_process.execFileSync)("git", ["fetch", "--tags"], {
184
182
  encoding: "utf-8",
185
183
  stdio: "pipe"
186
184
  });
@@ -192,7 +190,13 @@ function getChangelogFromGit(fromVersion, toVersion, debug) {
192
190
  }
193
191
  let result;
194
192
  try {
195
- result = (0, import_node_child_process.execSync)(`git log ${fromTag}..${toTag} --pretty=format:"%H|%ad|%s" --date=short 2>/dev/null`, {
193
+ result = (0, import_node_child_process.execFileSync)("git", [
194
+ "log",
195
+ `${fromTag}..${toTag}`,
196
+ "--pretty=format:%H|%ad|%s",
197
+ "--date=short",
198
+ "--"
199
+ ], {
196
200
  encoding: "utf-8",
197
201
  maxBuffer: 10 * 1024 * 1024
198
202
  });
@@ -395,6 +399,10 @@ async function upgrade(options = {}) {
395
399
  console.log(import_chalk.default.gray(` Current version: ${import_chalk.default.white(fromVersion)}`));
396
400
  console.log(import_chalk.default.gray(` Target version: ${import_chalk.default.white(toVersion)}`));
397
401
  console.log("");
402
+ if (fromVersion.startsWith("2.") && toVersion.startsWith("3.")) {
403
+ console.log(import_chalk.default.yellow("Run `tamagui migrate --from v2` for the required API and configuration migration."));
404
+ console.log("");
405
+ }
398
406
  if (packages.length > 0 && !changelogOnly) {
399
407
  displayPackageSummary(packages);
400
408
  }
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@tamagui/cli",
3
- "version": "3.0.0-beta.924.1",
3
+ "version": "3.0.1",
4
+ "license": "MIT",
4
5
  "bin": {
5
6
  "tama": "dist/index.cjs",
6
7
  "tamagui": "dist/index.cjs"
@@ -51,12 +52,12 @@
51
52
  "test:web": "bun run test"
52
53
  },
53
54
  "dependencies": {
54
- "@tamagui/generate-themes": "3.0.0-beta.924.1",
55
- "@tamagui/metro-plugin": "3.0.0-beta.924.1",
56
- "@tamagui/static": "3.0.0-beta.924.1",
57
- "@tamagui/to-tailwind": "3.0.0-beta.924.1",
58
- "@tamagui/types": "3.0.0-beta.924.1",
59
- "@tamagui/vite-plugin": "3.0.0-beta.924.1",
55
+ "@tamagui/generate-themes": "3.0.1",
56
+ "@tamagui/metro-plugin": "3.0.1",
57
+ "@tamagui/static": "3.0.1",
58
+ "@tamagui/to-tailwind": "3.0.1",
59
+ "@tamagui/types": "3.0.1",
60
+ "@tamagui/vite-plugin": "3.0.1",
60
61
  "arg": "^5.0.2",
61
62
  "chalk": "^4.1.2",
62
63
  "change-case": "^4.1.2",
@@ -73,12 +74,12 @@
73
74
  "opener": "^1.5.2",
74
75
  "prompts": "2.1.0",
75
76
  "ts-morph": "^28.0.0",
76
- "typescript": "~6.0.3",
77
+ "typescript": "7.0.2",
77
78
  "url": "^0.11.0",
78
- "@tamagui/language-service": "3.0.0-beta.924.1"
79
+ "@tamagui/language-service": "3.0.1"
79
80
  },
80
81
  "devDependencies": {
81
- "@tamagui/build": "3.0.0-beta.924.1",
82
+ "@tamagui/build": "3.0.1",
82
83
  "@types/chokidar": "^2.1.3",
83
84
  "@types/marked": "^5.0.0",
84
85
  "vitest": "4.1.0"
@@ -87,5 +88,6 @@
87
88
  "type": "git",
88
89
  "url": "git+https://github.com/tamagui/tamagui.git",
89
90
  "directory": "code/core/cli"
90
- }
91
+ },
92
+ "releaseSourceCommit": "c156b7cc55e5a6cc5883ebc8189720850ac32dbd"
91
93
  }
package/src/build.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  CompilerFrontend,
3
+ createTsconfigPathsMatcher,
3
4
  loadTamagui,
4
5
  loadTamaguiBuildConfigSync,
5
6
  compilerProjectStamp,
@@ -14,13 +15,6 @@ import { tmpdir } from 'node:os'
14
15
  import { spawn } from 'node:child_process'
15
16
  import { createHash } from 'node:crypto'
16
17
  import { createRequire } from 'node:module'
17
- import {
18
- findConfigFile,
19
- nodeModuleNameResolver,
20
- parseJsonConfigFileContent,
21
- readConfigFile,
22
- sys,
23
- } from 'typescript'
24
18
 
25
19
  const cliVersion = (
26
20
  createRequire(typeof __filename === 'string' ? __filename : import.meta.url)(
@@ -163,24 +157,16 @@ export const build = async (
163
157
  const require = createRequire(
164
158
  typeof __filename === 'string' ? __filename : import.meta.url
165
159
  )
166
- const configPath =
167
- findConfigFile(root, sys.fileExists, 'tsconfig.json') ||
168
- findConfigFile(root, sys.fileExists, 'jsconfig.json')
169
- const compilerOptions = configPath
170
- ? parseJsonConfigFileContent(
171
- (() => {
172
- const loaded = readConfigFile(configPath, sys.readFile)
173
- if (loaded.error) throw new Error(String(loaded.error.messageText))
174
- return loaded.config
175
- })(),
176
- sys,
177
- dirname(configPath)
178
- ).options
179
- : {}
160
+ const tsconfigPaths = createTsconfigPathsMatcher(undefined, root)
180
161
  const resolveCompilerId = (specifier: string, importer: string): string | null => {
181
- const resolved = nodeModuleNameResolver(specifier, importer, compilerOptions, sys)
182
- .resolvedModule?.resolvedFileName
183
- if (resolved && !resolved.endsWith('.d.ts')) return resolved
162
+ for (const candidate of tsconfigPaths?.(specifier) ?? []) {
163
+ try {
164
+ const resolved = require.resolve(candidate, {
165
+ paths: [dirname(importer), root],
166
+ })
167
+ if (!resolved.endsWith('.d.ts')) return resolved
168
+ } catch {}
169
+ }
184
170
  try {
185
171
  return require.resolve(specifier, { paths: [dirname(importer), root] })
186
172
  } catch {