Skip to content

Commit 40969cb

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 40969cb

File tree

7 files changed

+211
-107
lines changed

7 files changed

+211
-107
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-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/wrangler/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"esbuild": "0.14.1",
4040
"miniflare": "2.2.0",
4141
"path-to-regexp": "^6.2.0",
42-
"semiver": "^1.1.0"
42+
"semiver": "^1.1.0",
43+
"xxhash-addon": "^1.4.0"
4344
},
4445
"optionalDependencies": {
4546
"fsevents": "~2.3.2"

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)