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

chore(deps): bump the cloudflare group with 1 update #218

Merged
merged 4 commits into from
Feb 11, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 11, 2024

Bumps the cloudflare group with 1 update: wrangler.

Updates wrangler from 3.22.4 to 3.28.1

Release notes

Sourced from wrangler's releases.

wrangler@3.28.1

Patch Changes

  • #4962 d6585178 Thanks @​mrbbot! - fix: ensure wrangler dev can reload without crashing when importing node:* modules

    The previous Wrangler release introduced a regression that caused reloads to fail when importing node:* modules. This change fixes that, and ensures these modules can always be resolved.

  • #4951 ffafe8ad Thanks @​nora-soderlund! - fix: D1 batch splitting to handle CASE as compound statement starts

wrangler@3.28.0

Minor Changes

  • #4499 cf9c029b Thanks @​penalosa! - feat: Support runtime-agnostic polyfills

    Previously, Wrangler treated any imports of node:* modules as build-time errors (unless one of the two Node.js compatibility modes was enabled). This is sometimes overly aggressive, since those imports are often not hit at runtime (for instance, it was impossible to write a library that worked across Node.JS and Workers, using Node packages only when running in Node). Here's an example of a function that would cause Wrangler to fail to build:

    export function randomBytes(length: number) {
    	if (navigator.userAgent !== "Cloudflare-Workers") {
    		return new Uint8Array(require("node:crypto").randomBytes(length));
    	} else {
    		return crypto.getRandomValues(new Uint8Array(length));
    	}
    }

    This function should work in both Workers and Node, since it gates Node-specific functionality behind a user agent check, and falls back to the built-in Workers crypto API. Instead, Wrangler detected the node:crypto import and failed with the following error:

    ✘ [ERROR] Could not resolve "node:crypto"
    
    src/randomBytes.ts:5:36:
      5 │ ... return new Uint8Array(require('node:crypto').randomBytes(length));
        ╵                                   ~~~~~~~~~~~~~
    

    The package "node:crypto" wasn't found on the file system but is built into node. Add "node_compat = true" to your wrangler.toml file to enable Node.js compatibility.

    This change turns that Wrangler build failure into a warning, which users can choose to ignore if they know the import of node:* APIs is safe (because it will never trigger at runtime, for instance):

    ▲ [WARNING] The package "node:crypto" wasn't found on the file system but is built into node.
    

    Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag. Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported from:

    • src/randomBytes.ts

However, in a lot of cases, it's possible to know at build time whether the import is safe. This change also injects navigator.userAgent into esbuild's bundle settings as a predefined constant, which means that esbuild can tree-shake away imports of node:* APIs that are guaranteed not to be hit at runtime, supressing the warning entirely.

... (truncated)

Changelog

Sourced from wrangler's changelog.

3.28.1

Patch Changes

  • #4962 d6585178 Thanks @​mrbbot! - fix: ensure wrangler dev can reload without crashing when importing node:* modules

    The previous Wrangler release introduced a regression that caused reloads to fail when importing node:* modules. This change fixes that, and ensures these modules can always be resolved.

3.28.0

Minor Changes

  • #4499 cf9c029b Thanks @​penalosa! - feat: Support runtime-agnostic polyfills

    Previously, Wrangler treated any imports of node:* modules as build-time errors (unless one of the two Node.js compatibility modes was enabled). This is sometimes overly aggressive, since those imports are often not hit at runtime (for instance, it was impossible to write a library that worked across Node.JS and Workers, using Node packages only when running in Node). Here's an example of a function that would cause Wrangler to fail to build:

    export function randomBytes(length: number) {
    	if (navigator.userAgent !== "Cloudflare-Workers") {
    		return new Uint8Array(require("node:crypto").randomBytes(length));
    	} else {
    		return crypto.getRandomValues(new Uint8Array(length));
    	}
    }

    This function should work in both Workers and Node, since it gates Node-specific functionality behind a user agent check, and falls back to the built-in Workers crypto API. Instead, Wrangler detected the node:crypto import and failed with the following error:

    ✘ [ERROR] Could not resolve "node:crypto"
    
    src/randomBytes.ts:5:36:
      5 │ ... return new Uint8Array(require('node:crypto').randomBytes(length));
        ╵                                   ~~~~~~~~~~~~~
    

    The package "node:crypto" wasn't found on the file system but is built into node. Add "node_compat = true" to your wrangler.toml file to enable Node.js compatibility.

    This change turns that Wrangler build failure into a warning, which users can choose to ignore if they know the import of node:* APIs is safe (because it will never trigger at runtime, for instance):

    ▲ [WARNING] The package "node:crypto" wasn't found on the file system but is built into node.
    

    Your Worker may throw errors at runtime unless you enable the "nodejs_compat" compatibility flag. Refer to https://developers.cloudflare.com/workers/runtime-apis/nodejs/ for more details. Imported from:

... (truncated)

Commits
  • 96c8cfb Version Packages (#4961)
  • d658517 fix: ensure worker reloads when importing node:* modules (#4962)
  • ffafe8a [D1] fix batch splitting to handle CASE as compound statement starts (#4951)
  • a71afaf Version Packages (#4934)
  • d637bd5 Extend error handling of proxy request errors in ProxyWorker (#4867)
  • d96bc7d fix: allow port option to be specified with unstable_dev() (#4953)
  • 4a735c4 improve(r2): Update Sippy endpoint request payloads to match new schema (#4928)
  • cf9c029 Improve DX with node:* modules (#4499)
  • a14bd1d add a cf field to the getBindingsProxy result (#4926)
  • 321c7ed fix: make the entrypoint optional for the types command (#4931)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
  • @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
  • @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
  • @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency
  • @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Feb 11, 2024
Copy link

changeset-bot bot commented Feb 11, 2024

🦋 Changeset detected

Latest commit: 947ab23

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

This PR includes changesets to release 1 package
Name Type
github-actions-cloudflare-pages 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

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/cloudflare-5257fb722e branch from a9b057a to dcb8e65 Compare February 11, 2024 15:17
@andykenward
Copy link
Owner

@dependabot recreate

Bumps the cloudflare group with 1 update: [wrangler](https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler).


Updates `wrangler` from 3.22.4 to 3.28.1
- [Release notes](https://github.com/cloudflare/workers-sdk/releases)
- [Changelog](https://github.com/cloudflare/workers-sdk/blob/main/packages/wrangler/CHANGELOG.md)
- [Commits](https://github.com/cloudflare/workers-sdk/commits/wrangler@3.28.1/packages/wrangler)

---
updated-dependencies:
- dependency-name: wrangler
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: cloudflare
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/cloudflare-5257fb722e branch from 76605c6 to 52d49e0 Compare February 11, 2024 15:48
@andykenward andykenward merged commit 3e0e7d7 into main Feb 11, 2024
5 checks passed
@andykenward andykenward deleted the dependabot/npm_and_yarn/cloudflare-5257fb722e branch February 11, 2024 16:01
@github-actions github-actions bot mentioned this pull request Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant