Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

proper-lockfile

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proper-lockfile - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

10

index.js

@@ -160,3 +160,5 @@ 'use strict';

callback(null, remove.bind(null, file, options));
callback(null, function (unlockCallback) {
remove(file, options, unlockCallback || function () {});
});
}, compromised);

@@ -183,3 +185,3 @@ });

if (err) {
return callback && callback(err);
return callback(err);
}

@@ -198,6 +200,6 @@

if (err && err.code !== 'ENOENT') {
return callback && callback(err);
return callback(err);
}
callback && callback();
callback();
});

@@ -204,0 +206,0 @@ });

2

package.json
{
"name": "proper-lockfile",
"version": "0.1.3",
"version": "0.1.4",
"description": "A lockfile utility based on fs that works cross process and machine (network file systems)",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -328,2 +328,25 @@ 'use strict';

});
it('should release the lock after calling the provided unlock function (without callback)', function (next) {
this.timeout(5000);
lockfile.lock(tmpFile, function (err, unlock) {
expect(err).to.not.be.ok();
lockfile.lock(tmpFile, function (err) {
expect(err).to.be.an(Error);
expect(err.code).to.be('ELOCK');
unlock();
setTimeout(function () {
lockfile.lock(tmpFile, function (err) {
expect(err).to.not.be.ok();
next();
}, next);
}, 2000);
}, next);
}, next);
});
});

@@ -330,0 +353,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc