zhou zhou
20 小时以前 46d872c1a5b77aa8799de4a64888a0a24a1422d6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import assert from 'node:assert/strict'
import fs from 'node:fs'
import path from 'node:path'
import test from 'node:test'
 
const projectRoot = path.resolve(import.meta.dirname, '..')
 
const migrationArtifacts = [
  'docs/superpowers/specs/2026-03-27-art-design-pro-js-migration-design.md',
  'docs/superpowers/plans/2026-03-27-art-design-pro-js-migration-plan.md',
  'scripts/migrate-to-js.mjs',
  'scripts/restore-vue-template-imports.mjs',
  'tests/js-migration-sanity.test.mjs',
  'src/types'
]
 
test('migration-only artifacts have been removed from the working tree', () => {
  for (const relativePath of migrationArtifacts) {
    const fullPath = path.join(projectRoot, relativePath)
    assert.equal(
      fs.existsSync(fullPath),
      false,
      `Expected migration-only artifact to be removed: ${relativePath}`
    )
  }
})
 
test('package scripts no longer expose one-off migration entry points', () => {
  const packageJsonPath = path.join(projectRoot, 'package.json')
  const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
 
  assert.equal(
    Reflect.has(packageJson.scripts || {}, 'migrate:js'),
    false,
    'Expected package.json scripts.migrate:js to be removed'
  )
})