mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
fix(web): update NPM version fetching logic
This commit is contained in:
@@ -11,12 +11,12 @@ import {
|
||||
incompatibleFlagsForBackend,
|
||||
isWebFrontend,
|
||||
validateAddonsAgainstFrontends,
|
||||
validateAlchemyCompatibility,
|
||||
validateApiFrontendCompatibility,
|
||||
validateExamplesCompatibility,
|
||||
validateServerDeployRequiresBackend,
|
||||
validateWebDeployRequiresWebFrontend,
|
||||
validateWorkersCompatibility,
|
||||
validateAlchemyCompatibility,
|
||||
} from "./compatibility-rules";
|
||||
import { exitWithError } from "./errors";
|
||||
|
||||
|
||||
@@ -13,11 +13,11 @@ const NpmPackage = () => {
|
||||
);
|
||||
if (!res.ok) throw new Error("Failed to fetch version");
|
||||
const data = await res.json();
|
||||
const latestVersion = data[0].tag_name.split("@")[1];
|
||||
const latestVersion = data[0].tag_name.replace(/^v/, "");
|
||||
setVersion(latestVersion);
|
||||
} catch (error) {
|
||||
console.error("Error fetching NPM version:", error);
|
||||
setVersion("?.?.?");
|
||||
setVersion("latest");
|
||||
}
|
||||
};
|
||||
getLatestVersion();
|
||||
|
||||
@@ -358,7 +358,7 @@ export const TECH_OPTIONS: Record<
|
||||
description: "Deploy to Cloudflare Workers using Alchemy",
|
||||
icon: `${ICON_BASE_URL}/alchemy.png`,
|
||||
color: "from-purple-400 to-purple-600",
|
||||
className: "scale-150"
|
||||
className: "scale-150",
|
||||
},
|
||||
{
|
||||
id: "none",
|
||||
@@ -383,7 +383,7 @@ export const TECH_OPTIONS: Record<
|
||||
description: "Deploy to Cloudflare Workers using Alchemy",
|
||||
icon: `${ICON_BASE_URL}/alchemy.png`,
|
||||
color: "from-purple-400 to-purple-600",
|
||||
className: "scale-150"
|
||||
className: "scale-150",
|
||||
},
|
||||
{
|
||||
id: "none",
|
||||
|
||||
Reference in New Issue
Block a user