@asamuzakjp/dom-selector 7.0.4 → 7.0.5

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/package.json CHANGED
@@ -32,24 +32,25 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/css-tree": "^2.3.11",
35
+ "@types/node": "^25.5.2",
35
36
  "benchmark": "^2.1.4",
36
37
  "c8": "^11.0.0",
37
38
  "chai": "^6.2.2",
38
39
  "commander": "^14.0.3",
39
40
  "eslint": "^9.39.4",
40
41
  "eslint-config-prettier": "^10.1.8",
41
- "eslint-plugin-jsdoc": "^62.8.0",
42
+ "eslint-plugin-jsdoc": "^62.9.0",
42
43
  "eslint-plugin-prettier": "^5.5.5",
43
44
  "eslint-plugin-regexp": "^3.1.0",
44
- "eslint-plugin-unicorn": "^63.0.0",
45
+ "eslint-plugin-unicorn": "^64.0.0",
45
46
  "globals": "^17.4.0",
46
47
  "jsdom": "^29.0.1",
47
48
  "mocha": "^11.7.5",
48
49
  "neostandard": "^0.13.0",
49
50
  "prettier": "^3.8.1",
50
51
  "sinon": "^21.0.3",
51
- "typescript": "^5.9.3",
52
- "wpt-runner": "^6.1.0"
52
+ "typescript": "^6.0.2",
53
+ "wpt-runner": "^7.0.0"
53
54
  },
54
55
  "overrides": {
55
56
  "c8": {
@@ -71,5 +72,5 @@
71
72
  "engines": {
72
73
  "node": "^20.19.0 || ^22.12.0 || >=24.0.0"
73
74
  },
74
- "version": "7.0.4"
75
+ "version": "7.0.5"
75
76
  }
package/src/js/finder.js CHANGED
@@ -368,6 +368,7 @@ export class Finder {
368
368
  ast = item.ast;
369
369
  this.#descendant = item.descendant;
370
370
  this.#invalidate = item.invalidate;
371
+ this.#selectorAST = item.selectorAST;
371
372
  }
372
373
  }
373
374
  if (ast) {
@@ -403,7 +404,8 @@ export class Finder {
403
404
  cachedItem.set(`${selector}`, {
404
405
  ast,
405
406
  descendant: this.#descendant,
406
- invalidate: this.#invalidate
407
+ invalidate: this.#invalidate,
408
+ selectorAST: this.#selectorAST
407
409
  });
408
410
  this.#documentCache.set(this.#document, cachedItem);
409
411
  // Initialize nodes array for each branch.
@@ -1,12 +1,12 @@
1
1
  export class Finder {
2
2
  constructor(window: object);
3
3
  onError: (e: Error, opt?: {
4
- noexcept?: boolean;
4
+ noexcept?: boolean | undefined;
5
5
  }) => void;
6
6
  setup: (selector: string, node: object, opt?: {
7
- check?: boolean;
8
- noexcept?: boolean;
9
- warn?: boolean;
7
+ check?: boolean | undefined;
8
+ noexcept?: boolean | undefined;
9
+ warn?: boolean | undefined;
10
10
  }) => object;
11
11
  clearResults: (all?: boolean) => void;
12
12
  private _handleFocusEvent;
@@ -1,16 +1,16 @@
1
1
  export function matchPseudoElementSelector(astName: string, astType: string, opt?: {
2
- forgive?: boolean;
3
- warn?: boolean;
2
+ forgive?: boolean | undefined;
3
+ warn?: boolean | undefined;
4
4
  }): void;
5
5
  export function matchDirectionPseudoClass(ast: object, node: object): boolean;
6
6
  export function matchLanguagePseudoClass(ast: object, node: object): boolean;
7
7
  export function matchDisabledPseudoClass(astName: string, node: object): boolean;
8
8
  export function matchReadOnlyPseudoClass(astName: string, node: object): boolean;
9
9
  export function matchAttributeSelector(ast: object, node: object, opt?: {
10
- check?: boolean;
11
- forgive?: boolean;
10
+ check?: boolean | undefined;
11
+ forgive?: boolean | undefined;
12
12
  }): boolean;
13
13
  export function matchTypeSelector(ast: object, node: object, opt?: {
14
- check?: boolean;
15
- forgive?: boolean;
14
+ check?: boolean | undefined;
15
+ forgive?: boolean | undefined;
16
16
  }): boolean;
@@ -6,7 +6,7 @@ export function findLogicalWithNestedHas(leaf: object): object | null;
6
6
  export function filterNodesByAnB(nodes: Array<object>, anb: {
7
7
  a: number;
8
8
  b: number;
9
- reverse?: boolean;
9
+ reverse?: boolean | undefined;
10
10
  }): Array<object>;
11
11
  export function resolveContent(node: object): Array<object | boolean>;
12
12
  export function traverseNode(node: object, walker: object, force?: boolean): object | null;