Skip to content

Commit

Permalink
support remix package
Browse files Browse the repository at this point in the history
  • Loading branch information
markdalgleish committed Jan 9, 2024
1 parent f0d9e73 commit 2477969
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .changeset/wicked-suits-heal.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"create-remix": patch
---

Only update `*` versions for `@remix-run/*` dependencies
Only update `*` versions for Remix dependencies
3 changes: 2 additions & 1 deletion packages/create-remix/__tests__/create-remix-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -989,8 +989,9 @@ describe("create-remix CLI", () => {

expect(dependencies).toMatchObject({
"@remix-run/react": expect.any(String),
remix: expect.any(String),
"not-remix": "*",
})
});
});

describe("when project directory contains files", () => {
Expand Down
3 changes: 2 additions & 1 deletion packages/create-remix/__tests__/fixtures/stack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
},
"dependencies": {
"@remix-run/react": "*",
"not-remix": "*"
"not-remix": "*",
"remix": "*"
},
"devDependencies": {},
"engines": {
Expand Down
5 changes: 4 additions & 1 deletion packages/create-remix/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,10 @@ async function updatePackageJSON(ctx: Context) {

for (let dependency in dependencies) {
let version = dependencies[dependency];
if (dependency.startsWith("@remix-run") && version === "*") {
if (
(dependency.startsWith("@remix-run/") || dependency === "remix") &&
version === "*"
) {
dependencies[dependency] = semver.prerelease(ctx.remixVersion)
? // Templates created from prereleases should pin to a specific version
ctx.remixVersion
Expand Down

0 comments on commit 2477969

Please sign in to comment.