github cloudflare/workers-sdk wrangler@0.0.27

Patch Changes

  • #838 9c025c4 Thanks @threepointone! - fix: remove timeout on custom builds, and make sure logs are visible

    This removes the timeout we have for custom builds. We shouldn't be applying this timeout anyway, since it doesn't block wrangler, just the user themselves. Further, in #759, we changed the custom build's process stdout/stderr config to "pipe" to pass tests, however that meant we wouldn't see logs in the terminal anymore. This patch removes the timeout, and brings back proper logging for custom builds.

  • #349 9d04a68 Thanks @GregBrimble! - chore: rename --script-path to --outfile for wrangler pages functions build command.
  • #836 28e3b17 Thanks @threepointone! - fix: toggle workers.dev subdomains only when required

    This fix -

    • passes the correct query param to check whether a workers.dev subdomain has already been published/enabled
    • thus enabling it only when it's not been enabled
    • it also disables it only when it's explicitly knows it's already been enabled

    The effect of this is that publishes are much faster.

  • #794 ee3475f Thanks @JacobMGEvans! - fix: Error messaging from failed login would dump a JSON.parse error in some situations. Added a fallback if .json fails to parse
    it will attempt .text() then throw result. If both attempts to parse fail it will throw an UnknownError with a message showing where
    it originated.

    resolves #539

  • #840 32f6108 Thanks @threepointone! - fix: make wrangler work on node v18

    There's some interference between our data fetching library undici and node 18's new fetch and co. (powered by undici internally) which replaces the filename of Files attached to FormDatas with a generic blob (likely this code - https://github.com/nodejs/undici/blob/615f6170f4bd39630224c038d1ea5bf505d292af/lib/fetch/formdata.js#L246-L250). It's still not clear why it does so, and it's hard to make an isolated example of this.

    Regardless, disabling the new fetch functionality makes undici use its own base classes, avoiding the problem for now, and unblocking our release. We'll keep investigating and look for a proper fix.

    Unblocks #834

  • #824 62af4b6 Thanks @threepointone! - feat: publish --dry-run

    It can be useful to do a dry run of publishing. Developers want peace of mind that a project will compile before actually publishing to live servers. Combined with --outdir, this is also useful for testing the output of publish. Further, it gives developers a chance to upload our generated sourcemap to a service like sentry etc, so that errors from the worker can be mapped against actual source code, but before the service actually goes live.

  • #839 f2d6de6 Thanks @threepointone! - fix: persist dev experimental storage state in feature specific dirs

    With --experimental-enable-local-persistence in dev, we were clobbering a single folder with data from kv/do/cache. This patch gives individual folders for them. It also enables persistence even when this is not true, but that stays only for the length of a session, and cleans itself up when the dev session ends.

    Fixes #830

  • #796 3e0db3b Thanks @GregBrimble! - fix: Makes Response Headers object mutable after a call to next() in Pages Functions
  • #814 51fea7c Thanks @threepointone! - fix: disallow setting account_id in named service environments

    Much like #641, we don't want to allow setting account_id with named service environments. This is so that we use the same account_id for multiple environments, and have them group together in the dashboard.

  • #823 4a00910 Thanks @threepointone! - fix: don't log an error when wrangler dev is cancelled early

    We currently log an AbortError with a stack if we exit wrangler dev's startup process before it's done. This fix skips logging that error (since it's not an exception).

    Test plan:

    cd packages/wrangler
    npm run build
    cd ../../examples/workers-chat-demo
    npx wrangler dev
    # hit [x] as soon as the hotkey shortcut bar shows
    
  • #815 025c722 Thanks @threepointone! - fix: ensure that bundle is generated to es2020 target

    The default tsconfig generated by tsc uses target: "es5", which we don't support. This fix ensures that we output es2020 modules, even if tsconfig asks otherwise.

  • #349 9d04a68 Thanks @GregBrimble! - feature: Adds a --plugin option to wrangler pages functions build which compiles a Pages Plugin. More information about Pages Plugins can be found here. This wrangler build is required for both the development of, and inclusion of, plugins.
  • #822 4302172 Thanks @GregBrimble! - chore: Add help messages for wrangler pages project and wrangler pages deployment
  • #837 206b9a5 Thanks @threepointone! - polish: replace 🦺 with ⚠️

    I got some feedback that the construction worker jacket (?) icon for deprecations is confusing, especially because it's an uncommon icon and not very big in the terminal. This patch replaces it with a more familiar warning symbol.

  • #824 62af4b6 Thanks @threepointone! - feat: publish --outdir <path>

    It can be useful to introspect built assets. A leading usecase is to upload the sourcemap that we generate to services like sentry etc, so that errors from the worker can be mapped against actual source code. We introduce a --outdir cli arg to specify a path to generate built assets at, which doesn't get cleaned up after publishing. We are not adding this to wrangler.toml just yet, but could in the future if it looks appropriate there.

  • #811 8c2c7b7 Thanks @JacobMGEvans! - feat: Added minify as a configuration option and a cli arg, which will minify code for dev and publish

    resolves #785

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.