diff --git a/.changeset/big-steaks-design.md b/.changeset/big-steaks-design.md deleted file mode 100644 index 461d5f96a63e..000000000000 --- a/.changeset/big-steaks-design.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -Refactor pages code to pass strict-null checks diff --git a/.changeset/clever-turtles-shake.md b/.changeset/clever-turtles-shake.md deleted file mode 100644 index 2f95b32ed866..000000000000 --- a/.changeset/clever-turtles-shake.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"wrangler": patch ---- - -refactor: tidy up the typings of the build result in dev - -In #262 some of the strict null fixes were removed to resolve a regression. -This refactor re-applies these fixes in a way that avoids that problem. diff --git a/.changeset/cyan-comics-sneeze.md b/.changeset/cyan-comics-sneeze.md deleted file mode 100644 index fcf473755309..000000000000 --- a/.changeset/cyan-comics-sneeze.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -Add whoami command diff --git a/.changeset/fair-buses-fix.md b/.changeset/fair-buses-fix.md deleted file mode 100644 index 6e7d1f1c4d71..000000000000 --- a/.changeset/fair-buses-fix.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -feat: add support for include and exclude when publishing site assets diff --git a/.changeset/four-tips-yell.md b/.changeset/four-tips-yell.md deleted file mode 100644 index eabd143c43dc..000000000000 --- a/.changeset/four-tips-yell.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -"wrangler": patch ---- - -fix: ensure `kv:key list` matches the output from Wrangler 1 - -The previous output was passing an array of objects to console.log, which ended up showing something like - -``` -[Object object] -[Object object] -... -``` - -Now the result is JSON stringified before being sent to the console. -The tests have been fixed to check this too. diff --git a/.changeset/heavy-paws-relate.md b/.changeset/heavy-paws-relate.md deleted file mode 100644 index cb983e0fc6df..000000000000 --- a/.changeset/heavy-paws-relate.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"wrangler": patch ---- - -fix: correctly handle entry-point path when publishing - -The `publish` command was failing when the entry-point was specified in the wrangler.toml file and the entry-point imported another file. - -This was because we were using the `metafile.inputs` to guess the entry-point file path. But the order in which the source-files were added to this object was not well defined, and so we could end up failing to find a match. - -This fix avoids this by using the fact that the `metadata.outputs` object will only contain one element that has the `entrypoint` property - and then using that as the entry-point path. For runtime safety, we now assert that there cannot be zero or multiple such elements. diff --git a/.changeset/modern-beers-repair.md b/.changeset/modern-beers-repair.md deleted file mode 100644 index 057194d4d842..000000000000 --- a/.changeset/modern-beers-repair.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"wrangler": patch ---- - -feat: add a link to create a github issue when there is an error. - -When a (non-yargs) error surfaces to the top level, -we know also show a link to Github to encourage the developer to report an issue. diff --git a/.changeset/nervous-cheetahs-retire.md b/.changeset/nervous-cheetahs-retire.md deleted file mode 100644 index 9cf1593b5c68..000000000000 --- a/.changeset/nervous-cheetahs-retire.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -chore: Update `node-fetch` to 3.1.1, run `npm audit fix` in root - -This commit addresses a secutity issue in `node-fetch` and updates it to 3.1.1. I also ran `npm audit fix` in the root directory to address a similar issue with `@changesets/get-github-info`. diff --git a/.changeset/orange-cycles-rule.md b/.changeset/orange-cycles-rule.md deleted file mode 100644 index 700bf4d857df..000000000000 --- a/.changeset/orange-cycles-rule.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"wrangler": patch ---- - -Do not crash when processing environment configuration. - -Previously there were corner cases where the configuration might just crash. -These are now handled more cleanly with more appropriate warnings. diff --git a/.changeset/quiet-pianos-try.md b/.changeset/quiet-pianos-try.md deleted file mode 100644 index ea971fb32d8f..000000000000 --- a/.changeset/quiet-pianos-try.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -refactor: enable TypeScript strict-null checks - -The codebase is now strict-null compliant and the CI checks will fail if a PR tries to introduce code that is not. diff --git a/.changeset/quiet-steaks-smoke.md b/.changeset/quiet-steaks-smoke.md deleted file mode 100644 index abc083a67e01..000000000000 --- a/.changeset/quiet-steaks-smoke.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"wrangler": patch ---- - -fix: align publishing sites asset keys with Wrangler 1 - -- Use the same hashing strategy for asset keys (xxhash64) -- Include the full path (from cwd) in the asset key -- Match include and exclude patterns against full path (from cwd) -- Validate that the asset key is not over 512 bytes long diff --git a/.changeset/silly-students-live.md b/.changeset/silly-students-live.md deleted file mode 100644 index ec6b3527154a..000000000000 --- a/.changeset/silly-students-live.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"wrangler": patch ---- - -fix: check actual asset file size, not base64 encoded size - -Previously we were checking whether the base64 encoded size of an asset was too large (>25MiB). -But base64 takes up more space than a normal file, so this was too aggressive. diff --git a/.changeset/tricky-lemons-warn.md b/.changeset/tricky-lemons-warn.md deleted file mode 100644 index c4947a560131..000000000000 --- a/.changeset/tricky-lemons-warn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"wrangler": patch ---- - -fix: appropriately fail silently when the open browser command doesn't work diff --git a/.changeset/violet-wasps-reply.md b/.changeset/violet-wasps-reply.md deleted file mode 100644 index 3b1329b96769..000000000000 --- a/.changeset/violet-wasps-reply.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"wrangler": patch ---- - -fix: skip unwanted files and directories when publishing site assets - -In keeping with Wrangler 1, we now skip node_modules and hidden files and directories. - -An exception is made for `.well-known`. See https://datatracker.ietf.org/doc/html/rfc8615. - -The tests also prove that the asset uploader will walk directories in general. diff --git a/.changeset/young-horses-jam.md b/.changeset/young-horses-jam.md deleted file mode 100644 index 42d8d747c047..000000000000 --- a/.changeset/young-horses-jam.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"wrangler": patch ---- - -chore: add test-watch script to the wrangler workspace - -Watch the files in the wrangler workspace, and run the tests when anything changes: - -```sh -> npm run test-watch -w wrangler -``` - -This will also run all the tests in a single process (rather than in parallel shards) and will increase the test-timeout to 50 seconds, which is helpful when debugging. diff --git a/package-lock.json b/package-lock.json index 7776471a90b4..5eb9b15f9031 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15122,7 +15122,7 @@ "license": "ISC" }, "packages/wrangler": { - "version": "0.0.10", + "version": "0.0.11", "license": "MIT OR Apache-2.0", "dependencies": { "esbuild": "0.14.1", diff --git a/packages/wrangler/CHANGELOG.md b/packages/wrangler/CHANGELOG.md index f26671c165ec..818630a3214b 100644 --- a/packages/wrangler/CHANGELOG.md +++ b/packages/wrangler/CHANGELOG.md @@ -1,5 +1,91 @@ # wrangler +## 0.0.11 + +### Patch Changes + +- [#242](https://github.com/cloudflare/wrangler2/pull/242) [`014a731`](https://github.com/cloudflare/wrangler2/commit/014a731a72e062e9d6a2a4e0c4a7fcecd697b872) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Refactor pages code to pass strict-null checks + +* [#267](https://github.com/cloudflare/wrangler2/pull/267) [`e22f9d7`](https://github.com/cloudflare/wrangler2/commit/e22f9d7c190e8c32e1121d15ea5581d919a5ef08) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - refactor: tidy up the typings of the build result in dev + + In #262 some of the strict null fixes were removed to resolve a regression. + This refactor re-applies these fixes in a way that avoids that problem. + +- [#284](https://github.com/cloudflare/wrangler2/pull/284) [`20377e8`](https://github.com/cloudflare/wrangler2/commit/20377e80d46d91560555c212a977b90308730c4d) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Add whoami command + +* [#270](https://github.com/cloudflare/wrangler2/pull/270) [`2453577`](https://github.com/cloudflare/wrangler2/commit/2453577c96704ca1d6934582796199a409d7b770) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - feat: add support for include and exclude when publishing site assets + +- [#270](https://github.com/cloudflare/wrangler2/pull/270) [`0289882`](https://github.com/cloudflare/wrangler2/commit/0289882a15eba55d802650a591f999ef7b614fb6) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: ensure `kv:key list` matches the output from Wrangler 1 + + The previous output was passing an array of objects to console.log, which ended up showing something like + + ``` + [Object object] + [Object object] + ... + ``` + + Now the result is JSON stringified before being sent to the console. + The tests have been fixed to check this too. + +* [#258](https://github.com/cloudflare/wrangler2/pull/258) [`f9c1423`](https://github.com/cloudflare/wrangler2/commit/f9c1423f0c5b6008f05b9657c9b84eb6f173563a) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: correctly handle entry-point path when publishing + + The `publish` command was failing when the entry-point was specified in the wrangler.toml file and the entry-point imported another file. + + This was because we were using the `metafile.inputs` to guess the entry-point file path. But the order in which the source-files were added to this object was not well defined, and so we could end up failing to find a match. + + This fix avoids this by using the fact that the `metadata.outputs` object will only contain one element that has the `entrypoint` property - and then using that as the entry-point path. For runtime safety, we now assert that there cannot be zero or multiple such elements. + +- [#275](https://github.com/cloudflare/wrangler2/pull/275) [`e9ab55a`](https://github.com/cloudflare/wrangler2/commit/e9ab55a106937e0a7909e54715ceb1fac9fce79e) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - feat: add a link to create a github issue when there is an error. + + When a (non-yargs) error surfaces to the top level, + we know also show a link to Github to encourage the developer to report an issue. + +* [#286](https://github.com/cloudflare/wrangler2/pull/286) [`b661dd0`](https://github.com/cloudflare/wrangler2/commit/b661dd066887c11fe838d25c0530ef935a55a51a) Thanks [@dependabot](https://github.com/apps/dependabot)! - chore: Update `node-fetch` to 3.1.1, run `npm audit fix` in root + + This commit addresses a secutity issue in `node-fetch` and updates it to 3.1.1. I also ran `npm audit fix` in the root directory to address a similar issue with `@changesets/get-github-info`. + +- [#249](https://github.com/cloudflare/wrangler2/pull/249) [`9769bc3`](https://github.com/cloudflare/wrangler2/commit/9769bc35243f7554b16153d9656750bb09c6f296) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Do not crash when processing environment configuration. + + Previously there were corner cases where the configuration might just crash. + These are now handled more cleanly with more appropriate warnings. + +* [#272](https://github.com/cloudflare/wrangler2/pull/272) [`5fcef05`](https://github.com/cloudflare/wrangler2/commit/5fcef05bbd8d046e29bbf61ab6aa84906ff077e1) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - refactor: enable TypeScript strict-null checks + + The codebase is now strict-null compliant and the CI checks will fail if a PR tries to introduce code that is not. + +- [#277](https://github.com/cloudflare/wrangler2/pull/277) [`6cc9dde`](https://github.com/cloudflare/wrangler2/commit/6cc9dde6665978f5d6435b7d6d56d41d718693c5) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: align publishing sites asset keys with Wrangler 1 + + - Use the same hashing strategy for asset keys (xxhash64) + - Include the full path (from cwd) in the asset key + - Match include and exclude patterns against full path (from cwd) + - Validate that the asset key is not over 512 bytes long + +* [#270](https://github.com/cloudflare/wrangler2/pull/270) [`522d1a6`](https://github.com/cloudflare/wrangler2/commit/522d1a6e4ec12d15148c48549dd074628cfd6824) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: check actual asset file size, not base64 encoded size + + Previously we were checking whether the base64 encoded size of an asset was too large (>25MiB). + But base64 takes up more space than a normal file, so this was too aggressive. + +- [#263](https://github.com/cloudflare/wrangler2/pull/263) [`402c77d`](https://github.com/cloudflare/wrangler2/commit/402c77d6be1dc7e797afb20893d2862c96f0343a) Thanks [@jkriss](https://github.com/jkriss)! - fix: appropriately fail silently when the open browser command doesn't work + +* [#280](https://github.com/cloudflare/wrangler2/pull/280) [`f19dde1`](https://github.com/cloudflare/wrangler2/commit/f19dde1a7e71d13e9c249345b7affd1cfef79b2c) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - fix: skip unwanted files and directories when publishing site assets + + In keeping with Wrangler 1, we now skip node_modules and hidden files and directories. + + An exception is made for `.well-known`. See https://datatracker.ietf.org/doc/html/rfc8615. + + The tests also prove that the asset uploader will walk directories in general. + +- [#258](https://github.com/cloudflare/wrangler2/pull/258) [`ba6fc9c`](https://github.com/cloudflare/wrangler2/commit/ba6fc9c6ddbf3f5b7238f34087bc9533cdba2a5e) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - chore: add test-watch script to the wrangler workspace + + Watch the files in the wrangler workspace, and run the tests when anything changes: + + ```sh + > npm run test-watch -w wrangler + ``` + + This will also run all the tests in a single process (rather than in parallel shards) and will increase the test-timeout to 50 seconds, which is helpful when debugging. + ## 0.0.10 ### Patch Changes diff --git a/packages/wrangler/package.json b/packages/wrangler/package.json index 2589d4564dcb..2af9ad1a7c5c 100644 --- a/packages/wrangler/package.json +++ b/packages/wrangler/package.json @@ -1,6 +1,6 @@ { "name": "wrangler", - "version": "0.0.10", + "version": "0.0.11", "author": "wrangler@cloudflare.com", "description": "Command-line interface for all things Cloudflare Workers", "bin": {