Framework updates
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
23
node_modules/webpack/lib/util/AppendOnlyStackedSet.js
generated
vendored
23
node_modules/webpack/lib/util/AppendOnlyStackedSet.js
generated
vendored
@@ -43,7 +43,9 @@ class AppendOnlyStackedSet {
|
||||
|
||||
clear() {
|
||||
this._sets = [];
|
||||
if (this._current) this._current.clear();
|
||||
if (this._current) {
|
||||
this._current = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -52,6 +54,25 @@ class AppendOnlyStackedSet {
|
||||
createChild() {
|
||||
return new AppendOnlyStackedSet(this._sets.length ? [...this._sets] : []);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Iterator<T>} iterable iterator
|
||||
*/
|
||||
[Symbol.iterator]() {
|
||||
const iterators = this._sets.map((map) => map[Symbol.iterator]());
|
||||
let current = iterators.pop();
|
||||
return {
|
||||
next() {
|
||||
if (!current) return { done: true, value: undefined };
|
||||
let result = current.next();
|
||||
while (result.done && iterators.length > 0) {
|
||||
current = /** @type {SetIterator<T>} */ (iterators.pop());
|
||||
result = current.next();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AppendOnlyStackedSet;
|
||||
|
||||
Reference in New Issue
Block a user