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

Convert package-lock.json or yarn.lock to deno.lock #25815

Open
bartlomieju opened this issue Sep 23, 2024 Discussed in #25814 · 2 comments
Open

Convert package-lock.json or yarn.lock to deno.lock #25815

bartlomieju opened this issue Sep 23, 2024 Discussed in #25814 · 2 comments
Labels
node compat suggestion suggestions for new features (yet to be agreed)
Milestone

Comments

@bartlomieju
Copy link
Member

Discussed in #25814

Originally posted by alexgleason September 23, 2024
I have a node project with a lot of dependencies that I will finally move to Deno for 2.0.

But Deno creates a new deno.lock from my package.json, essentially upgrading 180 packages at once.

I have a yarn.lock. I can convert between yarn.lock and package-lock.json. Can I convert either to deno.lock?

@bartlomieju
Copy link
Member Author

This is currently not possible, but something we discussed internally and can happen after 2.0.

@bartlomieju bartlomieju added this to the 2.1.0 milestone Sep 23, 2024
@bartlomieju bartlomieju added suggestion suggestions for new features (yet to be agreed) node compat labels Sep 23, 2024
@alexgleason
Copy link
Contributor

Looks like other tools do it by having the user create the node_modules from the old packager first, and then run the tool to generate the new lockfile from the existing node_modules: https://github.com/imsnif/synp

I thought maybe deno install should just do that if there's a node_modules and no deno.lock, but I saw pnpm has a dedicated pnpm import subcommand to achieve it.

@bartlomieju bartlomieju modified the milestones: 2.1.0, 2.2.0 Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node compat suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

2 participants