Skip to content

Commit

Permalink
Don't auto-update to new major versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jculvey committed Aug 23, 2023
1 parent 87a6794 commit f6b5b3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .changeset/nervous-insects-happen.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
"create-cloudflare": minor
"create-cloudflare": major
---

C3: Checks for a newer version of create-cloudflare and uses it if available. This behavior can be suppressed with the --no-auto-update flag.
3 changes: 3 additions & 0 deletions packages/create-cloudflare/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ const isUpdateAvailable = async () => {
);
s.stop();

// Don't auto-update to major versions
if (semver.diff(latestVersion, version) === "major") return false;

return semver.gt(latestVersion, version);
};

Expand Down

0 comments on commit f6b5b3f

Please sign in to comment.