@markuplint/selector 4.6.4 → 4.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,16 +3,23 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [4.6.4](https://github.com/markuplint/markuplint/compare/@markuplint/selector@4.6.3...@markuplint/selector@4.6.4) (2024-06-09)
6
+ ## [4.6.6](https://github.com/markuplint/markuplint/compare/@markuplint/selector@4.6.5...@markuplint/selector@4.6.6) (2024-09-02)
7
7
 
8
+ **Note:** Version bump only for package @markuplint/selector
8
9
 
9
- ### Bug Fixes
10
10
 
11
- * fix to export type files ([eff4bbf](https://github.com/markuplint/markuplint/commit/eff4bbfd127574809dc5e15d7cafe87699758ee0))
12
11
 
13
12
 
14
13
 
14
+ ## [4.6.5](https://github.com/markuplint/markuplint/compare/@markuplint/selector@4.6.4...@markuplint/selector@4.6.5) (2024-06-25)
15
+
16
+ **Note:** Version bump only for package @markuplint/selector
17
+
18
+ ## [4.6.4](https://github.com/markuplint/markuplint/compare/@markuplint/selector@4.6.3...@markuplint/selector@4.6.4) (2024-06-09)
19
+
20
+ ### Bug Fixes
15
21
 
22
+ - fix to export type files ([eff4bbf](https://github.com/markuplint/markuplint/commit/eff4bbfd127574809dc5e15d7cafe87699758ee0))
16
23
 
17
24
  ## [4.6.3](https://github.com/markuplint/markuplint/compare/@markuplint/selector@4.6.2...@markuplint/selector@4.6.3) (2024-05-28)
18
25
 
package/lib/selector.js CHANGED
@@ -103,10 +103,9 @@ class StructuredSelector {
103
103
  __classPrivateFieldSet(this, _StructuredSelector_selector, selector, "f");
104
104
  __classPrivateFieldSet(this, _StructuredSelector_edge, new SelectorTarget(extended, depth), "f");
105
105
  this.headCombinator =
106
- __classPrivateFieldGet(this, _StructuredSelector_selector, "f").nodes[0]?.type === 'combinator' ? __classPrivateFieldGet(this, _StructuredSelector_selector, "f").nodes[0].value ?? null : null;
106
+ __classPrivateFieldGet(this, _StructuredSelector_selector, "f").nodes[0]?.type === 'combinator' ? (__classPrivateFieldGet(this, _StructuredSelector_selector, "f").nodes[0].value ?? null) : null;
107
107
  const nodes = [...__classPrivateFieldGet(this, _StructuredSelector_selector, "f").nodes];
108
108
  if (0 < depth && this.headCombinator) {
109
- // eslint-disable-next-line import/no-named-as-default-member
110
109
  nodes.unshift(parser.pseudo({ value: ':scope' }));
111
110
  }
112
111
  for (const node of nodes) {
@@ -451,9 +450,7 @@ class SelectorTarget {
451
450
  }
452
451
  const has = [];
453
452
  const not = [];
454
- // @ts-ignore
455
453
  if (this.tag && this.tag._namespace) {
456
- // @ts-ignore
457
454
  const namespace = `${this.tag._namespace}`.toLowerCase();
458
455
  switch (namespace) {
459
456
  case '*':
@@ -809,7 +806,7 @@ function isScope(
809
806
  el,
810
807
  // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
811
808
  scope) {
812
- return el === scope ?? el.parentNode === null;
809
+ return el === scope || el.parentNode === null;
813
810
  }
814
811
  function getDescendants(
815
812
  // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/selector",
3
- "version": "4.6.4",
3
+ "version": "4.6.6",
4
4
  "description": "Extended W3C Selectors matcher",
5
5
  "repository": "git@github.com:markuplint/markuplint.git",
6
6
  "author": "Yusuke Hirao <yusukehirao@me.com>",
@@ -25,15 +25,15 @@
25
25
  "clean": "tsc --build --clean"
26
26
  },
27
27
  "dependencies": {
28
- "@markuplint/ml-spec": "4.6.2",
28
+ "@markuplint/ml-spec": "4.6.4",
29
29
  "@types/debug": "4.1.12",
30
- "debug": "4.3.5",
31
- "postcss-selector-parser": "6.1.0",
32
- "type-fest": "4.20.0"
30
+ "debug": "4.3.6",
31
+ "postcss-selector-parser": "6.1.2",
32
+ "type-fest": "4.26.0"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/jsdom": "21.1.7",
36
- "jsdom": "24.1.0"
36
+ "jsdom": "25.0.0"
37
37
  },
38
- "gitHead": "0200dc1f7b1ffa7455b889696153e25dbae8241f"
38
+ "gitHead": "77cd5a25d5cf28c83253b7bfe02cd25b54e236b0"
39
39
  }