From 85bf1433be150994c91a91efc952dd00eaa8621f Mon Sep 17 00:00:00 2001 From: Luiz Ferraz Date: Mon, 1 Jul 2024 14:28:20 -0300 Subject: [PATCH] Test --- docs/src/components/Version.astro | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/src/components/Version.astro b/docs/src/components/Version.astro index 0563c402..85443ba3 100644 --- a/docs/src/components/Version.astro +++ b/docs/src/components/Version.astro @@ -30,6 +30,8 @@ export const localPackages = Lazy.of(() => { packages.set(packageJson.name, packageJson.version); } + console.log(packages); + return packages; }); @@ -42,6 +44,8 @@ const { pkgName } = Astro.props as Props; async function getVersion() { if (localPackages.get().has(pkgName)) return localPackages.get().get(pkgName); + throw new Error('Required NPM'); + const url = `https://registry.npmjs.org/${pkgName}/latest`; const response = await simpleFetch(url);