Skip to content

Commit 3274d68

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

File tree

5 files changed

+48
-19
lines changed

5 files changed

+48
-19
lines changed

node_modules/@npmcli/query/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@npmcli/query",
3-
"version": "4.0.0",
3+
"version": "4.0.1",
44
"description": "npm query parser and tools",
55
"main": "lib/index.js",
66
"scripts": {
@@ -49,7 +49,7 @@
4949
"tap": "^16.2.0"
5050
},
5151
"dependencies": {
52-
"postcss-selector-parser": "^6.1.2"
52+
"postcss-selector-parser": "^7.0.0"
5353
},
5454
"repository": {
5555
"type": "git",

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
Original file line numberDiff line numberDiff line change
@@ -3704,12 +3704,12 @@
37043704
}
37053705
},
37063706
"node_modules/@npmcli/query": {
3707-
"version": "4.0.0",
3708-
"resolved": "https://registry.npmjs.org/@npmcli/query/-/query-4.0.0.tgz",
3709-
"integrity": "sha512-3pPbese0fbCiFJ/7/X1GBgxAKYFE8sxBddA7GtuRmOgNseH4YbGsXJ807Ig3AEwNITjDUISHglvy89cyDJnAwA==",
3707+
"version": "4.0.1",
3708+
"resolved": "https://registry.npmjs.org/@npmcli/query/-/query-4.0.1.tgz",
3709+
"integrity": "sha512-4OIPFb4weUUwkDXJf4Hh1inAn8neBGq3xsH4ZsAaN6FK3ldrFkH7jSpCc7N9xesi0Sp+EBXJ9eGMDrEww2Ztqw==",
37103710
"license": "ISC",
37113711
"dependencies": {
3712-
"postcss-selector-parser": "^6.1.2"
3712+
"postcss-selector-parser": "^7.0.0"
37133713
},
37143714
"engines": {
37153715
"node": "^18.17.0 || >=20.5.0"
@@ -4512,6 +4512,20 @@
45124512
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
45134513
}
45144514
},
4515+
"node_modules/@npmcli/template-oss/node_modules/postcss-selector-parser": {
4516+
"version": "6.1.2",
4517+
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz",
4518+
"integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==",
4519+
"dev": true,
4520+
"license": "MIT",
4521+
"dependencies": {
4522+
"cssesc": "^3.0.0",
4523+
"util-deprecate": "^1.0.2"
4524+
},
4525+
"engines": {
4526+
"node": ">=4"
4527+
}
4528+
},
45154529
"node_modules/@npmcli/template-oss/node_modules/proc-log": {
45164530
"version": "4.2.0",
45174531
"resolved": "https://registry.npmjs.org/proc-log/-/proc-log-4.2.0.tgz",
@@ -13369,9 +13383,9 @@
1336913383
}
1337013384
},
1337113385
"node_modules/postcss-selector-parser": {
13372-
"version": "6.1.2",
13373-
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz",
13374-
"integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==",
13386+
"version": "7.1.0",
13387+
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.0.tgz",
13388+
"integrity": "sha512-8sLjZwK0R+JlxlYcTuVnyT2v+htpdrjDOKuMcOVdYjt52Lh8hWRYpxBPoKx/Zg+bcjc3wx6fmQevMmUztS/ccA==",
1337513389
"license": "MIT",
1337613390
"dependencies": {
1337713391
"cssesc": "^3.0.0",

0 commit comments

Comments
 (0)