Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for generation package-lock.json #309

Merged
merged 3 commits into from
Dec 17, 2024

Conversation

Moraxyc
Copy link
Contributor

@Moraxyc Moraxyc commented Dec 16, 2024

  • feat: add support for generating package-lock.json
  • refactor: unify lockfile generation functions

Combine cargo and npm lockfile generation into a single function generate_lockfile use parameters to handle different types and configurations reduce code duplication and improve maintainability.

- combine cargo and npm lockfile generation into a single function
- use parameters to handle different types and configurations
- reduce code duplication and improve maintainability
@Moraxyc
Copy link
Contributor Author

Moraxyc commented Dec 16, 2024

We should also consider the possibility that the package uses npm_deps_hash, cargo_lock, and --generate-lockfile together. IMO, there are two ways to address this:

Separate Flags: Introduce additional flags, such as --generate-npm-lockfile. To maintain backward compatibility, it’s best to retain the existing --generate-lockfile flag. However, the downside is that if nix-update supports more lockfile types in the future, managing multiple flags could become messy.

Parameterized --generate-lockfile: Allow --generate-lockfile to accept parameters. By default, if no parameter is provided, it generates cargoLock. If parameters are specified, they can be listed as a comma-separated string (e.g., "cargo,npm") to indicate which lockfiles to generate.

@Mic92
Copy link
Owner

Mic92 commented Dec 17, 2024

@mergify queue

Copy link
Contributor

mergify bot commented Dec 17, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 3c67069

@mergify mergify bot merged commit 3c67069 into Mic92:main Dec 17, 2024
5 checks passed
@Moraxyc Moraxyc deleted the add-npm-lockfile branch December 18, 2024 02:28
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.

2 participants