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

[wrangler] fix: switch default logging level of unstable_dev() to warn #5132

Merged
merged 1 commit into from
Mar 1, 2024

Conversation

mrbbot
Copy link
Contributor

@mrbbot mrbbot commented Mar 1, 2024

Fixes #3362.

What this PR solves / how to test:

When running unstable_dev() in its default "test mode", the logging level was set to none. This meant any Worker startup errors or helpful warnings wouldn't be shown. This change switches the default to warn. For example, this means if you fail to include nodejs_compat and try to import node:buffer, you'll now see the following output, as opposed to an unclear failure:

image

Author has addressed the following:

  • Tests
    • Included
    • Not necessary because:
  • Changeset (Changeset guidelines)
    • Included
    • Not necessary because:
  • Associated docs
    • Issue(s)/PR(s):
    • Not necessary because: we don't currently document the default logging level, and I think users would expect any errors/warnings to be surfaced.

Note for PR author:

We want to celebrate and highlight awesome PR review! If you think this PR received a particularly high-caliber review, please assign it the label highlight pr review so future reviewers can take inspiration and learn from it.

@mrbbot mrbbot requested a review from a team as a code owner March 1, 2024 10:43
Copy link

changeset-bot bot commented Mar 1, 2024

🦋 Changeset detected

Latest commit: 4acd1df

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
wrangler Patch
@cloudflare/vitest-pool-workers Patch

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

Copy link
Contributor

github-actions bot commented Mar 1, 2024

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/8110168587/npm-package-wrangler-5132

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5132/npm-package-wrangler-5132

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8110168587/npm-package-wrangler-5132 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8110168587/npm-package-create-cloudflare-5132 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8110168587/npm-package-cloudflare-kv-asset-handler-5132
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8110168587/npm-package-miniflare-5132
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8110168587/npm-package-cloudflare-pages-shared-5132
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8110168587/npm-package-cloudflare-vitest-pool-workers-5132

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.30.1 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240223.0
workerd 1.20240223.1 1.20240223.1
workerd --version 1.20240223.1 2024-02-23

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@mrbbot mrbbot changed the title fix: switch default logging level of unstable_dev() to warn [wrangler] fix: switch default logging level of unstable_dev() to warn Mar 1, 2024
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.37%. Comparing base (5b11492) to head (4acd1df).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5132      +/-   ##
==========================================
+ Coverage   70.32%   70.37%   +0.04%     
==========================================
  Files         298      298              
  Lines       15542    15542              
  Branches     3999     3999              
==========================================
+ Hits        10930    10937       +7     
+ Misses       4612     4605       -7     
Files Coverage Δ
packages/wrangler/src/api/dev.ts 83.33% <100.00%> (ø)

... and 6 files with indirect coverage changes

@mrbbot mrbbot merged commit 82a3f94 into main Mar 1, 2024
17 checks passed
@mrbbot mrbbot deleted the bcoll/help-my-tests-are-failing-and-i-dont-know-why branch March 1, 2024 12:36
@workers-devprod workers-devprod mentioned this pull request Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 BUG: "Unknown Error: undefined" from missing flag in unstable_dev
2 participants