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 #6859

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 9 additions & 0 deletions .changeset/thick-dolls-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@cloudflare/vitest-pool-workers": minor
"create-cloudflare": minor
"@cloudflare/workers-shared": minor
"miniflare": minor
"wrangler": minor
---

chore: Update esbuild
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@vue/compiler-sfc": "^3.3.4",
"cross-env": "^7.0.3",
"dotenv-cli": "^7.3.0",
"esbuild": "0.17.19",
"esbuild": "0.24.0",
"esbuild-register": "^3.5.0",
"jsonc-parser": "^3.2.0",
"prettier": "^3.2.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"chalk": "^5.2.0",
"esbuild": "0.17.19",
"esbuild": "0.24.0",
"log-update": "^5.0.1",
"undici": "^5.28.4"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"degit": "^2.8.4",
"dns2": "^2.1.0",
"dotenv": "^16.0.0",
"esbuild": "0.17.19",
"esbuild": "0.24.0",
"execa": "^7.1.1",
"glob": "^10.3.3",
"haikunator": "^2.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/miniflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"concurrently": "^8.2.2",
"devalue": "^4.3.0",
"devtools-protocol": "^0.0.1182435",
"esbuild": "0.17.19",
"esbuild": "0.24.0",
"eslint": "^8.49.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-es": "^4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/quick-edit-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"devDependencies": {
"@cloudflare/workers-tsconfig": "workspace:^",
"@cloudflare/workers-types": "^4.20240925.0",
"esbuild": "0.17.19",
"esbuild": "0.24.0",
"esbuild-register": "^3.5.0"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/vitest-pool-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"birpc": "0.2.14",
"cjs-module-lexer": "^1.2.3",
"devalue": "^4.3.0",
"esbuild": "0.17.19",
"esbuild": "0.24.0",
"miniflare": "workspace:*",
"semver": "^7.5.1",
"wrangler": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/workers-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"@cloudflare/workers-types": "^4.20240925.0",
"@types/mime": "^3.0.4",
"concurrently": "^8.2.2",
"esbuild": "0.17.19",
"esbuild": "0.24.0",
"rimraf": "^6.0.1",
"toucan-js": "^3.3.1",
"typescript": "^5.5.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/wrangler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
"blake3-wasm": "^2.1.5",
"chokidar": "^3.5.3",
"esbuild": "0.17.19",
"esbuild": "0.24.0",
"miniflare": "workspace:*",
"nanoid": "^3.3.3",
"path-to-regexp": "^6.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,18 @@ describe("BundleController", () => {
let ev = await waitForBundleComplete(controller);
expect(findSourceFile(ev.bundle.entrypointSource, "index.ts"))
.toMatchInlineSnapshot(`
"// index.ts
var src_default = {
fetch(request, env, ctx) {
return new Response(\\"hello world\\");
}
};
"
`);
"// index.ts
var src_exports = {};
__export(src_exports, {
default: () => src_default
});
var src_default = {
fetch(request, env, ctx) {
return new Response(\\"hello world\\");
}
};
"
`);
await seed({
"src/index.ts": dedent/* javascript */ `
export default {
Expand All @@ -111,14 +115,18 @@ describe("BundleController", () => {
ev = await waitForBundleComplete(controller);
expect(findSourceFile(ev.bundle.entrypointSource, "index.ts"))
.toMatchInlineSnapshot(`
"// index.ts
var src_default = {
fetch(request, env, ctx) {
return new Response(\\"hello world 2\\");
}
};
"
`);
"// index.ts
var src_exports = {};
__export(src_exports, {
default: () => src_default
});
var src_default = {
fetch(request, env, ctx) {
return new Response(\\"hello world 2\\");
}
};
"
`);
});

test("multiple ts source files", async ({ controller }) => {
Expand Down Expand Up @@ -168,14 +176,13 @@ describe("BundleController", () => {
`);
expect(findSourceFile(ev.bundle.entrypointSource, "index.ts"))
.toMatchInlineSnapshot(`
"// index.ts
var src_default = {
fetch(request, env, ctx) {
return new Response(\\"hello world\\" + other_default);
}
};
"
`);
"// index.ts
var src_exports = {};
__export(src_exports, {
default: () => src_default
});
"
`);
await seed({
"src/other.ts": dedent/* javascript */ `
export default "someone else"
Expand Down Expand Up @@ -230,14 +237,18 @@ describe("BundleController", () => {
let ev = await waitForBundleComplete(controller);
expect(findSourceFile(ev.bundle.entrypointSource, "out.ts"))
.toMatchInlineSnapshot(`
"// out.ts
var out_default = {
fetch(request, env, ctx) {
return new Response(\\"hello custom build\\");
}
};
"
`);
"// out.ts
var out_exports = {};
__export(out_exports, {
default: () => out_default
});
var out_default = {
fetch(request, env, ctx) {
return new Response(\\"hello custom build\\");
}
};
"
`);
await seed({
"random_dir/index.ts": dedent/* javascript */ `
export default {
Expand All @@ -251,14 +262,18 @@ describe("BundleController", () => {
ev = await waitForBundleComplete(controller);
expect(findSourceFile(ev.bundle.entrypointSource, "out.ts"))
.toMatchInlineSnapshot(`
"// out.ts
var out_default = {
fetch(request, env, ctx) {
return new Response(\\"hello custom build 2\\");
}
};
"
`);
"// out.ts
var out_exports = {};
__export(out_exports, {
default: () => out_default
});
var out_default = {
fetch(request, env, ctx) {
return new Response(\\"hello custom build 2\\");
}
};
"
`);
});
});

Expand Down Expand Up @@ -364,14 +379,18 @@ describe("BundleController", () => {
const ev = await waitForBundleComplete(controller);
expect(findSourceFile(ev.bundle.entrypointSource, "index.ts"))
.toMatchInlineSnapshot(`
"// index.ts
var src_default = {
fetch(request, env, ctx) {
return new Response(\\"hello world\\");
}
};
"
`);
"// index.ts
var src_exports = {};
__export(src_exports, {
default: () => src_default
});
var src_default = {
fetch(request, env, ctx) {
return new Response(\\"hello world\\");
}
};
"
`);

await seed({
"random_dir/index.ts": dedent/* javascript */ `
Expand Down Expand Up @@ -412,14 +431,18 @@ describe("BundleController", () => {
let evCustom = await waitForBundleComplete(controller);
expect(findSourceFile(evCustom.bundle.entrypointSource, "out.ts"))
.toMatchInlineSnapshot(`
"// out.ts
var out_default = {
fetch(request, env, ctx) {
return new Response(\\"hello custom build\\");
}
};
"
`);
"// out.ts
var out_exports = {};
__export(out_exports, {
default: () => out_default
});
var out_default = {
fetch(request, env, ctx) {
return new Response(\\"hello custom build\\");
}
};
"
`);
// Make sure custom builds can reload after switching to them
await seed({
"random_dir/index.ts": dedent/* javascript */ `
Expand All @@ -434,14 +457,18 @@ describe("BundleController", () => {
evCustom = await waitForBundleComplete(controller);
expect(findSourceFile(evCustom.bundle.entrypointSource, "out.ts"))
.toMatchInlineSnapshot(`
"// out.ts
var out_default = {
fetch(request, env, ctx) {
return new Response(\\"hello custom build 2\\");
}
};
"
`);
"// out.ts
var out_exports = {};
__export(out_exports, {
default: () => out_default
});
var out_default = {
fetch(request, env, ctx) {
return new Response(\\"hello custom build 2\\");
}
};
"
`);
});

test("custom builds -> esbuild", async ({ controller }) => {
Expand Down Expand Up @@ -484,14 +511,18 @@ describe("BundleController", () => {
const evCustom = await waitForBundleComplete(controller);
expect(findSourceFile(evCustom.bundle.entrypointSource, "out.ts"))
.toMatchInlineSnapshot(`
"// out.ts
var out_default = {
fetch(request, env, ctx) {
return new Response(\\"hello custom build\\");
}
};
"
`);
"// out.ts
var out_exports = {};
__export(out_exports, {
default: () => out_default
});
var out_default = {
fetch(request, env, ctx) {
return new Response(\\"hello custom build\\");
}
};
"
`);
await seed({
"src/index.ts": dedent/* javascript */ `
export default {
Expand Down Expand Up @@ -529,14 +560,18 @@ describe("BundleController", () => {
let ev = await waitForBundleComplete(controller);
expect(findSourceFile(ev.bundle.entrypointSource, "index.ts"))
.toMatchInlineSnapshot(`
"// index.ts
var src_default = {
fetch(request, env, ctx) {
return new Response(\\"hello world\\");
}
};
"
`);
"// index.ts
var src_exports = {};
__export(src_exports, {
default: () => src_default
});
var src_default = {
fetch(request, env, ctx) {
return new Response(\\"hello world\\");
}
};
"
`);
await seed({
"src/index.ts": dedent/* javascript */ `
export default {
Expand All @@ -550,14 +585,18 @@ describe("BundleController", () => {
ev = await waitForBundleComplete(controller);
expect(findSourceFile(ev.bundle.entrypointSource, "index.ts"))
.toMatchInlineSnapshot(`
"// index.ts
var src_default = {
fetch(request, env, ctx) {
return new Response(\\"hello world 2\\");
}
};
"
`);
"// index.ts
var src_exports = {};
__export(src_exports, {
default: () => src_default
});
var src_default = {
fetch(request, env, ctx) {
return new Response(\\"hello world 2\\");
}
};
"
`);
});
});
});
Loading
Loading