unjs / unenv

🕊️ Convert javaScript code to be runtime agnostic
MIT License
348 stars 18 forks source link

chore(deps): update all non-major dependencies #165

Closed renovate[bot] closed 4 months ago

renovate[bot] commented 4 months ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@types/node (source) ^20.11.10 -> ^20.11.25 age adoption passing confidence
eslint (source) ^8.56.0 -> ^8.57.0 age adoption passing confidence
node-fetch-native ^1.6.1 -> ^1.6.2 age adoption passing confidence
pnpm (source) 8.15.1 -> 8.15.4 age adoption passing confidence
prettier (source) ^3.2.4 -> ^3.2.5 age adoption passing confidence
typescript (source) ^5.3.3 -> ^5.4.2 age adoption passing confidence
wrangler (source) ^3.25.0 -> ^3.31.0 age adoption passing confidence

Release Notes

eslint/eslint (eslint) ### [`v8.57.0`](https://togithub.com/eslint/eslint/releases/tag/v8.57.0) [Compare Source](https://togithub.com/eslint/eslint/compare/v8.56.0...v8.57.0) #### Features - [`1120b9b`](https://togithub.com/eslint/eslint/commit/1120b9b7b97f10f059d8b7ede19de2572f892366) feat: Add loadESLint() API method for v8 ([#​18098](https://togithub.com/eslint/eslint/issues/18098)) (Nicholas C. Zakas) - [`dca7d0f`](https://togithub.com/eslint/eslint/commit/dca7d0f1c262bc72310147bcefe1d04ecf60acbc) feat: Enable `eslint.config.mjs` and `eslint.config.cjs` ([#​18066](https://togithub.com/eslint/eslint/issues/18066)) (Nitin Kumar) #### Bug Fixes - [`2196d97`](https://togithub.com/eslint/eslint/commit/2196d97094ba94d6d750828879a29538d1600de5) fix: handle absolute file paths in `FlatRuleTester` ([#​18064](https://togithub.com/eslint/eslint/issues/18064)) (Nitin Kumar) - [`69dd1d1`](https://togithub.com/eslint/eslint/commit/69dd1d1387b7b53617548d1f9f2c149f179e6e17) fix: Ensure config keys are printed for config errors ([#​18067](https://togithub.com/eslint/eslint/issues/18067)) (Nitin Kumar) - [`9852a31`](https://togithub.com/eslint/eslint/commit/9852a31edcf054bd5d15753ef18e2ad3216b1b71) fix: deep merge behavior in flat config ([#​18065](https://togithub.com/eslint/eslint/issues/18065)) (Nitin Kumar) - [`4c7e9b0`](https://togithub.com/eslint/eslint/commit/4c7e9b0b539ba879ac1799e81f3b6add2eed4b2f) fix: allow circular references in config ([#​18056](https://togithub.com/eslint/eslint/issues/18056)) (Milos Djermanovic) #### Documentation - [`84922d0`](https://togithub.com/eslint/eslint/commit/84922d0bfa10689a34a447ab8e55975ff1c1c708) docs: Show prerelease version in dropdown ([#​18139](https://togithub.com/eslint/eslint/issues/18139)) (Nicholas C. Zakas) - [`5b8c363`](https://togithub.com/eslint/eslint/commit/5b8c3636a3d7536535a6878eca0e5b773e4829d4) docs: Switch to Ethical Ads ([#​18117](https://togithub.com/eslint/eslint/issues/18117)) (Milos Djermanovic) - [`77dbfd9`](https://togithub.com/eslint/eslint/commit/77dbfd9887b201a46fc68631cbde50c08e1a8dbf) docs: show NEXT in version selectors ([#​18052](https://togithub.com/eslint/eslint/issues/18052)) (Milos Djermanovic) #### Chores - [`1813aec`](https://togithub.com/eslint/eslint/commit/1813aecc4660582b0678cf32ba466eb9674266c4) chore: upgrade [@​eslint/js](https://togithub.com/eslint/js)[@​8](https://togithub.com/8).57.0 ([#​18143](https://togithub.com/eslint/eslint/issues/18143)) (Milos Djermanovic) - [`5c356bb`](https://togithub.com/eslint/eslint/commit/5c356bb0c6f53c570224f8e9f02c4baca8fc6d2f) chore: package.json update for [@​eslint/js](https://togithub.com/eslint/js) release (Jenkins) - [`f4a1fe2`](https://togithub.com/eslint/eslint/commit/f4a1fe2e45aa1089fe775290bf530de82f34bf16) test: add more tests for ignoring files and directories ([#​18068](https://togithub.com/eslint/eslint/issues/18068)) (Nitin Kumar) - [`42c0aef`](https://togithub.com/eslint/eslint/commit/42c0aefaf6ea8b998b1c6db61906a79c046d301a) ci: Enable CI for `v8.x` branch ([#​18047](https://togithub.com/eslint/eslint/issues/18047)) (Milos Djermanovic)
unjs/node-fetch-native (node-fetch-native) ### [`v1.6.2`](https://togithub.com/unjs/node-fetch-native/blob/HEAD/CHANGELOG.md#v162) [Compare Source](https://togithub.com/unjs/node-fetch-native/compare/v1.6.1...v1.6.2) [compare changes](https://togithub.com/unjs/node-fetch-native/compare/v1.6.1...v1.6.2) ##### 📦 Build - Remove non existing `node.import` condition ([#​115](https://togithub.com/unjs/node-fetch-native/pull/115)) ##### 🏡 Chore - Update deps ([c3f9f18](https://togithub.com/unjs/node-fetch-native/commit/c3f9f18)) ##### ❤️ Contributors - Pooya Parsa ([@​pi0](http://github.com/pi0)) - Thomas Kjærgaard ([@​tkjaergaard](http://github.com/tkjaergaard))
pnpm/pnpm (pnpm) ### [`v8.15.4`](https://togithub.com/pnpm/pnpm/compare/v8.15.3...v8.15.4) [Compare Source](https://togithub.com/pnpm/pnpm/compare/v8.15.3...v8.15.4) ### [`v8.15.3`](https://togithub.com/pnpm/pnpm/releases/tag/v8.15.3) [Compare Source](https://togithub.com/pnpm/pnpm/compare/v8.15.2...v8.15.3) #### Patch Changes - Remove vulnerable "ip" package from the dependencies [#​7652](https://togithub.com/pnpm/pnpm/issues/7652). #### Platinum Sponsors
#### Gold Sponsors
#### Our Silver Sponsors
### [`v8.15.2`](https://togithub.com/pnpm/pnpm/releases/tag/v8.15.2) [Compare Source](https://togithub.com/pnpm/pnpm/compare/v8.15.1...v8.15.2) #### Patch Changes - When purging multiple `node_modules` directories, pnpm will no longer print multiple prompts simultaneously. - Don't print an unnecessary warning when adding new dependencies to a project that uses hoisted `node_modules`. - Linking globally the command of a package that has no name in `package.json` [#​4761](https://togithub.com/pnpm/pnpm/issues/4761). - Installation should work with lockfile created by pnpm v9.0.0-alpha.4 #### Platinum Sponsors
#### Gold Sponsors
#### Our Silver Sponsors
prettier/prettier (prettier) ### [`v3.2.5`](https://togithub.com/prettier/prettier/blob/HEAD/CHANGELOG.md#325) [Compare Source](https://togithub.com/prettier/prettier/compare/3.2.4...3.2.5) [diff](https://togithub.com/prettier/prettier/compare/3.2.4...3.2.5) ##### Support Angular inline styles as single template literal ([#​15968](https://togithub.com/prettier/prettier/pull/15968) by [@​sosukesuzuki](https://togithub.com/sosukesuzuki)) [Angular v17](https://blog.angular.io/introducing-angular-v17-4d7033312e4b) supports single string inline styles. ```ts // Input @​Component({ template: `
...
`, styles: `h1 { color: blue; }`, }) export class AppComponent {} // Prettier 3.2.4 @​Component({ template: `
...
`, styles: `h1 { color: blue; }`, }) export class AppComponent {} // Prettier 3.2.5 @​Component({ template: `
...
`, styles: ` h1 { color: blue; } `, }) export class AppComponent {} ``` ##### Unexpected embedded formatting for Angular template ([#​15969](https://togithub.com/prettier/prettier/pull/15969) by [@​JounQin](https://togithub.com/JounQin)) Computed template should not be considered as Angular component template ```ts // Input const template = "foobar"; @​Component({ [template]: `

