summaryrefslogtreecommitdiff
path: root/cli/args/lockfile.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-08-26 19:01:50 -0400
committerGitHub <noreply@github.com>2024-08-26 23:01:50 +0000
commite13230226fe91498b3a5f28a8de6edbe4f164944 (patch)
tree680687d66cb0725601008bed14fa7c2c8be2054c /cli/args/lockfile.rs
parentba58628601057c6f996cbad287fcfbe353872368 (diff)
feat: lockfile v4 by default (#25165)
This won't be fully stabilized until 2.0 is released.
Diffstat (limited to 'cli/args/lockfile.rs')
-rw-r--r--cli/args/lockfile.rs20
1 files changed, 3 insertions, 17 deletions
diff --git a/cli/args/lockfile.rs b/cli/args/lockfile.rs
index 00d1f929d..30db49b7a 100644
--- a/cli/args/lockfile.rs
+++ b/cli/args/lockfile.rs
@@ -225,26 +225,12 @@ impl CliLockfile {
file_path,
content: &text,
overwrite: false,
- is_deno_future: *super::DENO_FUTURE,
})?,
frozen,
)),
- Err(err) if err.kind() == std::io::ErrorKind::NotFound => {
- Ok(CliLockfile::new(
- if *super::DENO_FUTURE {
- // force version 4 for deno future
- Lockfile::new(deno_lockfile::NewLockfileOptions {
- file_path,
- content: r#"{"version":"4"}"#,
- overwrite: false,
- is_deno_future: true,
- })?
- } else {
- Lockfile::new_empty(file_path, false)
- },
- frozen,
- ))
- }
+ Err(err) if err.kind() == std::io::ErrorKind::NotFound => Ok(
+ CliLockfile::new(Lockfile::new_empty(file_path, false), frozen),
+ ),
Err(err) => Err(err).with_context(|| {
format!("Failed reading lockfile '{}'", file_path.display())
}),