Skip to content

Conversation

nathanwhit
Copy link
Member

Closes #28916

@nathanwhit nathanwhit requested review from dsherret and Copilot April 17, 2025 18:44
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the default lockfile version from v4 to v5, thereby replacing the previous version identifier in test assertions and related integrations. Key changes include:

  • Updating all tests in the integration suite that compare against lockfile version “4” to now expect version “5” and, in some cases, validating additional fields such as “tarball” URLs.
  • Removing the unstable “lockfile_v5” flag from the CLI and related modules and instead defaulting to using lockfile v5.
  • Making corresponding adjustments in npm snapshot resolution and configuration parsing to align with the new lockfile v5 format.

Reviewed Changes

Copilot reviewed 53 out of 60 changed files in this pull request and generated no comments.

File Description
tests/integration/* Updated expected lockfile JSON in tests from version “4” to “5” and added tarball fields.
cli/args/lockfile.rs Removed the dynamic “use_lockfile_v5” flag and now hard-coded lockfile version support.
cli/args/* and cli/lib/args.rs Removed references to unstable_lockfile_v5 and adjusted CLI argument handling accordingly.
cli/npm/managed.rs Adapted snapshot resolution to use lockfile v5 exclusively.
Files not reviewed (7)
  • tests/specs/add/update_lockfile_if_package_json/lockfile_add.out: Language not supported
  • tests/specs/add/update_lockfile_if_package_json/lockfile_remove.out: Language not supported
  • tests/specs/cache/package_json/deno.lock.out: Language not supported
  • tests/specs/future_install_node_modules/test.jsonc: Language not supported
  • tests/specs/future_install_node_modules/deno.lock.out: Language not supported
  • tests/specs/install/future_install_local_deno/deno.lock.out: Language not supported
  • tests/specs/install/future_install_node_modules/deno.lock.out: Language not supported
Comments suppressed due to low confidence (3)

tests/integration/run_tests.rs:489

  • Ensure that tests verifying the lockfile content are updated to also check for any additional fields (e.g. tarball URLs) introduced with lockfile v5.
"version": "5",

cli/args/lockfile.rs:305

  • Verify that setting 'next_version' to true unconditionally aligns with the intended v5 behavior and that no edge cases are missed during lockfile validation.
next_version: true,

cli/args/mod.rs:1089

  • [nitpick] Since references to unstable_lockfile_v5 have been removed, ensure that every part of the codebase now consistently uses the default lockfile v5 behavior and that any legacy code paths are fully deprecated.
pub fn unstable_lockfile_v5(&self) -> bool { ... }

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nathanwhit nathanwhit merged commit f411ccd into denoland:main Apr 17, 2025
18 checks passed
@nathanwhit nathanwhit deleted the lockfile-v5-default branch April 17, 2025 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make lockfile v5 the default
2 participants