summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCasey Rodarmor <casey@rodarmor.com>2023-06-29 22:12:55 +0100
committerGitHub <noreply@github.com>2023-06-29 21:12:55 +0000
commitf04de756091028dd8fe31773e5f65e16d8f177ed (patch)
treed2a4b49be31e052f7e205f9cbe89d1b08b71f8f5
parentf44abdf024a46c217a61e54bbbab60074560d304 (diff)
Stabilize JSON dump format (#1633)
-rw-r--r--README.md3
-rw-r--r--src/subcommand.rs1
-rw-r--r--tests/json.rs10
3 files changed, 1 insertions, 13 deletions
diff --git a/README.md b/README.md
index 6030655f..a496eb6b 100644
--- a/README.md
+++ b/README.md
@@ -2313,8 +2313,7 @@ $ just --dump > formatted-justfile
```
The `--dump` command can be used with `--dump-format json` to print a JSON
-representation of a `justfile`. The JSON format is currently unstable, so the
-`--unstable` flag is required.
+representation of a `justfile`.
### Fallback to parent `justfile`s
diff --git a/src/subcommand.rs b/src/subcommand.rs
index 0a57c498..2d8c4652 100644
--- a/src/subcommand.rs
+++ b/src/subcommand.rs
@@ -329,7 +329,6 @@ impl Subcommand {
fn dump(config: &Config, ast: Ast, justfile: Justfile) -> Result<(), Error<'static>> {
match config.dump_format {
DumpFormat::Json => {
- config.require_unstable("The JSON dump format is currently unstable.")?;
serde_json::to_writer(io::stdout(), &justfile)
.map_err(|serde_json_error| Error::DumpJson { serde_json_error })?;
println!();
diff --git a/tests/json.rs b/tests/json.rs
index 599bdc01..4e4afb1b 100644
--- a/tests/json.rs
+++ b/tests/json.rs
@@ -706,16 +706,6 @@ fn quiet() {
}
#[test]
-fn requires_unstable() {
- Test::new()
- .justfile("foo:")
- .args(["--dump", "--dump-format", "json"])
- .stderr("error: The JSON dump format is currently unstable. Invoke `just` with the `--unstable` flag to enable unstable features.\n")
- .status(EXIT_FAILURE)
- .run();
-}
-
-#[test]
fn settings() {
test(
"