Files
NapCatQQ/.pnpm-store/v3/files/7b/96d5c2a58fbe160ea55b236a2ad7580202fb0c5c537ee5919fd667ef84d8bfd89e9f8751ac6ad804e9baade565f09a1dc5926ae92647558b46573f59c9e260
TanTan e311ca3275
Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

28 lines
614 B
Plaintext

import path from 'path';
import findUp from 'find-up';
import {readPackageAsync, readPackageSync} from 'read-pkg';
export async function readPackageUpAsync(options) {
const filePath = await findUp('package.json', options);
if (!filePath) {
return;
}
return {
packageJson: await readPackageAsync({...options, cwd: path.dirname(filePath)}),
path: filePath
};
}
export function readPackageUpSync(options) {
const filePath = findUp.sync('package.json', options);
if (!filePath) {
return;
}
return {
packageJson: readPackageSync({...options, cwd: path.dirname(filePath)}),
path: filePath
};
}