This commit is contained in:
shadcn
2026-03-16 16:49:31 +04:00
parent aaf8c0770c
commit 2b0dc2116a
4 changed files with 9 additions and 5 deletions

View File

@@ -1,5 +1,10 @@
import path from "path"
// Node can resolve `package.json#imports` and `package.json#exports` at
// runtime, but the CLI needs the matched pattern, local filesystem target, and
// emit behavior as data so it can place files and rewrite imports consistently.
// This module is the shared matcher for those normalized entry shapes.
export type ImportEmitMode = "strip_extension" | "preserve_extension"
export type ImportResolutionEntry = {

View File

@@ -7,9 +7,8 @@ import {
type ImportEmitMode,
type ImportResolutionEntry,
type ImportResolutionMatch,
} from "@/src/utils/import-entries"
export type { ImportEmitMode } from "@/src/utils/import-entries"
} from "@/src/utils/import-matcher"
export type { ImportEmitMode } from "@/src/utils/import-matcher"
export type PackageImportEntry = ImportResolutionEntry
export type PackageImportMatch = ImportResolutionMatch

View File

@@ -2,7 +2,7 @@ import {
resolvePackageImport,
type ImportEmitMode,
} from "@/src/utils/package-imports"
import { resolveWorkspacePackageExport } from "@/src/utils/workspace-package-exports"
import { resolveWorkspacePackageExport } from "@/src/utils/workspace"
import { createMatchPath, type ConfigLoaderSuccessResult } from "tsconfig-paths"
export type ResolvedImport = {

View File

@@ -10,7 +10,7 @@ import {
type ImportEmitMode,
type ImportResolutionEntry,
type ImportResolutionMatch,
} from "@/src/utils/import-entries"
} from "@/src/utils/import-matcher"
type WorkspacePackageInfo = {
packageName: string