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

watch-dependency-graph

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watch-dependency-graph - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

3

index.js
const { EventEmitter } = require('events')
const assert = require('assert')
const chokidar = require('chokidar')

@@ -91,4 +90,2 @@ const matched = require('matched')

assert(entries.length, 'No entries found')
for (const { id, children } of entries) {

@@ -95,0 +92,0 @@ ids.push(id)

4

package.json
{
"name": "watch-dependency-graph",
"version": "1.0.0",
"version": "1.1.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "DEBUG=wdg node -r esm test",
"test": "node -r esm test",
"test:watch": "npm run fixtures && nodemon -r esm test -i ./fixtures",

@@ -9,0 +9,0 @@ "format": "prettier-standard --format",

@@ -262,2 +262,21 @@ process.chdir(__dirname)

test('watches for non-existing files', async () => {
const instance = require('./')(path.join(fixturesRoot, '*.ghost.js'))
const added = subscribe('add', instance)
await wait(500)
const ghostFile = path.join(fixturesRoot, 'a.ghost.js')
fs.outputFileSync(ghostFile, 'module.exports = {}')
const ids = await added
assert(ids.includes(ghostFile))
assert(instance.ids.includes(ghostFile))
await instance.close()
})
!(async function () {

@@ -264,0 +283,0 @@ console.time('test')

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