MCPcopy
hub / github.com/t3-oss/create-t3-app / renderVersionWarning

Function renderVersionWarning

cli/src/utils/renderVersionWarning.ts:7–32  ·  view source on GitHub ↗
(npmVersion: string)

Source from the content-addressed store, hash-verified

5import { logger } from "./logger.js";
6
7export const renderVersionWarning = (npmVersion: string) => {
8 const currentVersion = getVersion();
9
10 // console.log("current", currentVersion);
11 // console.log("npm", npmVersion);
12
13 if (currentVersion.includes("beta")) {
14 logger.warn(" You are using a beta version of create-t3-app.");
15 logger.warn(" Please report any bugs you encounter.");
16 } else if (currentVersion.includes("next")) {
17 logger.warn(
18 " You are running create-t3-app with the @next tag which is no longer maintained."
19 );
20 logger.warn(" Please run the CLI with @latest instead.");
21 } else if (currentVersion !== npmVersion) {
22 logger.warn(" You are using an outdated version of create-t3-app.");
23 logger.warn(
24 " Your version:",
25 currentVersion + ".",
26 "Latest version in the npm registry:",
27 npmVersion
28 );
29 logger.warn(" Please run the CLI with @latest to get the latest updates.");
30 }
31 console.log("");
32};
33
34/**
35 * Copyright (c) 2015-present, Facebook, Inc.

Callers 1

mainFunction · 0.85

Calls 1

getVersionFunction · 0.85

Tested by

no test coverage detected