-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[pages] Update pages functions build to include config
#5353
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! ✅ Some very minor comments. 👍
packages/wrangler/src/api/pages/create-worker-bundle-contents.ts
Outdated
Show resolved
Hide resolved
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact perhaps this whole function is redundant now?
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.
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 |
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