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.17.4 to 0.17.5

4

CHANGELOG.md

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

# v0.17.5
- Some fixes to resolving in `defiler.get`, and also allow the user-supplied resolver to return an array or a filter function
# v0.17.4

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

14

dist/index.cjs.js

@@ -316,2 +316,5 @@ 'use strict';

}
if (typeof _ !== 'function') {
_ = this.resolve(_);
}
if (typeof _ !== 'string' && typeof _ !== 'function') {

@@ -327,7 +330,6 @@ throw new TypeError('defiler.get: argument must be a string, an array, or a function');

}
const path$$1 = this.resolve(_);
if (this._status === Status.During && !this.files.has(path$$1) && current$$1) {
if (this._status === Status.During && !this.files.has(_) && current$$1) {
this._waitingFor.set(current$$1, (this._waitingFor.get(current$$1) || 0) + 1);
if (this._whenFound.has(path$$1)) {
const { promise, paths } = this._whenFound.get(path$$1);
if (this._whenFound.has(_)) {
const { promise, paths } = this._whenFound.get(_);
paths.push(current$$1);

@@ -339,7 +341,7 @@ await promise;

const promise = new Promise(res => (resolve = res));
this._whenFound.set(path$$1, { promise, resolve, paths: [current$$1] });
this._whenFound.set(_, { promise, resolve, paths: [current$$1] });
await promise;
}
}
return this.files.get(path$$1);
return this.files.get(_);
}

@@ -346,0 +348,0 @@ add(file) {

@@ -312,2 +312,5 @@ import { readdir, readFile, stat, watch } from 'fs';

}
if (typeof _ !== 'function') {
_ = this.resolve(_);
}
if (typeof _ !== 'string' && typeof _ !== 'function') {

@@ -323,7 +326,6 @@ throw new TypeError('defiler.get: argument must be a string, an array, or a function');

}
const path = this.resolve(_);
if (this._status === Status.During && !this.files.has(path) && current$$1) {
if (this._status === Status.During && !this.files.has(_) && current$$1) {
this._waitingFor.set(current$$1, (this._waitingFor.get(current$$1) || 0) + 1);
if (this._whenFound.has(path)) {
const { promise, paths } = this._whenFound.get(path);
if (this._whenFound.has(_)) {
const { promise, paths } = this._whenFound.get(_);
paths.push(current$$1);

@@ -335,7 +337,7 @@ await promise;

const promise = new Promise(res => (resolve$$1 = res));
this._whenFound.set(path, { promise, resolve: resolve$$1, paths: [current$$1] });
this._whenFound.set(_, { promise, resolve: resolve$$1, paths: [current$$1] });
await promise;
}
}
return this.files.get(path);
return this.files.get(_);
}

@@ -342,0 +344,0 @@ add(file) {

{
"name": "defiler",
"version": "0.17.4",
"version": "0.17.5",
"description": "A small, strange building block",

@@ -5,0 +5,0 @@ "keywords": [

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