-
Notifications
You must be signed in to change notification settings - Fork 763
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
Support wrangler.json
#2409
Support wrangler.json
#2409
Conversation
🦋 Changeset detectedLatest commit: e06c4db 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/runs/3990523105/npm-package-wrangler-2409 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/prs/2409/npm-package-wrangler-2409 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/runs/3990523105/npm-package-wrangler-2409 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/runs/3990523105/npm-package-cloudflare-pages-shared-2409 |
Codecov Report
@@ Coverage Diff @@
## main #2409 +/- ##
==========================================
- Coverage 73.32% 73.23% -0.10%
==========================================
Files 159 159
Lines 9800 9847 +47
Branches 2583 2622 +39
==========================================
+ Hits 7186 7211 +25
- Misses 2614 2636 +22
|
I'm excited. |
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'm not seeing any significant issues, is there anything else we are waiting on before this can go in?
Edit: Please add a changeset 😄
@JacobMGEvans it's waiting on docs and a command line flag to enable, which I need to implement (and a changeset). Will get to those soon! |
e1f6aa1
to
9140713
Compare
@penalosa are there docs on this yet? |
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.
Thought we were gonna use JSON5?
Edit: I probably am just remembering things wrong, been awhile since the discussion lol
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.
Nothing else is blocking or outstanding on my end. Looks awesome!!
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.
Nice! 🎉 Added some comments... 🙂 I also think JSON config should probably have camelCase keys, but given this is experimental I guess we could change that later? Would probably be a bit of a pain though.
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.
For the Types refactoring commit d84dfcf: How much of this is in regard to the JSON configuration support and how much could be its own separate refactoring effort?
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.
It is looking great, really looking forward to JSON support myself. A few questions, and concerns.
Some of it is separate, but a lot of it is related to the improved typing of the |
Thank you for connecting the type changes to the JSON changes, that definitely makes sense with the additional context. The type change look amazing too! |
I can't seem to reply to this inline 😅 |
related discussion: cloudflare/cloudflare-docs#7278 (review) and cloudflare/cloudflare-docs#7278 (comment) |
@JacobMGEvans is there anything else outstanding in this PR that you're concerned about? |
Nope, as I mentioned in the meeting I'm super onboard with getting this in. I appreciate you covering all my questions, concerns, and comments 😁 |
T extends (yargs: Argv<CommonYargsOptions>) => Argv | ||
> = T extends (yargs: Argv<CommonYargsOptions>) => Argv<infer P> | ||
? ArgumentsCamelCase<P> | ||
export type StrictYargsOptionsToInterface< |
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.
Niiiiiice. ❤️
ae414d1
to
9df2e21
Compare
9df2e21
to
190102f
Compare
@penalosa is there a docs PR to link in the description for this PR? |
What this PR solves / how to test:
This PR adds
wrangler.json
(which is JSONC) support! It doesn't add support for converting TOML to JSON, or change the formatinit
generates. To test, create a normal worker, and convert the generatedwrangler.toml
file towrangler.json
(ether by hand, or by using something liketoml2json
). All the property names are the same between TOML and JSONC.Associated docs issues/PR: #7166
Author has included the following, where applicable:
Reviewer has performed the following, where applicable:
Fixes #2376.