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

defiler

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

defiler - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# v0.4.1
- Re-process files when a dependency is deleted
# v0.4.0

@@ -2,0 +6,0 @@

35

dist/index.cjs.js

@@ -80,3 +80,3 @@ 'use strict';

this._customGenerators = new Map();
this._dependencies = new Map();
this.dependents = new Map();

@@ -192,14 +192,4 @@ this._processing = false;

this.on('file', origPath => {
let origins = new Set();
for (let [origin, deps] of this._dependencies.entries()) {
if (deps.has(origPath)) {
origins.add(origin);
this._dependencies.delete(origin);
}
}
for (let originPath of origins) {
this.refile(originPath);
}
});
this.on('file', origPath => this._processDependents(origPath));
this.on('deleted', origPath => this._processDependents(origPath));

@@ -222,6 +212,6 @@ this._filePromises = null;

if (from) {
if (this._dependencies.has(from)) {
this._dependencies.get(from).add(path$$1);
if (this.dependents.has(from)) {
this.dependents.get(from).add(path$$1);
} else {
this._dependencies.set(from, new Set([path$$1]));
this.dependents.set(from, new Set([path$$1]));
}

@@ -359,2 +349,15 @@ }

_processDependents(origPath) {
let origins = new Set();
for (let [origin, deps] of this.dependents.entries()) {
if (deps.has(origPath)) {
origins.add(origin);
this.dependents.delete(origin);
}
}
for (let originPath of origins) {
this.refile(originPath);
}
}
static _relativePath(rootPath, absolutePath) {

@@ -361,0 +364,0 @@ return path.relative(rootPath, absolutePath).replace(/\\/g, '/')

@@ -76,3 +76,3 @@ import EventEmitter from 'events';

this._customGenerators = new Map();
this._dependencies = new Map();
this.dependents = new Map();

@@ -188,14 +188,4 @@ this._processing = false;

this.on('file', origPath => {
let origins = new Set();
for (let [origin, deps] of this._dependencies.entries()) {
if (deps.has(origPath)) {
origins.add(origin);
this._dependencies.delete(origin);
}
}
for (let originPath of origins) {
this.refile(originPath);
}
});
this.on('file', origPath => this._processDependents(origPath));
this.on('deleted', origPath => this._processDependents(origPath));

@@ -218,6 +208,6 @@ this._filePromises = null;

if (from) {
if (this._dependencies.has(from)) {
this._dependencies.get(from).add(path$$1);
if (this.dependents.has(from)) {
this.dependents.get(from).add(path$$1);
} else {
this._dependencies.set(from, new Set([path$$1]));
this.dependents.set(from, new Set([path$$1]));
}

@@ -355,2 +345,15 @@ }

_processDependents(origPath) {
let origins = new Set();
for (let [origin, deps] of this.dependents.entries()) {
if (deps.has(origPath)) {
origins.add(origin);
this.dependents.delete(origin);
}
}
for (let originPath of origins) {
this.refile(originPath);
}
}
static _relativePath(rootPath, absolutePath) {

@@ -357,0 +360,0 @@ return relative(rootPath, absolutePath).replace(/\\/g, '/')

{
"name": "defiler",
"version": "0.4.0",
"version": "0.4.1",
"description": "A small, strange building block",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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