Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Fryuni committed Jul 1, 2024
1 parent 0339bd4 commit 85bf143
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/src/components/Version.astro
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ export const localPackages = Lazy.of(() => {
packages.set(packageJson.name, packageJson.version);
}
console.log(packages);
return packages;
});
Expand All @@ -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);
Expand Down

0 comments on commit 85bf143

Please sign in to comment.