GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(cli): skip npm update hint when the package is current · pingdotgg/t3code@3d64c07

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/server/src/cli
    • update.test.ts
    • update.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/server/src/cli/update.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/cli/update.test.ts
+11-5Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,22 +159,28 @@ it.layer(NodeServices.layer)("t3 update launcher", (it) => {
159159
const realPrefix = yield* fs.realPath(prefix);
160160
const stillRuns = `The t3 npm package still runs ${packageJson.version}.`;
161161

162-
for (const [launcher, expected] of [
162+
for (const [launcher, targetVersion, expected] of [
163163
[
164164
npmGlobal,
165+
"9.9.9",
165166
`${stillRuns} Run \`npm install --global --prefix ${realPrefix} [email protected]\` to move to 9.9.9.`,
166167
],
167-
[npx, `${stillRuns} Run \`npx [email protected]\` to move to 9.9.9.`],
168+
[npx, "9.9.9", `${stillRuns} Run \`npx [email protected]\` to move to 9.9.9.`],
168169
[
169170
projectLocal,
171+
"9.9.9",
170172
`${stillRuns} Update it to [email protected] with the package manager that installed it.`,
171173
],
172-
[undefined, "Run /runtime/versions/9.9.9/t3"],
174+
[undefined, "9.9.9", "Run /runtime/versions/9.9.9/t3"],
175+
[npmGlobal, packageJson.version, `Run /runtime/versions/${packageJson.version}/t3`],
176+
[npx, packageJson.version, `Run /runtime/versions/${packageJson.version}/t3`],
177+
[projectLocal, packageJson.version, `Run /runtime/versions/${packageJson.version}/t3`],
178+
[undefined, packageJson.version, `Run /runtime/versions/${packageJson.version}/t3`],
173179
] as const) {
174180
const nextStep = yield* resolveNextStep({
175181
repointed: false,
176-
entryPath: "/runtime/versions/9.9.9/t3",
177-
targetVersion: "9.9.9",
182+
entryPath: `/runtime/versions/${targetVersion}/t3`,
183+
targetVersion,
178184
}).pipe(
179185
Effect.provideService(HostProcess.ExecutablePath, executable),
180186
Effect.provideService(HostProcess.Arguments, [executable, executable]),
Collapse file

‎apps/server/src/cli/update.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/cli/update.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ export const resolveNextStep = Effect.fn("cli.update.resolve_next_step")(functio
197197
readonly targetVersion: string;
198198
}) {
199199
if (input.repointed) return "Run t3 to get started.";
200+
if (input.targetVersion === packageJson.version) return `Run ${input.entryPath}`;
200201
const stillRuns = `The t3 npm package still runs ${packageJson.version}.`;
201202
const installation = yield* resolveServerInstallation;
202203
if (installation !== null) {

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.