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: update esbuild #6884

Merged
merged 10 commits into from
Dec 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix --assets tests on Node 20 & 22
  • Loading branch information
penalosa committed Dec 2, 2024
commit 3994b480effc890d222cc519f2f8254e8c7a0dd2
20 changes: 13 additions & 7 deletions packages/wrangler/src/__tests__/deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4451,6 +4451,8 @@ addEventListener('fetch', event => {});`
const flatBodies = Object.fromEntries(
uploadBodies.flatMap((b) => [...b.entries()])
);
const [nodeMajorString] = process.versions.node.split(".");
const nodeMajor = Number(nodeMajorString);
await expect(
flatBodies["ff5016e92f039aa743a4ff7abb3180fa"]
).toBeAFileWhichMatches(
Expand All @@ -4459,7 +4461,7 @@ addEventListener('fetch', event => {});`
"ff5016e92f039aa743a4ff7abb3180fa",
{
// TODO: this should be "text/plain; charset=utf-8", but msw? is stripping the charset part
type: "text/plain",
type: nodeMajor > 18 ? "text/plain;charset=utf-8" : "text/plain",
}
)
);
Expand All @@ -4470,7 +4472,7 @@ addEventListener('fetch', event => {});`
["Q29udGVudCBvZiBmaWxlLTI="],
"7574a8cd3094a050388ac9663af1c1d6",
{
type: "text/plain",
type: nodeMajor > 18 ? "text/plain;charset=utf-8" : "text/plain",
}
)
);
Expand All @@ -4481,7 +4483,7 @@ addEventListener('fetch', event => {});`
["Q29udGVudCBvZiBmaWxlLTE="],
"0de3dd5df907418e9730fd2bd747bd5e",
{
type: "text/plain",
type: nodeMajor > 18 ? "text/plain;charset=utf-8" : "text/plain",
}
)
);
Expand Down Expand Up @@ -4868,14 +4870,18 @@ addEventListener('fetch', event => {});`
const flatBodies = Object.fromEntries(
bodies.flatMap((b) => [...b.entries()])
);

const [nodeMajorString] = process.versions.node.split(".");
const nodeMajor = Number(nodeMajorString);

await expect(
flatBodies["0de3dd5df907418e9730fd2bd747bd5e"]
).toBeAFileWhichMatches(
new File(
["Q29udGVudCBvZiBmaWxlLTE="],
"0de3dd5df907418e9730fd2bd747bd5e",
{
type: "text/plain",
type: nodeMajor > 18 ? "text/plain;charset=utf-8" : "text/plain",
}
)
);
Expand All @@ -4887,7 +4893,7 @@ addEventListener('fetch', event => {});`
"7574a8cd3094a050388ac9663af1c1d6",
{
// TODO: this should be "text/plain; charset=utf-8", but msw? is stripping the charset part
type: "text/plain",
type: nodeMajor > 18 ? "text/plain;charset=utf-8" : "text/plain",
}
)
);
Expand All @@ -4898,7 +4904,7 @@ addEventListener('fetch', event => {});`
["Q29udGVudCBvZiBmaWxlLTM="],
"ff5016e92f039aa743a4ff7abb3180fa",
{
type: "text/plain",
type: nodeMajor > 18 ? "text/plain;charset=utf-8" : "text/plain",
}
)
);
Expand All @@ -4909,7 +4915,7 @@ addEventListener('fetch', event => {});`
["Q29udGVudCBvZiBmaWxlLTU="],
"f05e28a3d0bdb90d3cf4bdafe592488f",
{
type: "text/plain",
type: nodeMajor > 18 ? "text/plain;charset=utf-8" : "text/plain",
}
)
);
Expand Down
Loading