-
Notifications
You must be signed in to change notification settings - Fork 741
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
update check #763
update check #763
Conversation
🦋 Changeset detectedLatest commit: ad13740 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/2103676389/npm-package-wrangler-763 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/763/npm-package-wrangler-763 Or you can use npx https://prerelease-registry.developers.workers.dev/runs/2103676389/npm-package-wrangler-763 dev path/to/script.js |
packages/wrangler/src/cli.ts
Outdated
import { main } from "."; | ||
|
||
try { | ||
initReporting(); | ||
void updateCheck(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having this inside the try
is probably redundant because it has a try/catch
in the updateCheck
Alternatively, I started using Ink to improve the UI of this output. I think if we do that it would need to be called around the same place as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not use ink for this just yet.
distTag: "beta", | ||
}); | ||
} catch (err) { | ||
console.error(`Failed to check for updates: ${err}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be a silent failure
console.error(`Failed to check for updates: ${err}`); | ||
} | ||
|
||
if (update) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean we'll always show this message if there's an update? Do you suppose we only want to show this message once a day?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default is it checks once a day.
Another idea is to include inside |
9fb3b07
to
ee1046e
Compare
…gainst the beta release, distTag can be changed later, then prints the latest beta version to the user. resolves #762
ee1046e
to
ad13740
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good for now, let's land it and iterate on it based on feedback. Thank you!
feat: Added the update check that will check the package once a day against the beta release,
distTag
can be changed later, then prints the latest beta version to the user.resolves #762