deps: @npmcli/query@4.0.1 · npm/cli@3274d68 · GitHub
Skip to content

Commit 3274d68

Browse files
committed
deps: @npmcli/query@4.0.1
1 parent c263626 commit 3274d68

5 files changed

Lines changed: 48 additions & 19 deletions

File tree

node_modules/@npmcli/query/package.json

Lines changed: 2 additions & 2 deletions

node_modules/postcss-selector-parser/API.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ if (next && next.type !== 'combinator') {
254254
}
255255
```
256256

257-
### `node.replaceWith(node)`
257+
### `node.replaceWith(node[,...nodeN])`
258258

259259
Replace a node with another.
260260

@@ -267,6 +267,8 @@ attr.replaceWith(className);
267267
Arguments:
268268

269269
* `node`: The node to substitute the original with.
270+
...
271+
* `nodeN`: The node to substitute the original with.
270272

271273
### `node.remove()`
272274

@@ -531,7 +533,7 @@ Arguments:
531533

532534
* `node`: The node to add.
533535

534-
### `container.insertBefore(old, new)` & `container.insertAfter(old, new)`
536+
### `container.insertBefore(old, new[, ...newNodes])` & `container.insertAfter(old, new[, ...newNodes])`
535537

536538
Add a node before or after an existing node in a container:
537539

node_modules/postcss-selector-parser/dist/selectors/container.js

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ var Container = /*#__PURE__*/function (_Node) {
3333
_proto.prepend = function prepend(selector) {
3434
selector.parent = this;
3535
this.nodes.unshift(selector);
36+
for (var id in this.indexes) {
37+
this.indexes[id]++;
38+
}
3639
return this;
3740
};
3841
_proto.at = function at(index) {
@@ -69,29 +72,39 @@ var Container = /*#__PURE__*/function (_Node) {
6972
return this.removeAll();
7073
};
7174
_proto.insertAfter = function insertAfter(oldNode, newNode) {
75+
var _this$nodes;
7276
newNode.parent = this;
7377
var oldIndex = this.index(oldNode);
74-
this.nodes.splice(oldIndex + 1, 0, newNode);
78+
var resetNode = [];
79+
for (var i = 2; i < arguments.length; i++) {
80+
resetNode.push(arguments[i]);
81+
}
82+
(_this$nodes = this.nodes).splice.apply(_this$nodes, [oldIndex + 1, 0, newNode].concat(resetNode));
7583
newNode.parent = this;
7684
var index;
7785
for (var id in this.indexes) {
7886
index = this.indexes[id];
79-
if (oldIndex <= index) {
80-
this.indexes[id] = index + 1;
87+
if (oldIndex < index) {
88+
this.indexes[id] = index + arguments.length - 1;
8189
}
8290
}
8391
return this;
8492
};
8593
_proto.insertBefore = function insertBefore(oldNode, newNode) {
94+
var _this$nodes2;
8695
newNode.parent = this;
8796
var oldIndex = this.index(oldNode);
88-
this.nodes.splice(oldIndex, 0, newNode);
97+
var resetNode = [];
98+
for (var i = 2; i < arguments.length; i++) {
99+
resetNode.push(arguments[i]);
100+
}
101+
(_this$nodes2 = this.nodes).splice.apply(_this$nodes2, [oldIndex, 0, newNode].concat(resetNode));
89102
newNode.parent = this;
90103
var index;
91104
for (var id in this.indexes) {
92105
index = this.indexes[id];
93-
if (index <= oldIndex) {
94-
this.indexes[id] = index + 1;
106+
if (index >= oldIndex) {
107+
this.indexes[id] = index + arguments.length - 1;
95108
}
96109
}
97110
return this;
@@ -117,7 +130,7 @@ var Container = /*#__PURE__*/function (_Node) {
117130
* Return the most specific node at the line and column number given.
118131
* The source location is based on the original parsed location, locations aren't
119132
* updated as selector nodes are mutated.
120-
*
133+
*
121134
* Note that this location is relative to the location of the first character
122135
* of the selector, and not the location of the selector in the overall document
123136
* when used in conjunction with postcss.

node_modules/postcss-selector-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "postcss-selector-parser",
3-
"version": "6.1.2",
3+
"version": "7.1.0",
44
"devDependencies": {
55
"@babel/cli": "^7.11.6",
66
"@babel/core": "^7.11.6",

package-lock.json

Lines changed: 21 additions & 7 deletions

0 commit comments

Comments
 (0)