github cloudflare/workers-sdk wrangler@0.0.13

Patch Changes

  • #293 71b0fab Thanks @petebacondarwin! - fix: warn if the site.entry-point configuration is found during publishing

    Also updates the message and adds a test for the error when there is no entry-point specified.

    Fixes #282

  • #304 7477b52 Thanks @threepointone! - feat: enhance wrangler init

    This PR adds some enhancements/fixes to the wrangler init command.

    • doesn't overwrite wrangler.toml if it already exists
    • installs wrangler when creating package.json
    • offers to install wrangler into package.json even if package.json already exists
    • offers to install @cloudflare/workers-types even if tsconfig.json already exists
    • pipes stdio back to the terminal so there's feedback when it's installing npm packages

    This does have the side effect of making out tests slower. I added --prefer-offline to the npm install calls to make this a shade quicker, but I can't figure out a good way of mocking these. I'll think about it some more later. We should work on making the installs themselves quicker (re: #66)

    This PR also fixes a bug with our tests - runWrangler would catch thrown errors, and if we didn't manually verify the error, tests would pass. Instead, it now throws correctly, and I modified all the tests to assert on thrown errors. It seems like a lot, but it was just mechanical rewriting.

  • #294 7746fba Thanks @threepointone! - feature: add more types that get logged via console methods

    This PR adds more special logic for some data types that get logged via console methods. Types like Promise, Date, WeakMaps, and some more, now get logged correctly (or at least, better than they used to).

    This PR also fixes a sinister bug - the type of the ConsoleAPICalled events don't match 1:1 with actual console methods (eg: console.warn message type is warning). This PR adds a mapping between those types and method names. Some methods don't seem to have a message type, I'm not sure why, but we'll get to them later.

  • #310 52c99ee Thanks @threepointone! - feat: error if a site definition doesn't have a bucket field

    This adds an assertion error for making sure a [site] definition always has a bucket field.As a cleanup, I made some small fixes to the Config type definition, and modified the tests in publish.test.ts to use the config format when creating a wrangler.toml file.

Don't miss a new workers-sdk release

NewReleases is sending notifications on new releases.