{{ hello }}

`, }) export class AppComponent {} // Prettier 3.2.4 const template = "foobar"; @​Component({ [template]: `

{{ hello }}

`, }) export class AppComponent {} // Prettier 3.2.5 const template = "foobar"; @​Component({ [template]: `

{{ hello }}

`, }) export class AppComponent {} ``` ##### Use `"json"` parser for `tsconfig.json` by default ([#​16012](https://togithub.com/prettier/prettier/pull/16012) by [@​sosukesuzuki](https://togithub.com/sosukesuzuki)) In [v2.3.0](https://prettier.io/blog/2024/01/12/3.2.0#new-jsonc-parser-added-15831httpsgithubcomprettierprettierpull15831-by-fiskerhttpsgithubcomfisker), we introduced `"jsonc"` parser which adds trialing comma **by default**. When adding a new parser we also define how it will be used based on the [`linguist-languages`](https://www.npmjs.com/package/linguist-languages) data. `tsconfig.json` is a special file used by [TypeScript](https://www.typescriptlang.org/docs/handbook/tsconfig-json.html#using-tsconfigjson-or-jsconfigjson), it uses `.json` file extension, but it actually uses the [JSON with Comments](https://code.visualstudio.com/docs/languages/json#\_json-with-comments) syntax. However, we found that there are many third-party tools not recognize it correctly because of the confusing `.json` file extension. We decide to treat it as a JSON file for now to avoid the extra configuration step. To keep using the `"jsonc"` parser for your `tsconfig.json` files, add the following to your `.pretterrc` file ```json { "overrides": [ { "files": ["tsconfig.json", "jsconfig.json"], "options": { "parser": "jsonc" } } ] } ``` ``` ```
Microsoft/TypeScript (typescript) ### [`v5.4.2`](https://togithub.com/microsoft/TypeScript/releases/tag/v5.4.2): TypeScript 5.4 [Compare Source](https://togithub.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.2) For release notes, check out the [release announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/). For the complete list of fixed issues, check out the - [fixed issues query for Typescript 5.4.0 (Beta)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.0%22+is%3Aclosed+). - [fixed issues query for Typescript 5.4.1 (RC)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.1%22+is%3Aclosed+). - [fixed issues query for Typescript 5.4.2 (Stable)](https://togithub.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93\&q=milestone%3A%22TypeScript+5.4.2%22+is%3Aclosed+). Downloads are available on: - [NuGet package](https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild)
cloudflare/workers-sdk (wrangler) ### [`v3.31.0`](https://togithub.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3310) [Compare Source](https://togithub.com/cloudflare/workers-sdk/compare/wrangler@3.30.1...wrangler@3.31.0) ##### Minor Changes - [#​5119](https://togithub.com/cloudflare/workers-sdk/pull/5119) [`b0bd413`](https://togithub.com/cloudflare/workers-sdk/commit/b0bd4137f8504c1a96c5fa60f25c41028c9ba23e) Thanks [@​garrettgu10](https://togithub.com/garrettgu10)! - feature: Python support for remote dev - [#​5118](https://togithub.com/cloudflare/workers-sdk/pull/5118) [`30694a3`](https://togithub.com/cloudflare/workers-sdk/commit/30694a31d65016e56e30d14a3b14f2fed6df4370) Thanks [@​garrettgu10](https://togithub.com/garrettgu10)! - fix: Including version identifiers in Python requirements.txt will now throw an error ##### Patch Changes - [#​5132](https://togithub.com/cloudflare/workers-sdk/pull/5132) [`82a3f94`](https://togithub.com/cloudflare/workers-sdk/commit/82a3f94db091c893b5dfc9496aad6154a54474c5) Thanks [@​mrbbot](https://togithub.com/mrbbot)! - fix: switch default logging level of `unstable_dev()` to `warn` 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`. To restore the previous behaviour, include `logLevel: "none"` in your options object: ```js const worker = await unstable_dev("path/to/script.js", { logLevel: "none", }); ``` - [#​5128](https://togithub.com/cloudflare/workers-sdk/pull/5128) [`d27e2a7`](https://togithub.com/cloudflare/workers-sdk/commit/d27e2a70904aab98b4e5c7279661a8d98e7da917) Thanks [@​taylorlee](https://togithub.com/taylorlee)! - fix: Add legacy_env support to experimental versions upload command. - [#​5087](https://togithub.com/cloudflare/workers-sdk/pull/5087) [`a5231de`](https://togithub.com/cloudflare/workers-sdk/commit/a5231decbf18898811749a64f8e36be4aa5fd941) Thanks [@​dario-piotrowicz](https://togithub.com/dario-piotrowicz)! - fix: make `wrangler types` always generate a `d.ts` file for module workers Currently if a config file doesn't define any binding nor module, running `wrangler types` against such file would not produce a `d.ts` file. Producing a `d.ts` file can however still be beneficial as it would define a correct env interface (even if empty) that can be expanded/referenced by user code (this can be particularly convenient for scaffolding tools that may want to always generate an env interface). Example: Before `wrangler types --env-interface MyEnv` run with an empty `wrangler.toml` file would not generate any file, after these change it would instead generate a file with the following content: interface MyEnv { } - [#​5138](https://togithub.com/cloudflare/workers-sdk/pull/5138) [`3dd9089`](https://togithub.com/cloudflare/workers-sdk/commit/3dd9089f34d30dcd6f03e63093e86efa9b8c1e1f) Thanks [@​G4brym](https://togithub.com/G4brym)! - fix: ensure Workers-AI local mode fetcher returns headers to client worker - Updated dependencies \[[`42bcc72`](https://togithub.com/cloudflare/workers-sdk/commit/42bcc7216ab14455c1398d55bc552023726eb423), [`42bcc72`](https://togithub.com/cloudflare/workers-sdk/commit/42bcc7216ab14455c1398d55bc552023726eb423)]: - miniflare@3.20240223.1 ### [`v3.30.1`](https://togithub.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3301) [Compare Source](https://togithub.com/cloudflare/workers-sdk/compare/wrangler@3.30.0...wrangler@3.30.1) ##### Patch Changes - [#​5106](https://togithub.com/cloudflare/workers-sdk/pull/5106) [`2ed7f32`](https://togithub.com/cloudflare/workers-sdk/commit/2ed7f3209bc6bffa85f409d344d6ed76df8686f9) Thanks [@​RamIdeas](https://togithub.com/RamIdeas)! - fix: automatically drain incoming request bodies Previously, requests sent to `wrangler dev` with unconsumed bodies could result in `Network connection lost` errors. This change attempts to work around the issue by ensuring incoming request bodies are drained if they're not used. This is a temporary fix whilst we try to address the underlying issue. Whilst we don't think this change will introduce any other issues, it can be disabled by setting the `WRANGLER_DISABLE_REQUEST_BODY_DRAINING=true` environment variable. Note this fix is only applied if you've enabled Wrangler's bundling—`--no-bundle` mode continues to have the previous behaviour. - [#​5107](https://togithub.com/cloudflare/workers-sdk/pull/5107) [`65d0399`](https://togithub.com/cloudflare/workers-sdk/commit/65d0399c0757881c41582972d14afa02f02fffb4) Thanks [@​penalosa](https://togithub.com/penalosa)! - fix: Ensures that switching to remote mode during a dev session (from local mode) will correctly use the right zone. Previously, zone detection happened before the dev session was mounted, and so dev sessions started with local mode would have no zone inferred, and would have failed to start, with an ugly error. - [#​5107](https://togithub.com/cloudflare/workers-sdk/pull/5107) [`65d0399`](https://togithub.com/cloudflare/workers-sdk/commit/65d0399c0757881c41582972d14afa02f02fffb4) Thanks [@​penalosa](https://togithub.com/penalosa)! - fix: Ensure that preview sessions created without a zone don't switch the host on which to start the preview from the one returned by the API. - [#​4833](https://togithub.com/cloudflare/workers-sdk/pull/4833) [`54f6bfc`](https://togithub.com/cloudflare/workers-sdk/commit/54f6bfcea14b89cae99f3c26b52c28bcd408aba7) Thanks [@​admah](https://togithub.com/admah)! - fix: remove extra arguments from wrangler init deprecation message and update recommended c3 version c3 can now infer the pre-existing type from the presence of the `--existing-script` flag so we can remove the extra `type` argument. C3 2.5.0 introduces an auto-update feature that will make sure users get the latest minor version of c3 and prevent problems where older 2.x.x versions get cached by previous runs of `wrangler init`. ### [`v3.30.0`](https://togithub.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3300) [Compare Source](https://togithub.com/cloudflare/workers-sdk/compare/wrangler@3.29.0...wrangler@3.30.0) ##### Minor Changes - [#​4742](https://togithub.com/cloudflare/workers-sdk/pull/4742) [`c2f3f1e`](https://togithub.com/cloudflare/workers-sdk/commit/c2f3f1e37c1a8f0958676306f3128cd87265ea5b) Thanks [@​benycodes](https://togithub.com/benycodes)! - feat: allow preserving file names when defining rules for non-js modules The developer is now able to specify the \`preserve_file_names property in wrangler.toml which specifies whether Wrangler will preserve the file names additional modules that are added to the deployment bundle of a Worker. If not set to true, files will be named using the pattern ${fileHash}-${basename}. For example, `34de60b44167af5c5a709e62a4e20c4f18c9e3b6-favicon.ico`. Resolves [#​4741](https://togithub.com/cloudflare/workers-sdk/issues/4741) ##### Patch Changes - Updated dependencies \[[`0c0949d`](https://togithub.com/cloudflare/workers-sdk/commit/0c0949da60e3287c05a5884bb9f869ce5609a9a1)]: - miniflare@3.20240223.0 ### [`v3.29.0`](https://togithub.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3290) [Compare Source](https://togithub.com/cloudflare/workers-sdk/compare/wrangler@3.28.4...wrangler@3.29.0) ##### Minor Changes - [#​5042](https://togithub.com/cloudflare/workers-sdk/pull/5042) [`5693d076`](https://togithub.com/cloudflare/workers-sdk/commit/5693d076e2aab99d4736649d5b467689ce25cb23) Thanks [@​dario-piotrowicz](https://togithub.com/dario-piotrowicz)! - feat: add new `--env-interface` to `wrangler types` Allow users to specify the name of the interface that they want `wrangler types` to generate for the `env` parameter, via the new CLI flag `--env-interface` Example: ```sh wrangler types --env-interface CloudflareEnv ``` generates ```ts interface CloudflareEnv {} ``` instead of ```ts interface Env {} ``` - [#​5042](https://togithub.com/cloudflare/workers-sdk/pull/5042) [`5693d076`](https://togithub.com/cloudflare/workers-sdk/commit/5693d076e2aab99d4736649d5b467689ce25cb23) Thanks [@​dario-piotrowicz](https://togithub.com/dario-piotrowicz)! - feat: add new `path` positional argument to `wrangler types` Allow users to specify the path to the typings (.d.ts) file they want `wrangler types` to generate Example: ```sh wrangler types ./my-env.d.ts ``` generates a `my-env.d.ts` file in the current directory instead of creating a `worker-configuration.d.ts` file ##### Patch Changes - [#​5042](https://togithub.com/cloudflare/workers-sdk/pull/5042) [`5693d076`](https://togithub.com/cloudflare/workers-sdk/commit/5693d076e2aab99d4736649d5b467689ce25cb23) Thanks [@​dario-piotrowicz](https://togithub.com/dario-piotrowicz)! - feat: include command run in the `wrangler types` comment In the comment added to the `.d.ts` file generated by `wrangler types` include the command run to generated the file - [#​4303](https://togithub.com/cloudflare/workers-sdk/pull/4303) [`1c460287`](https://togithub.com/cloudflare/workers-sdk/commit/1c460287f8836102b372ce0c7dddec093259692e) Thanks [@​richardscarrott](https://togithub.com/richardscarrott)! - fix: allow Pages Functions to import built-in node:\* modules, even when not bundling with wrangler - [#​4957](https://togithub.com/cloudflare/workers-sdk/pull/4957) [`50f93bd2`](https://togithub.com/cloudflare/workers-sdk/commit/50f93bd2ce8f14294bee73b844897c5bfa083955) Thanks [@​garrettgu10](https://togithub.com/garrettgu10)! - fix: don't strip `.py` extensions from Python modules - [#​5042](https://togithub.com/cloudflare/workers-sdk/pull/5042) [`5693d076`](https://togithub.com/cloudflare/workers-sdk/commit/5693d076e2aab99d4736649d5b467689ce25cb23) Thanks [@​dario-piotrowicz](https://togithub.com/dario-piotrowicz)! - fix: make `wrangler types` honor top level config argument The `wrangler types` command currently ignores the `-c|--config` argument (although it is still getting shown in the command's help message). Make sure that the command honors the flag. Also, if no config file is detected present a warning to the user - [#​5042](https://togithub.com/cloudflare/workers-sdk/pull/5042) [`5693d076`](https://togithub.com/cloudflare/workers-sdk/commit/5693d076e2aab99d4736649d5b467689ce25cb23) Thanks [@​dario-piotrowicz](https://togithub.com/dario-piotrowicz)! - fix: make the `wrangler types` command pick up local secret keys from `.dev.vars` Make sure that the `wrangler types` command correctly picks up secret keys defined in `.dev.vars` and includes them in the generated file (marking them as generic `string` types of course) - Updated dependencies \[[`b03db864`](https://togithub.com/cloudflare/workers-sdk/commit/b03db864a36924c31b8ddd82a027c83df4f68c43)]: - miniflare@3.20240208.0 ### [`v3.28.4`](https://togithub.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3284) [Compare Source](https://togithub.com/cloudflare/workers-sdk/compare/wrangler@3.28.3...wrangler@3.28.4) ##### Patch Changes - [#​5050](https://togithub.com/cloudflare/workers-sdk/pull/5050) [`88be4b84`](https://togithub.com/cloudflare/workers-sdk/commit/88be4b847f8891041afcc4704e69a84d3abe6126) Thanks [@​nora-soderlund](https://togithub.com/nora-soderlund)! - fix: allow kv:namespace create to accept a namespace name that contains characters not allowed in a binding name This command tries to use the namespace name as the binding. Previously, we would unnecessarily error if this namespace name did not fit the binding name constraints. Now we accept such names and then remove invalid characters when generating the binding name. ### [`v3.28.3`](https://togithub.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3283) [Compare Source](https://togithub.com/cloudflare/workers-sdk/compare/wrangler@3.28.2...wrangler@3.28.3) ##### Patch Changes - [#​5026](https://togithub.com/cloudflare/workers-sdk/pull/5026) [`04584722`](https://togithub.com/cloudflare/workers-sdk/commit/0458472251f17e864b45a167750baa50ca641e46) Thanks [@​dario-piotrowicz](https://togithub.com/dario-piotrowicz)! - fix: make sure `getPlatformProxy` produces a production-like `caches` object make sure that the `caches` object returned to `getPlatformProxy` behaves in the same manner as the one present in production (where calling unsupported methods throws a helpful error message) note: make sure that the unsupported methods are however not included in the `CacheStorage` type definition - [#​5030](https://togithub.com/cloudflare/workers-sdk/pull/5030) [`55ea0721`](https://togithub.com/cloudflare/workers-sdk/commit/55ea0721b2550c8c24d79ddcc116ba5b4bc75028) Thanks [@​mrbbot](https://togithub.com/mrbbot)! - fix: don't suggest reporting user errors to GitHub Wrangler has two different types of errors: internal errors caused by something going wrong, and user errors caused by an invalid configuration. Previously, we would encourage users to submit bug reports for user errors, even though there's nothing we can do to fix them. This change ensures we only suggest this for internal errors. - [#​4900](https://togithub.com/cloudflare/workers-sdk/pull/4900) [`3389f2e9`](https://togithub.com/cloudflare/workers-sdk/commit/3389f2e9daa27f89c2dc35c2ccd4da4ec54db683) Thanks [@​OilyLime](https://togithub.com/OilyLime)! - feature: allow hyperdrive users to set local connection string as environment variable Wrangler dev now supports the HYPERDRIVE_LOCAL_CONNECTION_STRING environmental variable for connecting to a local database instance when testing Hyperdrive in local development. This environmental variable takes precedence over the localConnectionString set in wrangler.toml. - [#​5033](https://togithub.com/cloudflare/workers-sdk/pull/5033) [`b1ace91b`](https://togithub.com/cloudflare/workers-sdk/commit/b1ace91bbfa9c484a931639a38e3798b1b217c89) Thanks [@​mrbbot](https://togithub.com/mrbbot)! - fix: wait for actual port before opening browser with `--port=0` Previously, running `wrangler dev --remote --port=0` and then immediately pressing `b` would open `localhost:0` in your default browser. This change queues up opening the browser until Wrangler knows the port the dev server was started on. - [#​5026](https://togithub.com/cloudflare/workers-sdk/pull/5026) [`04584722`](https://togithub.com/cloudflare/workers-sdk/commit/0458472251f17e864b45a167750baa50ca641e46) Thanks [@​dario-piotrowicz](https://togithub.com/dario-piotrowicz)! - fix: relax the `getPlatformProxy`'s' cache request/response types prior to these changes the caches obtained from `getPlatformProxy` would use `unknown`s as their types, this proved too restrictive and incompatible with the equivalent `@cloudflare/workers-types` types, we decided to use `any`s instead to allow for more flexibility whilst also making the type compatible with workers-types - Updated dependencies \[[`7723ac17`](https://togithub.com/cloudflare/workers-sdk/commit/7723ac17906f894afe9af2152437726ac09a6290), [`027f9719`](https://togithub.com/cloudflare/workers-sdk/commit/027f971975a48a564603275f3583d21e9d053229), [`027f9719`](https://togithub.com/cloudflare/workers-sdk/commit/027f971975a48a564603275f3583d21e9d053229), [`027f9719`](https://togithub.com/cloudflare/workers-sdk/commit/027f971975a48a564603275f3583d21e9d053229), [`027f9719`](https://togithub.com/cloudflare/workers-sdk/commit/027f971975a48a564603275f3583d21e9d053229), [`027f9719`](https://togithub.com/cloudflare/workers-sdk/commit/027f971975a48a564603275f3583d21e9d053229), [`027f9719`](https://togithub.com/cloudflare/workers-sdk/commit/027f971975a48a564603275f3583d21e9d053229)]: - miniflare@3.20240129.3 ### [`v3.28.2`](https://togithub.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3282) [Compare Source](https://togithub.com/cloudflare/workers-sdk/compare/wrangler@3.28.1...wrangler@3.28.2) ##### Patch Changes - [#​4950](https://togithub.com/cloudflare/workers-sdk/pull/4950) [`05360e43`](https://togithub.com/cloudflare/workers-sdk/commit/05360e432bff922def960e86690232c762fad284) Thanks [@​petebacondarwin](https://togithub.com/petebacondarwin)! - fix: ensure we do not rewrite external Origin headers in wrangler dev In [https://github.com/cloudflare/workers-sdk/pull/4812](https://togithub.com/cloudflare/workers-sdk/pull/4812) we tried to fix the Origin headers to match the Host header but were overzealous and rewrote Origin headers for external origins (outside of the proxy server's origin). This is now fixed, and moreover we rewrite any headers that refer to the proxy server on the request with the configured host and vice versa on the response. This should ensure that CORS is not broken in browsers when a different host is being simulated based on routes in the Wrangler configuration. - [#​4997](https://togithub.com/cloudflare/workers-sdk/pull/4997) [`bfeefe27`](https://togithub.com/cloudflare/workers-sdk/commit/bfeefe275390491a7bb71f01550b3cb368d13320) Thanks [@​dario-piotrowicz](https://togithub.com/dario-piotrowicz)! - chore: add missing `defineNavigatorUserAgent` dependency to useEsbuild hook - [#​4966](https://togithub.com/cloudflare/workers-sdk/pull/4966) [`36692326`](https://togithub.com/cloudflare/workers-sdk/commit/366923264fe2643acee0761c849ad0dc3922ad6c) Thanks [@​penalosa](https://togithub.com/penalosa)! - fix: Report Custom Build failures as `UserError`s - [#​5002](https://togithub.com/cloudflare/workers-sdk/pull/5002) [`315a651b`](https://togithub.com/cloudflare/workers-sdk/commit/315a651b5742a614fd950c29b5dac5fdd2d1f270) Thanks [@​dario-piotrowicz](https://togithub.com/dario-piotrowicz)! - chore: rename `getBindingsProxy` to `getPlatformProxy` initially `getBindingsProxy` was supposed to only provide proxies for bindings, the utility has however grown, including now `cf`, `ctx` and `caches`, to clarify the increased scope the utility is getting renamed to `getPlatformProxy` and its `bindings` field is getting renamed `env` *note*: `getBindingProxy` with its signature is still kept available, making this a non breaking change - Updated dependencies \[[`05360e43`](https://togithub.com/cloudflare/workers-sdk/commit/05360e432bff922def960e86690232c762fad284)]: - miniflare@3.20240129.2 ### [`v3.28.1`](https://togithub.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3281) [Compare Source](https://togithub.com/cloudflare/workers-sdk/compare/wrangler@3.28.0...wrangler@3.28.1) ##### Patch Changes - [#​4962](https://togithub.com/cloudflare/workers-sdk/pull/4962) [`d6585178`](https://togithub.com/cloudflare/workers-sdk/commit/d658517883e03ddf07672aba9e4075911f309c05) Thanks [@​mrbbot](https://togithub.com/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](https://togithub.com/cloudflare/workers-sdk/pull/4951) [`ffafe8ad`](https://togithub.com/cloudflare/workers-sdk/commit/ffafe8ad9bf5549d6c2d92091f88bcd5373fc824) Thanks [@​nora-soderlund](https://togithub.com/nora-soderlund)! - fix: D1 batch splitting to handle CASE as compound statement starts ### [`v3.28.0`](https://togithub.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3280) [Compare Source](https://togithub.com/cloudflare/workers-sdk/compare/wrangler@3.27.0...wrangler@3.28.0) ##### Minor Changes - [#​4499](https://togithub.com/cloudflare/workers-sdk/pull/4499) [`cf9c029b`](https://togithub.com/cloudflare/workers-sdk/commit/cf9c029b30e1db3a1c3f9dc4208b9c34021a8ac0) Thanks [@​penalosa](https://togithub.com/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: ```ts 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. - [#​4926](https://togithub.com/cloudflare/workers-sdk/pull/4926) [`a14bd1d9`](https://togithub.com/cloudflare/workers-sdk/commit/a14bd1d97c5180b1fd48c2a0907424cf81d67bdb) Thanks [@​dario-piotrowicz](https://togithub.com/dario-piotrowicz)! - feature: add a `cf` field to the `getBindingsProxy` result Add a new `cf` field to the `getBindingsProxy` result that people can use to mock the production `cf` (`IncomingRequestCfProperties`) object. Example: ```ts const { cf } = await getBindingsProxy(); console.log(`country = ${cf.country}; colo = ${cf.colo}`); ``` ##### Patch Changes - [#​4931](https://togithub.com/cloudflare/workers-sdk/pull/4931) [`321c7ed7`](https://togithub.com/cloudflare/workers-sdk/commit/321c7ed7355f64a22b0d26b2f097ba2e06e4b5e8) Thanks [@​dario-piotrowicz](https://togithub.com/dario-piotrowicz)! - fix: make the entrypoint optional for the `types` command Currently running `wrangler types` against a `wrangler.toml` file without a defined entrypoint (`main` value) causes the command to error with the following message: ✘ [ERROR] Missing entry-point: The entry-point should be specified via the command line (e.g. `wrangler types path/to/script`) or the `main` config field. However developers could want to generate types without the entrypoint being defined (for example when using `getBindingsProxy`), so these changes make the entrypoint optional for the `types` command, assuming modules syntax if none is specified. - [#​4867](https://togithub.com/cloudflare/workers-sdk/pull/4867) [`d637bd59`](https://togithub.com/cloudflare/workers-sdk/commit/d637bd59a8ea6612d59ed4b73e115287615e617d) Thanks [@​RamIdeas](https://togithub.com/RamIdeas)! - fix: inflight requests to UserWorker which failed across reloads are now retried Previously, when running `wrangler dev`, requests inflight during a UserWorker reload (due to config or source file changes) would fail. Now, if those inflight requests are GET or HEAD requests, they will be reproxied against the new UserWorker. This adds to the guarantee that requests made during local development reach the latest worker. - [#​4928](https://togithub.com/cloudflare/workers-sdk/pull/4928) [`4a735c46`](https://togithub.com/cloudflare/workers-sdk/commit/4a735c46fdf5752f141e0e646624f44ad6301ced) Thanks [@​sdnts](https://togithub.com/sdnts)! - fix: Update API calls for Sippy's endpoints - [#​4938](https://togithub.com/cloudflare/workers-sdk/pull/4938) [`75bd08ae`](https://togithub.com/cloudflare/workers-sdk/commit/75bd08aed0b82268fb5cf0f42cdd85d4d6d235ef) Thanks [@​rozenmd](https://togithub.com/rozenmd)! - fix: print wrangler banner at the start of every d1 command This PR adds a wrangler banner to the start of every D1 command (except when invoked in JSON-mode) For example: ### [`v3.27.0`](https://togithub.com/cloudflare/workers-sdk/blob/HEAD/packages/wrangler/CHANGELOG.md#3270) [Compare Source](https://togithub.com/cloudflare/workers-sdk/compare/wrangler@3.26.0...wrangler@3.27.0) ##### Minor Changes - [#​4877](https://togithub.com/cloudflare/workers-sdk/pull/4877) [`3e7cd6e4`](https://togithub.com/cloudflare/workers-sdk/commit/3e7cd6e40816c5c6ab28163508a6ba9729c6de73) Thanks [@​magnusdahlstrand](https://togithub.com/magnusdahlstrand)! - fix: Do not show unnecessary errors during watch rebuilds When Pages is used in conjunction with a full stack framework, the framework build will temporarily remove files that are being watched by Pages, such as `_worker.js` and `_routes.json`. Previously we would display errors for these changes, which adds confusing and excessive messages to the Pages dev output. Now builds are skipped if a watched `_worker.js` or `_routes.json` is removed. - [#​4901](https://togithub.com/cloudflare/workers-sdk/pull/4901) [`2469e9fa`](https://togithub.com/cloudflare/workers-sdk/commit/2469e9faeaaa86d70bc7e3714c515274b38a67de) Thanks [@​penalosa](https://togithub.com/penalosa)! - feature: implemented Python support in Wrangler Python Workers are now supported by `wrangler deploy` and `wrangler dev`. - [#​4922](https://togithub.com/cloudflare/workers-sdk/pull/4922) [`4c7031a6`](https://togithub.com/cloudflare/workers-sdk/commit/4c7031a6b2ed33e38147d95922d6b15b0ad851ec) Thanks [@​dario-piotrowicz](https://togithub.com/dario-piotrowicz)! - feature: add a `ctx` field to the `getBindingsProxy` result Add a new `ctx` filed to the `getBindingsProxy` result that people can use to mock the production `ExecutionContext` object. Example: ```ts const { ctx } = await getBindingsProxy(); ctx.waitUntil(myPromise); ``` ##### Patch Changes - [#​4914](https://togithub.com/cloudflare/workers-sdk/pull/4914) [`e61dba50`](https://togithub.com/cloudflare/workers-sdk/commit/e61dba503598b38d9daabe63ab71f75def1e7856) Thanks [@​nora-soderlund](https://togithub.com/nora-soderlund)! - fix: ensure d1 validation errors render user friendly messages - [#​4907](https://togithub.com/cloudflare/workers-sdk/pull/4907) [`583e4451`](https://togithub.com/cloudflare/workers-sdk/commit/583e4451c99d916bde52e766b8a19765584303d1) Thanks [@​mrbbot](https://togithub.com/mrbbot)! - fix: mark R2 object and bucket not found errors as unreportable Previously, running `wrangler r2 objects {get,put}` with an object or bucket that didn't exist would ask if you wanted to report that error to Cloudflare. There's nothing we can do to fix this, so this change prevents the prompt in this case. - [#​4872](https://togithub.com/cloudflare/workers-sdk/pull/4872) [`5ef56067`](https://togithub.com/cloudflare/workers-sdk/commit/5ef56067ccf8e20b34fe87455da8b798702181f1) Thanks [@​rozenmd](https://togithub.com/rozenmd)! - fix: intercept and stringify errors thrown by d1 execute in --json mode Prior to this PR, if a query threw an error when run in `wrangler d1 execute ... --json`, wrangler would swallow the error. This PR returns the error as JSON. For example, the invalid query `SELECT asdf;` now returns the following in JSON mode: ```json { "error": { "text": "A request to the Cloudflare API (/accounts/xxxx/d1/database/xxxxxxx/query) failed.", "notes": [ { "text": "no such column: asdf at offset 7 [code: 7500]" } ], "kind": "error", "name": "APIError", "code": 7500 } } ``` - [#​4888](https://togithub.com/cloudflare/workers-sdk/pull/4888) [`3679bc18`](https://togithub.com/cloudflare/workers-sdk/commit/3679bc18b2cb849fd4023ac653c06e0a7ec2195f) Thanks [@​petebacondarwin](https://togithub.com/petebacondarwin)! - fix: ensure that the Pages dev proxy server does not change the Host header Previously, when configuring `wrangler pages dev` to use a proxy to a 3rd party dev server, the proxy would replace the Host header, resulting in problems at the dev server if it was checking for cross-site scripting attacks. Now the proxy server passes through the Host header unaltered making it invisible to the 3rd party dev server. Fixes [#​4799](https://togithub.com/cloudflare/workers-sdk/issues/4799) - [#​4909](https://togithub.com/cloudflare/workers-sdk/pull/4909) [`34b6ea1e`](https://togithub.com/cloudflare/workers-sdk/commit/34b6ea1ea59884daca0c0d09265feacc10a4a685) Thanks [@​rozenmd](https://togithub.com/rozenmd)! - feat: add an experimental `insights` command to `wrangler d1` This PR adds a `wrangler d1 insights ` command, to let D1 users figure out which of their q

Configuration

📅 Schedule: Branch creation - "after 2am and before 3am" (UTC), Automerge - "after 1am and before 2am" (UTC).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.



This PR has been generated by Mend Renovate. View repository job log here.