-
Notifications
You must be signed in to change notification settings - Fork 734
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
--compatibility-date
, --compatibility-flags
, --latest
cli a…
…rguments to `dev` and `publish` (#215) * Add `--compatibility-date`, `--compatibility-flags`, `--latest` cli arguments to `dev` and `publish` Closes #193. This PR adds cli fields for 2 existing configuration fields: `--compatibility-date`, `--compatibility-flags` matching `compatibility_date` and `compatibility_flags` respectively. It also adds a cli arg `--latest` which is shorthand for `--compatibility_date <today>`. It follows the rules from the linked issue - - A cli arg for adding a compatibility data, e.g `--compatibility_date 2022-01-05` - A shorthand `--latest` that sets `compatibility_date` to today's date. Usage of this flag logs a warning. - `latest` is NOT a config field in `wrangler.toml`. - In `dev`, when a compatibility date is not available in either `wrangler.toml` or as a cli arg, then we default to `--latest`, and log a warning. - In `publish` we error if a compatibility date is not available in either `wrangler.toml` or as a cli arg. Usage of `--latest` logs a warning. - We also accept compatibility flags via the cli, e.g: `--compatibility-flags formdata_parser_supports_files` I haven't added validation for the actual values of these args, I'll get to that next week when I work on the config validation work. The wording of the messages/errors are also up for discussion. I'm happy to keep this PR alive until we get it right. * remove the warning when using `--latest` for `wrangler dev`. * update changeset with the change to not log a warning during dev + latest.
- Loading branch information
1 parent
8ff5537
commit 41d4c3e
Showing
3 changed files
with
69 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
"wrangler": patch | ||
--- | ||
|
||
Add `--compatibility-date`, `--compatibility-flags`, `--latest` cli arguments to `dev` and `publish`. | ||
|
||
- A cli arg for adding a compatibility data, e.g `--compatibility_date 2022-01-05` | ||
- A shorthand `--latest` that sets `compatibility_date` to today's date. Usage of this flag logs a warning. | ||
- `latest` is NOT a config field in `wrangler.toml`. | ||
- In `dev`, when a compatibility date is not available in either `wrangler.toml` or as a cli arg, then we default to `--latest`. | ||
- In `publish` we error if a compatibility date is not available in either `wrangler.toml` or as a cli arg. Usage of `--latest` logs a warning. | ||
- We also accept compatibility flags via the cli, e.g: `--compatibility-flags formdata_parser_supports_files` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters