question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature] disable lockfile

See original GitHub issue
  • I’d be willing to implement this feature
  • This feature can already be implemented through a plugin

Describe the user story

When developing libraries, having a lock file can prevent the detection of issues with newer packages, that ultimately will be pulled by dependents.

But maybe still locking dev-dependencies can be useful. This would be up to the developer?

Describe the solution you’d like

In a perfect world, we should be able to choose what dependencies to lock: all, dev, none.

  • all would primarily be used by applications (no dependents).
  • dev and none could be used for libraries (that have dependents).

It can be a field in .yarnrc.yml, maybe lock: (all|dev|none) ?

Berry should be able to replace already installed dependencies by a new one if available (and not locked) when doing yarn install. It can be annoying to delete the whole node_modules folder every time. Edit: or should a dev use yarn upgrade in this case? it would upgrade dev dependencies as well, which we might not want.

Describe the drawbacks of your solution

Maybe slower installs? I can live with that as long as it does what I want. Only impacts people disabling the lockfile.

Describe alternatives you’ve considered

Running yarn upgrade often. But this pollutes the commit history in some way, and might lead to merge conflicts on the lockfile. Even though old yarn was able to resolve those conflicts, it is still annoying to land in that state.

Additional context

N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
arcaniscommented, Apr 8, 2020

This isn’t something we’ll implement. More details here.

2reactions
JounQincommented, Mar 29, 2021

@arcanis

We have yarn --no-lockfile, why we can’t config it via .yarnrc? It is not constant. And for some libraries, they’d prefer always keeping latest compatible version.

See https://github.com/eslint/eslint-plugin-markdown/pull/182#discussion_r602799343

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to disable lock file? - English - Ask LibreOffice
There (as far as I know) is no way to disable the lock-files only. I think you can only disable filelocking completely. export...
Read more >
Enable or Disable .lck (lock) File Creation on Scan Destinations
Choose Scanning Lock Files from the menu on the left. Check to Enable or Uncheck to Disable the Enabled box. NOTE: Enabling this...
Read more >
Disabling package-lock.json - codeburst
The lock file is created every time a dependency is installed ( npm install lodash ) or npm install is run in npm...
Read more >
How do I remove ANSYS lock files? | CoE IT Support
ANSYS creates and checks for lock files by default. If you prefer to disable the file-lock feature, specify the ANSYS_LOCK=OFF environment variable in...
Read more >
[Solved] How to disable lock file creation - (View topic)
I also don't understand what reasons might justify to forego the important functionality based on lock files. In addition I feel sure there...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found