@vzn/vx-migrate 0.0.491 → 0.0.492

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vzn/vx-migrate",
3
- "version": "0.0.491",
3
+ "version": "0.0.492",
4
4
  "license": "MIT",
5
5
  "description": "Adopt @vzn/vx from Turborepo or Nx: run the repo unchanged, migrate it to vx.config.ts, and keep your Turbo or Nx remote cache",
6
6
  "keywords": [
@@ -39,7 +39,7 @@
39
39
  "access": "public"
40
40
  },
41
41
  "peerDependencies": {
42
- "@vzn/vx": "^0.0.491"
42
+ "@vzn/vx": "^0.0.492"
43
43
  },
44
44
  "repository": {
45
45
  "type": "git",
@@ -164,6 +164,7 @@ const KNOWN_TASK_KEYS = new Set([
164
164
  'passThroughEnv',
165
165
  'cache',
166
166
  'persistent',
167
+ 'interactive',
167
168
  'extends',
168
169
  'outputLogs',
169
170
  // `outputLogs` as Turbo 1 spells it (renamed in 2.0; 1.13 still reads it).
@@ -1644,22 +1645,12 @@ function buildTask(
1644
1645
  opts.splice(k, globals[k]).some((v) => typeof v !== 'string') ? globals[k] : [],
1645
1646
  )
1646
1647
  const persistent = def.persistent === true
1647
- const cacheEnabled = def.cache !== false && !persistent
1648
+ // Turbo refuses an interactive task that caches; vx refuses `cache` on one.
1649
+ const interactive = def['interactive'] === true
1650
+ const cacheEnabled = def.cache !== false && !persistent && !interactive
1648
1651
 
1649
1652
  for (const [key, value] of Object.entries(def)) {
1650
1653
  if (KNOWN_TASK_KEYS.has(key)) continue
1651
- // Turbo hands an interactive task the terminal's stdin in its TUI; vx
1652
- // hands no task the terminal (runner.ts), so a prompt there reads end
1653
- // of input (create-t3-turbo's \`drizzle-kit push\`). Nothing to map.
1654
- if (key === 'interactive') {
1655
- if (value === true) {
1656
- todos.push(
1657
- 'turbo key "interactive": vx gives no task the terminal, so a prompt reads end of ' +
1658
- 'input — run a task that asks for input outside vx',
1659
- )
1660
- }
1661
- continue
1662
- }
1663
1654
  todos.push(
1664
1655
  `turbo key ${JSON.stringify(key)} (${JSON.stringify(value)}) has no vx equivalent — ` +
1665
1656
  'map it manually',
@@ -1806,6 +1797,7 @@ function buildTask(
1806
1797
  exec.persistent = {}
1807
1798
  todos.push(opts.persistentTodo)
1808
1799
  }
1800
+ if (interactive) exec.interactive = true
1809
1801
 
1810
1802
  const task: Record<string, unknown> = { exec }
1811
1803
  if (typeof def['description'] === 'string') task.description = def['description']