-
Notifications
You must be signed in to change notification settings - Fork 774
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
[C3] fix: use a valid compatibility date for worker templates #3343
[C3] fix: use a valid compatibility date for worker templates #3343
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-3343 You 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-3343 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5356761586/npm-package-wrangler-3343 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5356761586/npm-package-cloudflare-pages-shared-3343 Note 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
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 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
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! 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
* [C3] fix: use a valid compatibility date for worker templates 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 #2385 * Improve workerd date matching and support non-npm runners. * fixup! [C3] fix: use a valid compatibility date for worker templates
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: