import { ComponentID } from '@teambit/component-id'; import type { PathLinuxAbsolute, PathOsBased, PathOsBasedAbsolute } from '@teambit/toolbox.path.path'; export interface ResolvedPackageData { fullPath: PathOsBasedAbsolute; packageJsonPath?: PathOsBased; packageJsonContent?: Record; dependentPackageJsonPath?: PathOsBased; name: string; concreteVersion?: string; versionUsedByDependent?: string; componentId?: ComponentID; } /** * find data such as name/version/component-id from the package.json of a component and its dependent. * the version from the dependent may have range (such as ~ or ^). * the version from the dependency is an exact version. * for a package that is not bit-component, we're interested in the range because that's how it was * set in the first place and changing it to an exact version result in the component modified. * for a bit-component, we're interested in the exact version because this is the version that gets * entered into "dependency" field, which not supports range. (when a component is installed via * npm, it can be saved into the package.json with range: ^, ~). */ export declare function resolvePackageData(dependentDir: string, packageFullPath: PathLinuxAbsolute): ResolvedPackageData | undefined;