Comparing version 0.17.4 to 0.17.5
@@ -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 @@ |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
125514
989
0