"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "packages/babel-traverse/src/context.js" between
babel-7.12.6.tar.gz and babel-7.12.7.tar.gz

About: Babel is a JavaScript compiler that is mainly used to convert ECMAScript 2015+ code into a backwards compatible version of JavaScript. Hint: There exists a high-performance language interoperability tool also named "Babel".

context.js  (babel-7.12.6):context.js  (babel-7.12.7)
skipping to change at line 98 skipping to change at line 98
} else { } else {
return false; return false;
} }
} }
visitQueue(queue: Array<NodePath>) { visitQueue(queue: Array<NodePath>) {
// set queue // set queue
this.queue = queue; this.queue = queue;
this.priorityQueue = []; this.priorityQueue = [];
const visited = []; const visited = new WeakSet();
let stop = false; let stop = false;
// visit the queue // visit the queue
for (const path of queue) { for (const path of queue) {
path.resync(); path.resync();
if ( if (
path.contexts.length === 0 || path.contexts.length === 0 ||
path.contexts[path.contexts.length - 1] !== this path.contexts[path.contexts.length - 1] !== this
) { ) {
skipping to change at line 123 skipping to change at line 123
} }
// this path no longer belongs to the tree // this path no longer belongs to the tree
if (path.key === null) continue; if (path.key === null) continue;
if (testing && queue.length >= 10_000) { if (testing && queue.length >= 10_000) {
this.trap = true; this.trap = true;
} }
// ensure we don't visit the same node twice // ensure we don't visit the same node twice
if (visited.indexOf(path.node) >= 0) continue; const { node } = path;
visited.push(path.node); if (visited.has(node)) continue;
if (node) visited.add(node);
if (path.visit()) { if (path.visit()) {
stop = true; stop = true;
break; break;
} }
if (this.priorityQueue.length) { if (this.priorityQueue.length) {
stop = this.visitQueue(this.priorityQueue); stop = this.visitQueue(this.priorityQueue);
this.priorityQueue = []; this.priorityQueue = [];
this.queue = queue; this.queue = queue;
 End of changes. 2 change blocks. 
3 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)