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

package-lock.json not automatically deleted when switching NodePackageManager #3181

Open
garysassano opened this issue Dec 16, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@garysassano
Copy link
Contributor

When switching from NodePackageManager.NPM to NodePackageManager.PNPM, Projen genrates a pnpm-lock.yaml file but it doesn't delete the existing package-lock.json.

@mrgrain mrgrain added the enhancement New feature or request label Dec 18, 2023
@mrgrain
Copy link
Contributor

mrgrain commented Dec 18, 2023

Thanks @garysassano This seems like a reasonable suggestion, but difficult to implement (see below). I think there's just no real story for this kind of "migration" in projen at the moment. In the meantime please delete the file manually.

It's going to be tricky to implement, because:

  • projen doesn't create that file, it's npm. projen doesn't even know about it. It's difficult to make safe assumptions about files that projen has no information about. The lock file could have been created for any number of reasons.
  • projen currently doesn't support state transitions. What this is asking for is effectively knowing that this file used to be created due to a projen setting and now it is not anymore. However currently projen only has a view on the current state, but not the previous one. Like going from a TS to a Python project also doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants