@vzn/vx-migrate 0.0.636 → 0.0.638

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.
@@ -9,9 +9,9 @@ import {
9
9
  type MigrationFormat,
10
10
  type MigrationPlan,
11
11
  PERSISTENT_TODO,
12
- type ProjectMeta,
13
12
  quoteTsLiteral as quote,
14
13
  } from '@vzn/vx'
14
+ import type { PackageMeta } from './packages.js'
15
15
  import {
16
16
  mapTurboWorkspace,
17
17
  rootTaskProject,
@@ -42,7 +42,7 @@ const PRESET_NAMES: Record<TurboGlobal, string> = {
42
42
 
43
43
  export async function migrateTurbo(
44
44
  root: string,
45
- metas: readonly ProjectMeta[],
45
+ metas: readonly PackageMeta[],
46
46
  format: MigrationFormat = 'ts',
47
47
  ): Promise<MigrationPlan> {
48
48
  const tracked = await trackedFiles(root)
@@ -56,9 +56,8 @@ export async function migrateTurbo(
56
56
  sourceNames: (dirs) => spelledNames(root, dirs, tracked),
57
57
  ignored: (rels) => gitIgnored(root, rels),
58
58
  })
59
- // Turbo never cleans an output and vx cleans one before every run: a
60
- // written `dist/**` beside a committed `dist/keep.js` deleted it on the
61
- // first run. turbo() takes such files back each run; the configs must.
59
+ // A reader whose `!` hides a committed file under another task's output
60
+ // runs uncached, as under turbo().
62
61
  if (tracked !== null)
63
62
  for (const [id, todo] of spareTrackedOutputs(root, mapping.projects, tracked)) {
64
63
  const at = id.lastIndexOf('#')
@@ -128,8 +127,8 @@ export async function migrateTurbo(
128
127
  */
129
128
  async function withRootProject(
130
129
  root: string,
131
- metas: readonly ProjectMeta[],
132
- ): Promise<readonly ProjectMeta[]> {
130
+ metas: readonly PackageMeta[],
131
+ ): Promise<readonly PackageMeta[]> {
133
132
  const named = await rootTaskProject(root)
134
133
  // A root the globs list already is a project of this name; a package
135
134
  // that took the name leaves the root none to take.
@@ -2,14 +2,15 @@
2
2
  // `run` block (vite-plus's `vp run`) and its package.json scripts, as a
3
3
  // migration plan.
4
4
 
5
- import { type MigrationFormat, type MigrationPlan, type ProjectMeta } from '@vzn/vx'
5
+ import { type MigrationFormat, type MigrationPlan } from '@vzn/vx'
6
+ import type { PackageMeta } from './packages.js'
6
7
  import { spelledNames } from './spelled-env.js'
7
8
  import { spareTrackedOutputs, trackedFiles, trackedKinds } from './tracked-outputs.js'
8
9
  import { mapViteTaskWorkspace, viteTaskProjects } from './vite-task/vite-task-map.js'
9
10
 
10
11
  export async function migrateViteTask(
11
12
  root: string,
12
- metas: readonly ProjectMeta[],
13
+ metas: readonly PackageMeta[],
13
14
  format: MigrationFormat = 'ts',
14
15
  ): Promise<MigrationPlan> {
15
16
  const withRoot = await viteTaskProjects(root, metas)
@@ -19,8 +20,8 @@ export async function migrateViteTask(
19
20
  ownConfig: () => `vx.config.${format}`,
20
21
  sourceNames: (dirs) => spelledNames(root, dirs, tracked),
21
22
  })
22
- // A committed file under an output is taken back, or the first run's
23
- // clean deletes it (Vite Task never cleans).
23
+ // A reader whose `!` hides a committed file under another task's output
24
+ // runs uncached.
24
25
  if (tracked !== null)
25
26
  for (const [id, todo] of spareTrackedOutputs(root, mapped.projects, tracked)) {
26
27
  const at = id.lastIndexOf('#')