Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(create-remix): default Remix version to CLI version #7670

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(create): default Remix version to CLI version
  • Loading branch information
markdalgleish committed Oct 16, 2023
commit 2d6b19cde86798e53e6d2f272bccd578025ce69a
5 changes: 5 additions & 0 deletions .changeset/create-remix-default-remix-version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-remix": patch
---

Set default Remix version to match the version of `create-remix` being used. This most notably enables easier usage of tags, e.g. `npm create remix@nightly`.
6 changes: 2 additions & 4 deletions packages/create-remix/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import {
} from "./utils";
import { renderLoadingIndicator } from "./loading-indicator";
import { copyTemplate, CopyTemplateError } from "./copy-template";
import { getLatestRemixVersion } from "./remix-version";

async function createRemix(argv: string[]) {
let ctx = await getContext(argv);
Expand Down Expand Up @@ -121,7 +120,6 @@ async function getContext(argv: string[]): Promise<Context> {
} = flags;

let cwd = flags["_"][0] as string;
let latestRemixVersion = await getLatestRemixVersion();
let interactive = isInteractive();
let projectName = cwd;

Expand All @@ -137,7 +135,7 @@ async function getContext(argv: string[]): Promise<Context> {
} else {
log(
`\n${color.warning(
`${selectedRemixVersion} is an invalid version specifier. Using Remix v${latestRemixVersion}.`
`${selectedRemixVersion} is an invalid version specifier. Using Remix v${thisRemixVersion}.`
)}`
);
selectedRemixVersion = undefined;
Expand Down Expand Up @@ -168,7 +166,7 @@ async function getContext(argv: string[]): Promise<Context> {
),
projectName,
prompt,
remixVersion: selectedRemixVersion || latestRemixVersion,
remixVersion: selectedRemixVersion || thisRemixVersion,
template,
token,
versionRequested,
Expand Down
27 changes: 0 additions & 27 deletions packages/create-remix/remix-version.ts

This file was deleted.