diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-08-30 17:21:18 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2024-08-30 17:21:18 +0800 |
| commit | efbc2ffe6a1ee5ec38a4396305561d6515d0943e (patch) | |
| tree | 2b4c94f18f2c792dfda813050755d5c0273fae22 /node_modules/postcss-selector-parser | |
| parent | 43acceb75957c880a5ba5a31aae221394a36d5f6 (diff) | |
node fixes, updates
Diffstat (limited to 'node_modules/postcss-selector-parser')
6 files changed, 25 insertions, 11 deletions
diff --git a/node_modules/postcss-selector-parser/API.md b/node_modules/postcss-selector-parser/API.md index 64459e33..c8e55ee5 100644 --- a/node_modules/postcss-selector-parser/API.md +++ b/node_modules/postcss-selector-parser/API.md @@ -786,7 +786,7 @@ has a method `error(message, options)` that returns an error object. This method should always be used to raise errors relating to the syntax of selectors. The options to this method are passed to postcss's error constructor -([documentation](http://api.postcss.org/Container.html#error)). +([documentation](http://postcss.org/api/#container-error)). #### Async Error Example diff --git a/node_modules/postcss-selector-parser/CHANGELOG.md b/node_modules/postcss-selector-parser/CHANGELOG.md index 785f8017..14ffadcc 100644 --- a/node_modules/postcss-selector-parser/CHANGELOG.md +++ b/node_modules/postcss-selector-parser/CHANGELOG.md @@ -1,3 +1,15 @@ +# 6.1.2 + +- Fixed: erroneous trailing combinators in pseudos + +# 6.1.1 + +- Fixed: improve typings of constructor helpers (#292) + +# 6.1.0 + +- Feature: add `sourceIndex` to `Selector` nodes (#290) + # 6.0.16 - Fixed: add missing `index` argument to `each`/`walk` callback types (#289) diff --git a/node_modules/postcss-selector-parser/dist/parser.js b/node_modules/postcss-selector-parser/dist/parser.js index b4c75e3e..ada61582 100644 --- a/node_modules/postcss-selector-parser/dist/parser.js +++ b/node_modules/postcss-selector-parser/dist/parser.js @@ -116,7 +116,8 @@ var Parser = /*#__PURE__*/function () { line: 1, column: 1 } - } + }, + sourceIndex: 0 }); this.root.append(selector); this.current = selector; @@ -484,7 +485,7 @@ var Parser = /*#__PURE__*/function () { } // We need to decide between a space that's a descendant combinator and meaningless whitespace at the end of a selector. var nextSigTokenPos = this.locateNextMeaningfulToken(this.position); - if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma) { + if (nextSigTokenPos < 0 || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.comma || this.tokens[nextSigTokenPos][_tokenize.FIELDS.TYPE] === tokens.closeParenthesis) { var nodes = this.parseWhitespaceEquivalentTokens(nextSigTokenPos); if (nodes.length > 0) { var last = this.current.last; @@ -577,7 +578,8 @@ var Parser = /*#__PURE__*/function () { var selector = new _selector["default"]({ source: { start: tokenStart(this.tokens[this.position + 1]) - } + }, + sourceIndex: this.tokens[this.position + 1][_tokenize.FIELDS.START_POS] }); this.current.parent.append(selector); this.current = selector; @@ -646,8 +648,9 @@ var Parser = /*#__PURE__*/function () { if (last && last.type === types.PSEUDO) { var selector = new _selector["default"]({ source: { - start: tokenStart(this.tokens[this.position - 1]) - } + start: tokenStart(this.tokens[this.position]) + }, + sourceIndex: this.tokens[this.position][_tokenize.FIELDS.START_POS] }); var cache = this.current; last.append(selector); diff --git a/node_modules/postcss-selector-parser/node_modules/.bin/cssesc b/node_modules/postcss-selector-parser/node_modules/.bin/cssesc deleted file mode 120000 index 7ba2ed9b..00000000 --- a/node_modules/postcss-selector-parser/node_modules/.bin/cssesc +++ /dev/null @@ -1 +0,0 @@ -../../../cssesc/bin/cssesc
\ No newline at end of file diff --git a/node_modules/postcss-selector-parser/package.json b/node_modules/postcss-selector-parser/package.json index 0d1af5d3..0b074d0f 100644 --- a/node_modules/postcss-selector-parser/package.json +++ b/node_modules/postcss-selector-parser/package.json @@ -1,6 +1,6 @@ { "name": "postcss-selector-parser", - "version": "6.0.16", + "version": "6.1.2", "devDependencies": { "@babel/cli": "^7.11.6", "@babel/core": "^7.11.6", diff --git a/node_modules/postcss-selector-parser/postcss-selector-parser.d.ts b/node_modules/postcss-selector-parser/postcss-selector-parser.d.ts index 9163ab1a..af609e6c 100644 --- a/node_modules/postcss-selector-parser/postcss-selector-parser.d.ts +++ b/node_modules/postcss-selector-parser/postcss-selector-parser.d.ts @@ -532,13 +532,13 @@ declare namespace parser { interface Identifier extends Base { type: "id"; } - function id(opts: any): any; + function id(opts: any): Identifier; function isIdentifier(node: any): node is Identifier; interface Nesting extends Base { type: "nesting"; } - function nesting(opts: any): any; + function nesting(opts?: any): Nesting; function isNesting(node: any): node is Nesting; interface String extends Base { @@ -550,6 +550,6 @@ declare namespace parser { interface Universal extends Base { type: "universal"; } - function universal(opts?: NamespaceOptions): any; + function universal(opts?: NamespaceOptions): Universal; function isUniversal(node: any): node is Universal; } |
