v1.0 with SW PWA enabled

This commit is contained in:
Blomios
2026-01-01 17:40:53 +01:00
parent 1c0e22aac1
commit 3c8bebb2ad
29775 changed files with 2197201 additions and 119080 deletions

View File

@ -52,8 +52,8 @@ function insertBefore(nodes_) {
} else if (this.isStatementOrBlock()) {
const node = this.node;
const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node] : []));
return this.unshiftContainer("body", nodes);
const [blockPath] = this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node] : []));
return blockPath.unshiftContainer("body", nodes);
} else {
throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
}
@ -153,8 +153,8 @@ function insertAfter(nodes_) {
} else if (this.isStatementOrBlock()) {
const node = this.node;
const shouldInsertCurrentNode = node && (!this.isExpressionStatement() || node.expression != null);
this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node] : []));
return this.pushContainer("body", nodes);
const [blockPath] = this.replaceWith(blockStatement(shouldInsertCurrentNode ? [node] : []));
return blockPath.pushContainer("body", nodes);
} else {
throw new Error("We don't know what to do with this node type. " + "We were previously a Statement but we can't fit in here?");
}
@ -197,15 +197,16 @@ function _verifyNodeList(nodes) {
}
function unshiftContainer(listKey, nodes) {
_removal._assertUnremoved.call(this);
nodes = _verifyNodeList.call(this, nodes);
const verifiedNodes = _verifyNodeList.call(this, nodes);
const container = this.node[listKey];
const path = _index.default.get({
parentPath: this,
parent: this.node,
container: this.node[listKey],
container,
listKey,
key: 0
}).setContext(this.context);
return _containerInsertBefore.call(path, nodes);
return _containerInsertBefore.call(path, verifiedNodes);
}
function pushContainer(listKey, nodes) {
_removal._assertUnremoved.call(this);
@ -214,7 +215,7 @@ function pushContainer(listKey, nodes) {
const path = _index.default.get({
parentPath: this,
parent: this.node,
container: container,
container,
listKey,
key: container.length
}).setContext(this.context);