feat: refactoring project
This commit is contained in:
17
node_modules/@babel/traverse/lib/path/modification.js
generated
vendored
17
node_modules/@babel/traverse/lib/path/modification.js
generated
vendored
@@ -7,7 +7,6 @@ exports._containerInsert = _containerInsert;
|
||||
exports._containerInsertAfter = _containerInsertAfter;
|
||||
exports._containerInsertBefore = _containerInsertBefore;
|
||||
exports._verifyNodeList = _verifyNodeList;
|
||||
exports.hoist = hoist;
|
||||
exports.insertAfter = insertAfter;
|
||||
exports.insertBefore = insertBefore;
|
||||
exports.pushContainer = pushContainer;
|
||||
@@ -60,7 +59,7 @@ function insertBefore(nodes_) {
|
||||
}
|
||||
}
|
||||
function _containerInsert(from, nodes) {
|
||||
this.updateSiblingKeys(from, nodes.length);
|
||||
updateSiblingKeys.call(this, from, nodes.length);
|
||||
const paths = [];
|
||||
this.container.splice(from, 0, ...nodes);
|
||||
for (let i = 0; i < nodes.length; i++) {
|
||||
@@ -69,12 +68,12 @@ function _containerInsert(from, nodes) {
|
||||
const path = this.getSibling(to);
|
||||
paths.push(path);
|
||||
if ((_this$context = this.context) != null && _this$context.queue) {
|
||||
path.pushContext(this.context);
|
||||
_context.pushContext.call(path, this.context);
|
||||
}
|
||||
}
|
||||
const contexts = _context._getQueueContexts.call(this);
|
||||
for (const path of paths) {
|
||||
path.setScope();
|
||||
_context.setScope.call(path);
|
||||
path.debug("Inserted.");
|
||||
for (const context of contexts) {
|
||||
context.maybeQueue(path, true);
|
||||
@@ -164,7 +163,7 @@ function updateSiblingKeys(fromIndex, incrementBy) {
|
||||
if (!this.parent) return;
|
||||
const paths = (0, _cache.getCachedPaths)(this.hub, this.parent) || [];
|
||||
for (const [, path] of paths) {
|
||||
if (typeof path.key === "number" && path.key >= fromIndex) {
|
||||
if (typeof path.key === "number" && path.container === this.container && path.key >= fromIndex) {
|
||||
path.key += incrementBy;
|
||||
}
|
||||
}
|
||||
@@ -220,9 +219,11 @@ function pushContainer(listKey, nodes) {
|
||||
}).setContext(this.context);
|
||||
return path.replaceWithMultiple(verifiedNodes);
|
||||
}
|
||||
function hoist(scope = this.scope) {
|
||||
const hoister = new _hoister.default(this, scope);
|
||||
return hoister.run();
|
||||
{
|
||||
exports.hoist = function hoist(scope = this.scope) {
|
||||
const hoister = new _hoister.default(this, scope);
|
||||
return hoister.run();
|
||||
};
|
||||
}
|
||||
|
||||
//# sourceMappingURL=modification.js.map
|
||||
|
||||
Reference in New Issue
Block a user