feat(reporters): pass the CLI's version number to reporters (#38)
This commit is contained in:
parent
bf34cc427a
commit
bad4e252f3
9 changed files with 32 additions and 7 deletions
|
|
@ -5,7 +5,7 @@ type PackageInfo = {
|
|||
version: string;
|
||||
};
|
||||
|
||||
export const getPackageInfo = async () => {
|
||||
const getPackageInfo = async () => {
|
||||
const packageInfoPath = fileURLToPath(new URL('../package.json', import.meta.url));
|
||||
|
||||
try {
|
||||
|
|
@ -26,3 +26,5 @@ export const getPackageInfo = async () => {
|
|||
|
||||
throw new Error(`Could not read package info from: ${packageInfoPath}`);
|
||||
};
|
||||
|
||||
export const { version } = await getPackageInfo();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue