nativescript-cli icon indicating copy to clipboard operation
nativescript-cli copied to clipboard

ns clean - should remove yarn.lock if the package manager for the project is yarn

Open shiv19 opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe.

When you run ns clean on a project that uses yarn as the package manager, the CLI still tries to remove a package-lock.json instead of yarn.lock

Describe the solution you'd like

If the package manager of the project is yarn, then ns clean should attempt to remove yarn.lock if it exists.

Describe alternatives you've considered

As an alternative, the developer could be prompted if they wish to remove yarn.lock or package-lock.json.

Anything else?

No response

Please accept these terms

shiv19 avatar Apr 12 '23 22:04 shiv19

For 8.6 we're likely going to remove the lockfiles from the default clean paths, and let users opt-in via their own configs... Which you can already do:

cli: {
  additionalPathsToClean: ['yarn.lock']
}

/cc @edusperoni

rigor789 avatar Apr 13 '23 10:04 rigor789