-
Notifications
You must be signed in to change notification settings - Fork 709
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
fix: try to serve assets from unencoded and encoded paths #6728
Conversation
🦋 Changeset detectedLatest commit: ec08675 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
18fecaf
to
f0266c3
Compare
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10961105486/npm-package-wrangler-6728 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/6728/npm-package-wrangler-6728 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10961105486/npm-package-wrangler-6728 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10961105486/npm-package-create-cloudflare-6728 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10961105486/npm-package-cloudflare-kv-asset-handler-6728 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10961105486/npm-package-miniflare-6728 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10961105486/npm-package-cloudflare-pages-shared-6728 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10961105486/npm-package-cloudflare-vitest-pool-workers-6728 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10961105486/npm-package-cloudflare-workers-editor-shared-6728 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/10961105486/npm-package-cloudflare-workers-shared-6728 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
f0266c3
to
7781371
Compare
b31019a
to
6416648
Compare
Co-authored-by: Greg Brimble <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to be careful to release these changes to Wrangler and workers-shared/asset-worker at the same time since we are changing the contract between them for these corner cases?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pending on Pete's comments and changeset
6416648
to
86a255f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just that one question about normalizeFilePath
!
), | ||
hashPath(normalizeFilePath(relativeFilepath)), | ||
// used absolute filepath here so that changes to the enclosing asset folder will be registered | ||
hashPath(filepath + filestat.mtimeMs.toString()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note what goes into contentHash doesn't actually matter, as long as it is uniquely associated with that filepath and updates with file changes. Just removed the filepath encoding because it was unnecessary and because normalizeFilePath() expects a relative filepath now.
ef87321
to
ec08675
Compare
What this PR solves / how to test
Fixes WC-2693
Author has addressed the following