Skip to content

Commit

Permalink
refactor: simplify and document config.ts (#238)
Browse files Browse the repository at this point in the history
This PR cleans up the type definition for the configuration object, as well as commenting the hell out of it. There are no duplicate definitions, and I annotated what I could.

- `@optional` means providing a value isn't mandatory
- `@deprecated` means the field itself isn't necessary _anymore_ in `wrangler.toml`
- `@breaking` means the deprecation/optionality is a breaking change from wrangler 1
- `@todo` means there's more work to be done (with details attached)
- `@inherited` means the field is copied to all environments

I also added a stub for the validation function that will be applied to config objects. In the next PR, I will flesh that function out.
  • Loading branch information
threepointone authored Jan 14, 2022
1 parent f8a97de commit 65f9904
Show file tree
Hide file tree
Showing 2 changed files with 488 additions and 119 deletions.
13 changes: 13 additions & 0 deletions .changeset/good-rats-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"wrangler": patch
---

refactor: simplify and document `config.ts`

This PR cleans up the type definition for the configuration object, as well as commenting the hell out of it. There are no duplicate definitions, and I annotated what I could.

- `@optional` means providing a value isn't mandatory
- `@deprecated` means the field itself isn't necessary anymore in wrangler.toml
- `@breaking` means the deprecation/optionality is a breaking change from wrangler 1
- `@todo` means there's more work to be done (with details attached)
- `@inherited` means the field is copied to all environments
Loading

0 comments on commit 65f9904

Please sign in to comment.