Skip to content

Commit c912b99

Browse files
authored
Update wrangler esbuild version (#8890)
* fix: update esbuild version * chore: add changeset * update pnpm-lock file * fix invalid Go regular expression with esbuild v0.25.2 * chore: lock esbuild version * esbuild treats source map path references as URL now * fixup! fix invalid Go regular expression with esbuild v0.25.2
1 parent d04c69f commit c912b99

File tree

6 files changed

+285
-20
lines changed

6 files changed

+285
-20
lines changed

.changeset/brave-gifts-occur.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": minor
3+
---
4+
5+
update esbuild version to 0.25

packages/wrangler/src/__tests__/pages/deploy.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5510,7 +5510,9 @@ Failed to publish your Function. Got error: Uncaught TypeError: a is not a funct
55105510
expect(contents).toContain(
55115511
'Content-Disposition: form-data; name="functionsWorker-0.test.js.map"'
55125512
);
5513-
expect(contents).toContain('"sources":["[[path]].ts"');
5513+
expect(contents).toContain(
5514+
`"sources":["${encodeURIComponent("[[path]].ts")}"`
5515+
);
55145516
});
55155517

55165518
await runWrangler("pages deploy");

packages/wrangler/src/deployment-bundle/esbuild-plugins/alias-external.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function esbuildAliasExternalPlugin(
99
return {
1010
name: "external-alias-imports",
1111
setup(build) {
12-
build.onResolve({ filter: /.*/g }, (args) => {
12+
build.onResolve({ filter: /.*/ }, (args) => {
1313
// If it's the entrypoint, let it be as is
1414
if (args.kind === "entry-point") {
1515
return {

packages/wrangler/src/pages/functions/buildWorker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ function blockWorkerJsImports(nodejsCompatMode: NodeJSCompatMode): Plugin {
339339
return {
340340
name: "block-worker-js-imports",
341341
setup(build) {
342-
build.onResolve({ filter: /.*/g }, (args) => {
342+
build.onResolve({ filter: /.*/ }, (args) => {
343343
// If it's the entrypoint, let it be as is
344344
if (args.kind === "entry-point") {
345345
return {

0 commit comments

Comments
 (0)