Comparing version 0.14.0 to 0.14.1
@@ -0,1 +1,5 @@ | ||
# v0.14.1 | ||
- Fix a race condition that can occur when generators finish after transforms in a given wave | ||
# v0.14.0 | ||
@@ -2,0 +6,0 @@ |
@@ -218,3 +218,3 @@ 'use strict'; | ||
// prettier-ignore | ||
let { _origData, _status, _watcher, _transform, _generators, _resolver, _active, _waitingFor, _whenFound, _deps, _queue: _queue$1, _isProcessing: _isProcessing$1, _startWave, _endWave, _enqueue: _enqueue$1, _processPhysicalFile, _processFile, _processGenerator, _cur, _newProxy, _processDependents, _markFound } = symbols; | ||
let { _origData, _status, _watcher, _transform, _generators, _resolver, _active, _waitingFor, _whenFound, _deps, _queue: _queue$1, _isProcessing: _isProcessing$1, _startWave, _endWave, _enqueue: _enqueue$1, _processPhysicalFile, _processFile, _processGenerator, _checkWave, _cur, _newProxy, _processDependents, _markFound } = symbols; | ||
@@ -390,9 +390,3 @@ class Defiler extends EventEmitter { | ||
this[_active].delete(path$$1); | ||
if (!this[_active].size) { | ||
this[_endWave](); | ||
} else if (!this[_status] && [...this[_active]].every(path$$1 => this[_waitingFor].get(path$$1))) { | ||
// all pending files are currently waiting for one or more other files to exist | ||
// break deadlock: assume all files that have not appeared yet will never do so | ||
for (let path$$1 of this[_whenFound].keys()) if (!this[_active].has(path$$1)) this[_markFound](path$$1); | ||
} | ||
this[_checkWave](); | ||
} | ||
@@ -425,4 +419,16 @@ | ||
this[_active].delete(symbol); | ||
this[_checkWave](); | ||
} | ||
// check whether this wave is complete, and, if not, whether we need to break a deadlock | ||
[_checkWave]() { | ||
if (!this[_active].size) { | ||
this[_endWave](); | ||
} else if (!this[_status] && [...this[_active]].every(path$$1 => this[_waitingFor].get(path$$1))) { | ||
// all pending files are currently waiting for one or more other files to exist | ||
// break deadlock: assume all files that have not appeared yet will never do so | ||
for (let path$$1 of this[_whenFound].keys()) if (!this[_active].has(path$$1)) this[_markFound](path$$1); | ||
} | ||
} | ||
// create a defiler Proxy for the given path, always overriding _cur.parent and only overriding _cur.root if it is not yet set | ||
@@ -429,0 +435,0 @@ [_newProxy](path$$1) { |
@@ -214,3 +214,3 @@ import { readdir, readFile, stat, watch } from 'fs'; | ||
// prettier-ignore | ||
let { _origData, _status, _watcher, _transform, _generators, _resolver, _active, _waitingFor, _whenFound, _deps, _queue: _queue$1, _isProcessing: _isProcessing$1, _startWave, _endWave, _enqueue: _enqueue$1, _processPhysicalFile, _processFile, _processGenerator, _cur, _newProxy, _processDependents, _markFound } = symbols; | ||
let { _origData, _status, _watcher, _transform, _generators, _resolver, _active, _waitingFor, _whenFound, _deps, _queue: _queue$1, _isProcessing: _isProcessing$1, _startWave, _endWave, _enqueue: _enqueue$1, _processPhysicalFile, _processFile, _processGenerator, _checkWave, _cur, _newProxy, _processDependents, _markFound } = symbols; | ||
@@ -386,9 +386,3 @@ class Defiler extends EventEmitter { | ||
this[_active].delete(path); | ||
if (!this[_active].size) { | ||
this[_endWave](); | ||
} else if (!this[_status] && [...this[_active]].every(path => this[_waitingFor].get(path))) { | ||
// all pending files are currently waiting for one or more other files to exist | ||
// break deadlock: assume all files that have not appeared yet will never do so | ||
for (let path of this[_whenFound].keys()) if (!this[_active].has(path)) this[_markFound](path); | ||
} | ||
this[_checkWave](); | ||
} | ||
@@ -421,4 +415,16 @@ | ||
this[_active].delete(symbol); | ||
this[_checkWave](); | ||
} | ||
// check whether this wave is complete, and, if not, whether we need to break a deadlock | ||
[_checkWave]() { | ||
if (!this[_active].size) { | ||
this[_endWave](); | ||
} else if (!this[_status] && [...this[_active]].every(path => this[_waitingFor].get(path))) { | ||
// all pending files are currently waiting for one or more other files to exist | ||
// break deadlock: assume all files that have not appeared yet will never do so | ||
for (let path of this[_whenFound].keys()) if (!this[_active].has(path)) this[_markFound](path); | ||
} | ||
} | ||
// create a defiler Proxy for the given path, always overriding _cur.parent and only overriding _cur.root if it is not yet set | ||
@@ -425,0 +431,0 @@ [_newProxy](path) { |
{ | ||
"name": "defiler", | ||
"version": "0.14.0", | ||
"version": "0.14.1", | ||
"description": "A small, strange building block", | ||
@@ -5,0 +5,0 @@ "keywords": ["build", "framework", "async", "watch"], |
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
109809
811