Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade to miniflare@2.12.1 & @miniflare/tre@3.0.0-next.10 #2771

Merged
merged 1 commit into from
Feb 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/tasty-rabbits-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@cloudflare/pages-shared": patch
"wrangler": patch
---

chore: upgrade `miniflare` to [`2.12.1`](https://github.com/cloudflare/miniflare/releases/tag/v2.12.1) and `@miniflare/tre` to [`3.0.0-next.10`](https://github.com/cloudflare/miniflare/releases/tag/v3.0.0-next.10)
5 changes: 5 additions & 0 deletions node-types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,9 @@ declare global {
// by `vite`. Therefore, define it as an empty interface.
// eslint-disable-next-line @typescript-eslint/no-empty-interface
interface Worker {}

// `MessagePort` has been global since Node 15, but isn't included in
// `@types/node`. This is required by `undici`'s types.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there an issue open for this on @types/node? If not, maybe we should open one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is looks like this was added in DefinitelyTyped/DefinitelyTyped#59905, which isn't included in our @types/node version (16.11.22). I tried upgrading to 16.18.12 (we don't want to upgrade beyond 16 because our minimum supported Node version is 16.13.0), and I still get the same missing MessagePort error. I think we should leave this for now. 👍

// eslint-disable-next-line no-var,@typescript-eslint/consistent-type-imports
var MessagePort: typeof import("worker_threads").MessagePort;
}