-
Notifications
You must be signed in to change notification settings - Fork 670
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
Feat(unstable_dev): Add option to enable update check #2982
Conversation
🦋 Changeset detectedLatest commit: 9aab3c9 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 |
Any reason we wouldn't just always disable this check when using the API? |
Pages Dev uses the API, so we need a way to re-turn it on 😅 |
Feels like the update checker should just be part of the main CLI entrypoint, and then all underlying logic (e.g. APIs) don't have it, but I defer to the core Wrangler team for their thoughts. |
I thought that too before implementing, but I looked at the usages for |
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/4617428842/npm-package-wrangler-2982 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/2982/npm-package-wrangler-2982 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/4617428842/npm-package-wrangler-2982 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/4617428842/npm-package-cloudflare-pages-shared-2982 Note that these links will no longer work once the GitHub Actions artifact expires. |
Codecov Report
@@ Coverage Diff @@
## main #2982 +/- ##
==========================================
+ Coverage 73.55% 73.58% +0.03%
==========================================
Files 167 167
Lines 10497 10506 +9
Branches 2805 2809 +4
==========================================
+ Hits 7721 7731 +10
+ Misses 2776 2775 -1
|
Fixed the checks issue |
This whole Programmatic API of Wrangler is in the works for a Systems Design & Spec, I appreciate the PR. This is likely the correct approach in the future for that major work (#2982 (comment)) |
This would be a really helpful flag. We use a lot of wrangler invocations in our CI workflows and thus waste quite a bit of time for the update checks. |
Remade in #4347 - this branch was very out of date |
Remade in #4347
Old PR Summary:
What this PR solves / how to test:
Wrangler makes a HTTP request to the NPM registry, checking for updates to inform end users. While this makes sense in regular commands, it (generally) has little place in it's API, particularly when this is primarily used for tests.
This pull request adds an experimental option which disables the update check, and optionally allows users to enable it. (There are cases for this, such as
pages dev
)Associated docs issue(s)/PR(s):
Author has included the following, where applicable:
Reviewer has performed the following, where applicable: