Skip to content

fix: align publishing sites asset keys with Wrangler 1 #277

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

Merged
merged 1 commit into from
Jan 24, 2022
Merged
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
10 changes: 10 additions & 0 deletions .changeset/quiet-steaks-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"wrangler": patch
---

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
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"weakmap",
"weakset",
"webassemblymemory",
"websockets"
"websockets",
"xxhash"
],
"cSpell.ignoreWords": ["yxxx"]
}
22 changes: 19 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/wrangler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"esbuild": "0.14.1",
"miniflare": "2.2.0",
"path-to-regexp": "^6.2.0",
"semiver": "^1.1.0"
"semiver": "^1.1.0",
"xxhash-addon": "^1.4.0"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
Expand Down
8 changes: 7 additions & 1 deletion packages/wrangler/scripts/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ async function run() {
platform: "node",
format: "cjs",
// minify: true, // TODO: enable this again
external: ["fsevents", "esbuild", "miniflare", "@miniflare/core"], // todo - bundle miniflare too
external: [
"fsevents",
"esbuild",
"miniflare",
"@miniflare/core",
"xxhash-addon",
], // todo - bundle miniflare too
sourcemap: true,
inject: [path.join(__dirname, "../import_meta_url.js")],
define: {
Expand Down
Loading