Skip to content

Commit

Permalink
fix(check): support --frozen on deno check (#26479)
Browse files Browse the repository at this point in the history
Fixes #26391
  • Loading branch information
nathanwhit authored and bartlomieju committed Oct 25, 2024
1 parent 22b0614 commit 4a4b83a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/args/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1856,6 +1856,7 @@ Unless --reload is specified, this command will not re-download already cached d
.required_unless_present("help")
.value_hint(ValueHint::FilePath),
)
.arg(frozen_lockfile_arg())
.arg(allow_import_arg())
}
)
Expand Down Expand Up @@ -4373,6 +4374,7 @@ fn check_parse(
flags.type_check_mode = TypeCheckMode::Local;
compile_args_without_check_parse(flags, matches)?;
unstable_args_parse(flags, matches, UnstableArgsConfig::ResolutionAndRuntime);
frozen_lockfile_arg_parse(flags, matches);
let files = matches.remove_many::<String>("file").unwrap().collect();
if matches.get_flag("all") || matches.get_flag("remote") {
flags.type_check_mode = TypeCheckMode::All;
Expand Down
13 changes: 13 additions & 0 deletions tests/specs/lockfile/frozen_lockfile/__test__.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,19 @@
"exitCode": 1
}
]
},
"check_subcommand": {
"steps": [
{
"args": "check --frozen=true add.ts",
"output": "[WILDCARD]The lockfile is out of date[WILDCARD]",
"exitCode": 1
},
{
"args": "check --frozen=false add.ts",
"output": "[WILDCARD]Check [WILDCARD]add.ts\n"
}
]
}
}
}

0 comments on commit 4a4b83a

Please sign in to comment.