Skip to content

Commit

Permalink
refactor: simplify and document config.ts
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 committed Jan 14, 2022
1 parent 18f8f65 commit b06ed5b
Show file tree
Hide file tree
Showing 2 changed files with 487 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 b06ed5b

Please sign in to comment.