Patch Changes
-
#242
014a731
Thanks @petebacondarwin! - Refactor pages code to pass strict-null checks -
#267
e22f9d7
Thanks @petebacondarwin! - refactor: tidy up the typings of the build result in devIn #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
20377e8
Thanks @petebacondarwin! - Add whoami command -
#270
2453577
Thanks @petebacondarwin! - feat: add support for include and exclude when publishing site assets -
#270
0289882
Thanks @petebacondarwin! - fix: ensurekv:key list
matches the output from Wrangler 1The 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
f9c1423
Thanks @petebacondarwin! - fix: correctly handle entry-point path when publishingThe
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 theentrypoint
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
e9ab55a
Thanks @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
b661dd0
Thanks @dependabot! - chore: Updatenode-fetch
to 3.1.1, runnpm audit fix
in rootThis commit addresses a secutity issue in
node-fetch
and updates it to 3.1.1. I also rannpm audit fix
in the root directory to address a similar issue with@changesets/get-github-info
. -
#249
9769bc3
Thanks @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
5fcef05
Thanks @petebacondarwin! - refactor: enable TypeScript strict-null checksThe codebase is now strict-null compliant and the CI checks will fail if a PR tries to introduce code that is not.
-
#277
6cc9dde
Thanks @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
522d1a6
Thanks @petebacondarwin! - fix: check actual asset file size, not base64 encoded sizePreviously 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
402c77d
Thanks @jkriss! - fix: appropriately fail silently when the open browser command doesn't work -
#280
f19dde1
Thanks @petebacondarwin! - fix: skip unwanted files and directories when publishing site assetsIn 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
ba6fc9c
Thanks @petebacondarwin! - chore: add test-watch script to the wrangler workspaceWatch the files in the wrangler workspace, and run the tests when anything changes:
> 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.