[C3] fix: use a valid compatibility date for worker templates#3343
[C3] fix: use a valid compatibility date for worker templates#3343petebacondarwin merged 3 commits intocloudflare:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 1073898 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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/5356761586/npm-package-wrangler-3343You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/3343/npm-package-wrangler-3343Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5356761586/npm-package-wrangler-3343 dev path/to/script.jsAdditional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5356761586/npm-package-cloudflare-pages-shared-3343Note that these links will no longer work once the GitHub Actions artifact expires. |
Codecov Report
@@ Coverage Diff @@
## main #3343 +/- ##
==========================================
+ Coverage 75.07% 75.10% +0.02%
==========================================
Files 183 183
Lines 11083 11083
Branches 2917 2917
==========================================
+ Hits 8321 8324 +3
+ Misses 2762 2759 -3 |
abe40db to
8e20b9d
Compare
8e20b9d to
1c359ce
Compare
rozenmd
left a comment
There was a problem hiding this comment.
Looks good to me, I'd probably wait for a review from someone more familiar with C3 though.
d064d83 to
837c359
Compare
|
OK I have rebased and I think I have addressed all the comments. |
837c359 to
4fe9298
Compare
mrbbot
left a comment
There was a problem hiding this comment.
Looks good! One minor comment, then I'll approve. 🙂
4fe9298 to
3eceed8
Compare
3eceed8 to
4082f21
Compare
Previously, we changed wrangler.toml to use the current date for the compatibility_date setting in wrangler.toml when generating workers. But this is almost always going to be new recent and results in a warning. Now we look up the most recent compatibility date via npm on the workerd package and use that instead. Fixes cloudflare#2385
4082f21 to
eab3088
Compare
Fixes #2385
What this PR solves / how to test:
Previously, we changed wrangler.toml to use the current date for the compatibility_date setting in wrangler.toml when generating workers. But this is almost always going to be new recent and results in a warning.
Now we look up the most recent compatibility date via npm on the workerd package and use that instead.
To test, build the create-cloudflare-package and then use it to build a workers project.
Check that the output displays:
And that the generated wrangler.toml contains this date:
Associated docs issue(s)/PR(s):
Author has included the following, where applicable:
Reviewer is to perform the following, as applicable: