moxystudio / node-proper-lockfile

An inter-process and inter-machine lockfile utility that works on a local or network file system.
MIT License
239 stars 38 forks source link

feat: cache precision per device #104

Open julien-f opened 3 years ago

julien-f commented 3 years ago

See #103

Quick and untested implementation.

satazor commented 3 years ago

It looks good so far however one test is failing, can you check it out?

We are missing tests as well before merging.

julien-f commented 3 years ago

@satazor AFAU, the problem comes from the test expecting a specific number of calls to stat: https://github.com/moxystudio/node-proper-lockfile/blob/9f8c303c91998e8404a911dc11c54029812bca69/test/lock.test.js#L193

But the new algorithm, introduce an extra to get the device.

satazor commented 3 years ago

Yes we need to update existing tests and generate new ones to test the new code (different devices).