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

eslint_d

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint_d - npm Package Compare versions

Comparing version 14.2.0 to 14.2.1

2

lib/daemon.js

@@ -89,3 +89,3 @@ import fs from 'node:fs';

function setProcessTitle(title) {
log('Setting process title to "%s"', process.title);
log('Setting process title to "%s"', title);
process.title = title;

@@ -92,0 +92,0 @@ }

@@ -135,2 +135,3 @@ import fs from 'node:fs';

return new Promise((resolve, reject) => {
let timeout = null;
const watcher = fs

@@ -140,2 +141,3 @@ .watch(base)

if (type === 'rename' && filename === '.eslint_d') {
clearTimeout(timeout);
watcher.close();

@@ -145,4 +147,12 @@ resolve();

})
.on('error', reject);
.on('error', (err) => {
clearTimeout(timeout);
reject(err);
});
timeout = setTimeout(() => {
watcher.close();
timeout = null;
reject(new Error('Timed out waiting for config'));
}, 2000);
});
}

@@ -19,2 +19,3 @@ import fs from 'node:fs';

let watcher;
let clock;

@@ -26,2 +27,3 @@ beforeEach(() => {

sinon.replace(console, 'error', sinon.fake());
clock = sinon.useFakeTimers({ toFake: ['setTimeout'] });
});

@@ -236,2 +238,15 @@

});
it('resolves with null and logs timeout error', async () => {
const promise = launchDaemon(resolver, 'hash', false);
clock.tick(2000);
await assert.resolves(promise, null);
assert.calledOnceWith(
console.error,
'eslint_d: Failed to start daemon – Error: Timed out waiting for config'
);
assert.equals(process.exitCode, 1);
});
});

@@ -267,3 +282,3 @@

await new Promise((resolve) => setTimeout(resolve));
await new Promise(setImmediate);

@@ -270,0 +285,0 @@ assert.calledOnceWith(fs.watch, resolver.base);

@@ -20,3 +20,3 @@ import { createRequire } from 'node:module';

const eslint = resolver.require(`${resolver.base}/lib/cli.js`);
const require = createRequire(resolver.base);
const require = createRequire(`${resolver.base}/`);
const chalk = require('chalk');

@@ -23,0 +23,0 @@ const debug = require('debug');

{
"name": "eslint_d",
"version": "14.2.0",
"version": "14.2.1",
"description": "Speed up eslint to accelerate your development workflow",

@@ -5,0 +5,0 @@ "type": "module",

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