Skip to content

fix(jsdom): support Blob on jsdom 30.1 - #11379

Merged
sheremet-va merged 2 commits into
mainfrom
fix/jsdom-30-blob-impl
Sep 28, 2026
Merged

sheremet-va merged 2 commits into
mainfrom
fix/jsdom-30-blob-impl

Conversation

@sheremet-va

Copy link
Copy Markdown
Member

Fixes #11336

jsdom 30.1 keeps the wrapper impl in a private field, so the own-symbol
scan finds nothing and every jsdom Blob passed to fetch, Request,
FormData or URL.createObjectURL throws. Read the impl through jsdom's
own implForWrapper binding and keep the symbol scan as a fallback.

Fixes #11336
@netlify

netlify Bot commented Sep 28, 2026

Copy link
Copy Markdown

✅ Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit a44ef87
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6aba6b50b07e96000811fcc0
😎 Deploy Preview https://deploy-preview-11379--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@sheremet-va
sheremet-va merged commit 6c49b71 into main Sep 28, 2026
7 of 9 checks passed
@sheremet-va
sheremet-va deleted the fix/jsdom-30-blob-impl branch September 28, 2026 13:36
@LukasTy LukasTy mentioned this pull request Oct 1, 2026
1 task
rifflock added a commit to rifflock/vitest that referenced this pull request Oct 2, 2026
Backports vitest-dev#11295 and vitest-dev#11379. On jsdom 28+ the Blob impl stores its
bytes as `_bytes`, so every Blob passed through `URL.createObjectURL`,
a `Request` body or `FormData` became the string "undefined". jsdom
30.1 also stopped exposing the impl as an own Symbol, so the lookup
itself threw.

It also resolves jsdom's bindings inside the copy the environment
imported. A bare `jsdom/lib/...` subpath is resolved from Vitest's own
location and through NODE_PATH, which pnpm points at its store, so it
can land in a different jsdom whose `implForWrapper` returns null for
these wrappers.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
helping-kaiser added a commit to helping-kaiser/cogra that referenced this pull request Oct 2, 2026
jsdom 30.1 changed Blob internals; vitest's jsdom compat layer crashes
on FormData uploads until its 5.0.3 fix (vitest-dev/vitest#11379).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cconard96 cconard96 mentioned this pull request Oct 2, 2026
2 of 4 tasks
dadezzz pushed a commit to dadezzz/forgejo-agent that referenced this pull request Oct 4, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [vitest](https://vitest.dev) ([source](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | [`5.0.2` → `5.0.3`](https://renovatebot.com/diffs/npm/vitest/5.0.2/5.0.3) | ![age](https://developer.mend.io/api/mc/badges/age/npm/vitest/5.0.3?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/vitest/5.0.2/5.0.3?slim=true) |

---

### Release Notes

<details>
<summary>vitest-dev/vitest (vitest)</summary>

### [`v5.0.3`](https://github.com/vitest-dev/vitest/releases/tag/v5.0.3)

[Compare Source](vitest-dev/vitest@v5.0.2...v5.0.3)

#####    🐞 Bug Fixes

- Isolate `result.status` between `repeats` runs  -  by [@&#8203;hi-ogawa](https://github.com/hi-ogawa), **Hiroshi Ogawa** and **Codex (GPT-6)** in [#&#8203;11218](vitest-dev/vitest#11218) [<samp>(5dbeb)</samp>](vitest-dev/vitest@5dbebe9e3)
- Don't print an interceptor warning in browser mode  -  by [@&#8203;sheremet-va](https://github.com/sheremet-va) in [#&#8203;11377](vitest-dev/vitest#11377) [<samp>(15cc0)</samp>](vitest-dev/vitest@15cc006aa)
- Don't retry when `test.fails` expectedly failed  -  by [@&#8203;hi-ogawa](https://github.com/hi-ogawa), **Hiroshi Ogawa** and **Codex (GPT-6)** in [#&#8203;11219](vitest-dev/vitest#11219) [<samp>(b2458)</samp>](vitest-dev/vitest@b24585f08)
- Scope cache key generators to projects  -  by [@&#8203;ecoyoung](https://github.com/ecoyoung) in [#&#8203;11281](vitest-dev/vitest#11281) and [#&#8203;11301](vitest-dev/vitest#11301) [<samp>(92ba7)</samp>](vitest-dev/vitest@92ba7fc1d)
- **browser**:
  - Delay server `listen` until tests start running  -  by [@&#8203;sheremet-va](https://github.com/sheremet-va) in [#&#8203;11366](vitest-dev/vitest#11366) [<samp>(7d8ed)</samp>](vitest-dev/vitest@7d8ed3e9b)
  - Check mock path boundaries  -  by [@&#8203;saryn17](https://github.com/saryn17), **Ryosei Sato** and [@&#8203;sheremet-va](https://github.com/sheremet-va) in [#&#8203;11361](vitest-dev/vitest#11361) and [#&#8203;11362](vitest-dev/vitest#11362) [<samp>(1c388)</samp>](vitest-dev/vitest@1c3888bce)
  - Keep config of browser-consumed environments  -  by [@&#8203;kasperpeulen](https://github.com/kasperpeulen) and **Claude** in [#&#8203;11378](vitest-dev/vitest#11378) [<samp>(aafc0)</samp>](vitest-dev/vitest@aafc0996f)
  - Ignore page crash while cancelling  -  by [@&#8203;sheremet-va](https://github.com/sheremet-va) in [#&#8203;11386](vitest-dev/vitest#11386) [<samp>(7c367)</samp>](vitest-dev/vitest@7c36748fa)
  - `toMatchScreenshot` uses wrong reference on retried tests  -  by [@&#8203;macarie](https://github.com/macarie) in [#&#8203;11393](vitest-dev/vitest#11393) [<samp>(c22ab)</samp>](vitest-dev/vitest@c22aba992)
- **cache**:
  - Revalidate imports of cached modules  -  by [@&#8203;sheremet-va](https://github.com/sheremet-va) in [#&#8203;11381](vitest-dev/vitest#11381) [<samp>(38f98)</samp>](vitest-dev/vitest@38f98855f)
- **deps**:
  - Pin `why-is-node-running` to `3.2.1` to avoid users running into `ERR_PNPM_TRUST_DOWNGRADE`  -  by [@&#8203;AriPerkkio](https://github.com/AriPerkkio) in [#&#8203;11403](vitest-dev/vitest#11403) [<samp>(f6c9a)</samp>](vitest-dev/vitest@f6c9a4977)
- **expect**:
  - Pass current equality testers to `expect.extend` asymmetric matchers  -  by [@&#8203;hi-ogawa](https://github.com/hi-ogawa), **Hiroshi Ogawa** and **Claude** in [#&#8203;11401](vitest-dev/vitest#11401) [<samp>(3e794)</samp>](vitest-dev/vitest@3e794a96b)
- **jsdom**:
  - Support Blob on jsdom 30.1  -  by [@&#8203;sheremet-va](https://github.com/sheremet-va) in [#&#8203;11379](vitest-dev/vitest#11379) [<samp>(6c49b)</samp>](vitest-dev/vitest@6c49b7197)
- **pool**:
  - Preserve unique pool ids when `groupOrder` is set  -  by [@&#8203;mtorp](https://github.com/mtorp) in [#&#8203;11392](vitest-dev/vitest#11392) [<samp>(50312)</samp>](vitest-dev/vitest@50312ebb4)
- **ui**:
  - Split-pane handle overlapping iframe  -  by [@&#8203;macarie](https://github.com/macarie) in [#&#8203;11221](vitest-dev/vitest#11221) [<samp>(f91db)</samp>](vitest-dev/vitest@f91db0dfd)
- **vitest**:
  - Remove root temp dir on close  -  by [@&#8203;abhinav-phi](https://github.com/abhinav-phi) in [#&#8203;11248](vitest-dev/vitest#11248) [<samp>(7c711)</samp>](vitest-dev/vitest@7c7119cf7)
- **vm**:
  - Do not optimize deps from index.html  -  by [@&#8203;ezefernandezyf](https://github.com/ezefernandezyf), **Hiroshi Ogawa** and **Codex (GPT-6)** in [#&#8203;11329](vitest-dev/vitest#11329) and [#&#8203;11360](vitest-dev/vitest#11360) [<samp>(caf28)</samp>](vitest-dev/vitest@caf2887de)
  - Don't reuse scripts across vite environments  -  by [@&#8203;MO2k4](https://github.com/MO2k4), **Martin Oehlert** and **Claude** in [#&#8203;11395](vitest-dev/vitest#11395) [<samp>(346d3)</samp>](vitest-dev/vitest@346d3896b)

#####     [View changes on GitHub](vitest-dev/vitest@v5.0.2...v5.0.3)

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzIuMiIsInVwZGF0ZWRJblZlciI6IjQ0LjEzMi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jsdom 30.1: URL.createObjectURL and Blob request bodies throw Cannot read properties of undefined (reading '_buffer')

1 participant