1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

fix(check): support --frozen on deno check (#26479)

Fixes https://github.com/denoland/deno/issues/26391
This commit is contained in:
Nathan Whitaker 2024-10-22 14:15:00 -07:00 committed by GitHub
parent 28b5640657
commit 5e020ebc35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View file

@ -1856,6 +1856,7 @@ Unless --reload is specified, this command will not re-download already cached d
.required_unless_present("help") .required_unless_present("help")
.value_hint(ValueHint::FilePath), .value_hint(ValueHint::FilePath),
) )
.arg(frozen_lockfile_arg())
.arg(allow_import_arg()) .arg(allow_import_arg())
} }
) )
@ -4373,6 +4374,7 @@ fn check_parse(
flags.type_check_mode = TypeCheckMode::Local; flags.type_check_mode = TypeCheckMode::Local;
compile_args_without_check_parse(flags, matches)?; compile_args_without_check_parse(flags, matches)?;
unstable_args_parse(flags, matches, UnstableArgsConfig::ResolutionAndRuntime); unstable_args_parse(flags, matches, UnstableArgsConfig::ResolutionAndRuntime);
frozen_lockfile_arg_parse(flags, matches);
let files = matches.remove_many::<String>("file").unwrap().collect(); let files = matches.remove_many::<String>("file").unwrap().collect();
if matches.get_flag("all") || matches.get_flag("remote") { if matches.get_flag("all") || matches.get_flag("remote") {
flags.type_check_mode = TypeCheckMode::All; flags.type_check_mode = TypeCheckMode::All;

View file

@ -183,6 +183,19 @@
"exitCode": 1 "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"
}
]
} }
} }
} }