export type Metadata = { /** * the name of the module being required as indicated by its package.json */ name: string; /** * shortened version of the module name + file being required */ shortname: string; /** * the version of the module being required as indicated by its package.json */ version: string; /** * the location of the module being required */ packageDir: string; /** * the absolute filename of the module file being required */ file: string; /** * `main` field from the package being required's package.json */ main?: string | undefined; }; /** * @typedef {Object} Metadata * @property {string} name the name of the module being required as indicated by its package.json * @property {string} shortname shortened version of the module name + file being required * @property {string} version the version of the module being required as indicated by its package.json * @property {string} packageDir the location of the module being required * @property {string} file the absolute filename of the module file being required * @property {string=} main `main` field from the package being required's package.json */ /** * Resolves the metadata of a package given it's resolved name. * @param {string=} file Absolute path to the module file * @param {string=} nodeModulesDir Absolute path to the node_modules directory * @param {import('pino').Logger=} logger * @param {string=} startAt Optional path to start searching for package.json from when recursing * @returns {Metadata?} */ export function resolveMetadata(file?: string | undefined, nodeModulesDir?: string | undefined, logger?: import("pino").Logger | undefined, startAt?: string | undefined): Metadata | null; //# sourceMappingURL=package-finder.d.ts.map