Skip to content

Support using keyword in miniflare when parsing scripts#13864

Open
benjamincburns wants to merge 1 commit into
cloudflare:mainfrom
benjamincburns:miniflare/bump-acorn
Open

Support using keyword in miniflare when parsing scripts#13864
benjamincburns wants to merge 1 commit into
cloudflare:mainfrom
benjamincburns:miniflare/bump-acorn

Conversation

@benjamincburns
Copy link
Copy Markdown

@benjamincburns benjamincburns commented May 8, 2026

Fixes #12929

Updates miniflare's acorn dep from acorn@8.14.0 to acorn@8.16.0, and miniflare's acorn-walk dep from acorn-walk@8.3.2 to acorn-walk@8.3.5.

The acorn bump was necessary because acorn@8.14.0 didn't support the await and await using keywords. Support for these was added in acorn@8.15.0 and then improved in acorn@8.16.0.

Also bumped acorn-walk because the two are used together and it seemed sensible to get the bug fixes in at the same time.


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: dependency version bump w/o any logic changes
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: dependency version bump w/o any logic changes

A picture of a cute animal (not mandatory, but encouraged)

image

Image credit/details

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 8, 2026

🦋 Changeset detected

Latest commit: 5b6bcde

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
miniflare Minor
@cloudflare/pages-shared Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@workers-devprod workers-devprod requested review from a team and removed request for a team May 8, 2026 02:36
@workers-devprod
Copy link
Copy Markdown
Contributor

workers-devprod commented May 8, 2026

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • .changeset/silly-boxes-shine.md: [@cloudflare/wrangler]
  • packages/miniflare/package.json: [@cloudflare/wrangler]
  • pnpm-lock.yaml: [@cloudflare/wrangler]

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 8, 2026

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@13864

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@13864

miniflare

npm i https://pkg.pr.new/miniflare@13864

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@13864

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@13864

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@13864

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13864

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@13864

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@13864

wrangler

npm i https://pkg.pr.new/wrangler@13864

commit: 1c4995e

@benjamincburns
Copy link
Copy Markdown
Author

@penalosa lmk if you want me to add a happy path test to this that shows this can handle using and await using now.

I opted not to as it felt more like it'd be testing acorn via miniflare instead of testing miniflare itself, but I can also see it being useful as a regression test and/or for proving the utility of this PR.

Updates miniflare's `acorn` dep from `acorn@8.14.0` to `acorn@8.16.0`,
and miniflare's `acorn-walk` dep from `acorn-walk@8.3.2` to
`acorn-walk@8.3.5`.

The `acorn` bump was necessary because `acorn@8.14.0` didn't support the
`await` and `await using` keywords. Support for these was added in
`acorn@8.15.0` and then improved in `acorn@8.16.0`.

Also bumped `acorn-walk` because the two are used together and it seemed
sensible to get the bug fixes in at the same time.

Fixes cloudflare#12929
@benjamincburns benjamincburns force-pushed the miniflare/bump-acorn branch from 1c4995e to 5b6bcde Compare May 15, 2026 08:30
@workers-devprod
Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/wrangler
Show detailed file reviewers
  • .changeset/silly-boxes-shine.md: [@cloudflare/wrangler]
  • packages/miniflare/package.json: [@cloudflare/wrangler]
  • pnpm-lock.yaml: [@cloudflare/wrangler]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Untriaged

Development

Successfully merging this pull request may close these issues.

Miniflare fails to parse worker scripts containing the using keyword

2 participants