Skip to content

Commit b83b9eb

Browse files
fix: align publishing sites asset keys with Wrangler 1
- Use the same hashing strategy for asset keys (xxhash64) - Include the full path (from cwd) in the asset key - Match include and exclude patterns against full path (from cwd) - Validate that the asset key is not over 512 bytes long
1 parent 522d1a6 commit b83b9eb

File tree

7 files changed

+210
-104
lines changed

7 files changed

+210
-104
lines changed

.changeset/quiet-steaks-smoke.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"wrangler": patch
3+
---
4+
5+
fix: align publishing sites asset keys with Wrangler 1
6+
7+
- Use the same hashing strategy for asset keys (xxhash64)
8+
- Include the full path (from cwd) in the asset key
9+
- Match include and exclude patterns against full path (from cwd)
10+
- Validate that the asset key is not over 512 bytes long

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"weakmap",
2424
"weakset",
2525
"webassemblymemory",
26-
"websockets"
26+
"websockets",
27+
"xxhash"
2728
],
2829
"cSpell.ignoreWords": ["yxxx"]
2930
}

package-lock.json

+19-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/wrangler/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
"tmp-promise": "^3.0.3",
8282
"undici": "^4.11.1",
8383
"ws": "^8.3.0",
84+
"xxhash-addon": "^1.4.0",
8485
"yargs": "^17.3.0"
8586
},
8687
"files": [

packages/wrangler/scripts/bundle.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ async function run() {
1212
platform: "node",
1313
format: "cjs",
1414
// minify: true, // TODO: enable this again
15-
external: ["fsevents", "esbuild", "miniflare", "@miniflare/core"], // todo - bundle miniflare too
15+
external: [
16+
"fsevents",
17+
"esbuild",
18+
"miniflare",
19+
"@miniflare/core",
20+
"xxhash-addon",
21+
], // todo - bundle miniflare too
1622
sourcemap: true,
1723
inject: [path.join(__dirname, "../import_meta_url.js")],
1824
define: {

0 commit comments

Comments
 (0)