[pages] Update pages functions build to include config#5353
Conversation
🦋 Changeset detectedLatest commit: a2541ee The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
|
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/8421253010/npm-package-wrangler-5353You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5353/npm-package-wrangler-5353Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8421253010/npm-package-wrangler-5353 dev path/to/script.jsAdditional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8421253010/npm-package-create-cloudflare-5353 --no-auto-updatenpm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8421253010/npm-package-cloudflare-kv-asset-handler-5353npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8421253010/npm-package-miniflare-5353npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8421253010/npm-package-cloudflare-pages-shared-5353npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8421253010/npm-package-cloudflare-vitest-pool-workers-5353Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
3af8b05 to
b5deb07
Compare
6cdeaef to
4ac26c3
Compare
4ac26c3 to
bfefb7f
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5353 +/- ##
==========================================
+ Coverage 72.29% 72.45% +0.16%
==========================================
Files 318 318
Lines 16458 16505 +47
Branches 4201 4230 +29
==========================================
+ Hits 11898 11959 +61
+ Misses 4560 4546 -14
|
mrbbot
left a comment
There was a problem hiding this comment.
Looks good! ✅ Some very minor comments. 👍
| const metadata = JSON.parse(workerBundleFormData.get("metadata") as string); | ||
|
|
||
| /** | ||
| * Pages doesn't need the metadata bindings returned by | ||
| * `createWorkerBundleFormData`. Let's strip them out and return only | ||
| * the contents we need | ||
| */ | ||
| workerBundleFormData.set( | ||
| "metadata", | ||
| JSON.stringify({ main_module: metadata.main_module }) | ||
| ); | ||
| workerBundleFormData.set("metadata", JSON.stringify(metadata)); |
There was a problem hiding this comment.
I think these lines are no longer needed. They were only here because we were trying to strip out the bindings from the metadata.
There was a problem hiding this comment.
In fact perhaps this whole function is redundant now?
There was a problem hiding this comment.
I've modified this function to strip out the empty bindings key from the metadata if no config has been found
|
According to the JIRA ticket we also need to support a |
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
I've updated the JIRA ticket—for consistency with |
What this PR solves / how to test
Updates
wrangler pages functions buildto support including values fromwrangler.tomlin the Functions upload. Additionally, support two properties that will be set in CI—--build-metadata-pathand--project-directory.Fixes DEVX-1177 & DEVX-1175
Author has addressed the following