Support using keyword in miniflare when parsing scripts#13864
Conversation
🦋 Changeset detectedLatest commit: 08c6a1a The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
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 |
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
37e8ff4 to
1c4995e
Compare
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
|
@penalosa lmk if you want me to add a happy path test to this that shows this can handle 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. |
1c4995e to
5b6bcde
Compare
|
Codeowners approval required for this PR:
Show detailed file reviewers |
workers-devprod
left a comment
There was a problem hiding this comment.
Codeowners reviews satisfied
If you have time to add a test, I think it would help for both of the reasons you give. Thanks! |
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
5b6bcde to
08c6a1a
Compare
|
@petebacondarwin no problem! Just pushed an updated commit that also adds two new tests (one for |
|
Should've probably also mentioned that I did validate that the added tests fail when |
Fixes #12929
Updates miniflare's
acorndep fromacorn@8.14.0toacorn@8.16.0, and miniflare'sacorn-walkdep fromacorn-walk@8.3.2toacorn-walk@8.3.5.The
acornbump was necessary becauseacorn@8.14.0didn't support theawaitandawait usingkeywords. Support for these was added inacorn@8.15.0and then improved inacorn@8.16.0.Also bumped
acorn-walkbecause the two are used together and it seemed sensible to get the bug fixes in at the same time.A picture of a cute animal (not mandatory, but encouraged)
Image credit/details