An open source design system that's fully customizable and agent ready
TypeScript
test: support promoted theme-surface codemod (#7408)
Cindy Zhangdfce1758ce00
diff --git a/packages/cli/foundation/discovery/theming-targets.test.mjs b/packages/cli/foundation/discovery/theming-targets.test.mjsindex fadc22fbc4..3c7c92d82a 100644--- a/packages/cli/foundation/discovery/theming-targets.test.mjs+++ b/packages/cli/foundation/discovery/theming-targets.test.mjs@@ -25,7 +25,15 @@ import {describe, it, expect} from 'vitest';import * as fs from 'node:fs';import * as path from 'node:path';import {findCoreDir} from '../fs/paths.mjs';-import {DEPRECATED_THEME_TARGETS} from '../../assets/codemods/transforms/next/migrate-deprecated-theme-surface.mjs';+const promotedThemeSurfaceTransform = new URL(+ '../../assets/codemods/transforms/v0.7.0/migrate-deprecated-theme-surface.mjs',+ import.meta.url,+);+const {DEPRECATED_THEME_TARGETS} = await import(+ fs.existsSync(promotedThemeSurfaceTransform)+ ? promotedThemeSurfaceTransform.href+ : '../../assets/codemods/transforms/next/migrate-deprecated-theme-surface.mjs'+);import {discoverComponents,findComponentReadme,