Skip to content

Commit a01007e

Browse files
committed
chore(deps): bump dependencies
1 parent 34f3097 commit a01007e

6 files changed

Lines changed: 46 additions & 151 deletions

File tree

biome.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/2.4.7/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.4.8/schema.json",
33
"vcs": {
44
"enabled": true,
55
"clientKind": "git",

package-lock.json

Lines changed: 27 additions & 139 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@
3434
"dependencies": {
3535
"boolbase": "^2.0.0",
3636
"css-what": "^8.0.0",
37-
"domhandler": "^6.0.0",
38-
"domutils": "^4.0.0",
39-
"nth-check": "^3.0.0"
37+
"domhandler": "^6.0.1",
38+
"domutils": "^4.0.2",
39+
"nth-check": "^3.0.1"
4040
},
4141
"devDependencies": {
4242
"@biomejs/biome": "^2.4.8",
4343
"@eslint/compat": "^2.0.3",
4444
"@feedic/eslint-config": "^0.3.1",
4545
"@types/node": "^25.5.0",
46-
"eslint": "^10.0.3",
46+
"eslint": "^10.1.0",
4747
"eslint-config-biome": "^2.1.3",
48-
"globals": "^17.3.0",
49-
"htmlparser2": "^10.1.0",
48+
"globals": "^17.4.0",
49+
"htmlparser2": "^12.0.0",
5050
"typescript": "^5.9.3",
5151
"typescript-eslint": "^8.57.1",
52-
"vitest": "^4.0.18"
52+
"vitest": "^4.1.0"
5353
},
5454
"scripts": {
5555
"build": "tsc",

test/pseudo-classes.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import type { AnyNode, Element } from "domhandler";
2-
import { DomUtils, parseDOM, parseDocument } from "htmlparser2";
1+
import { type AnyNode, type Element, isTag } from "domhandler";
2+
import { DomUtils, parseDocument } from "htmlparser2";
33
import { describe, expect, it } from "vitest";
44
import * as CSSselect from "../src/index.js";
55
import type { Adapter } from "../src/types.js";
6+
import { parseDOM } from "./tools/helper.js";
67

78
const dom = parseDOM(
89
"<div><p>In the end, it doesn't really Matter.</p><div>Indeed-that's a delicate matter.</div>",
@@ -136,7 +137,7 @@ describe(":first-child", () => {
136137
});
137138

138139
it("should work without `prevElementSibling`", () => {
139-
const adapter: Adapter<AnyNode, Element> = { ...DomUtils };
140+
const adapter: Adapter<AnyNode, Element> = { ...DomUtils, isTag };
140141
delete adapter.prevElementSibling;
141142

142143
const matches = CSSselect.selectAll(":first-child", dom, { adapter });

test/sizzle.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import type { AnyNode, ChildNode, Element, ParentNode } from "domhandler";
22
import * as DomUtils from "domutils";
3-
import { parseDOM, parseDocument } from "htmlparser2";
3+
import { parseDocument } from "htmlparser2";
44
import { beforeEach, describe, expect, it } from "vitest";
55
import * as CSSselect from "../src/index.js";
6+
import { parseDOM } from "./tools/helper.js";
67
import {
78
createWithFriesXML,
89
loadDocument,

test/tools/helper.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import assert from "node:assert";
22
import { readFileSync } from "node:fs";
33
import path from "node:path";
4+
import type { ChildNode } from "domhandler";
45
import { type Document, Element, isTag, Text } from "domhandler";
56
import * as DomUtils from "domutils";
67
import { type ParserOptions, parseDocument } from "htmlparser2";
78

9+
export function parseDOM(data: string): ChildNode[] {
10+
return parseDocument(data).children;
11+
}
12+
813
export function getDocumentFromPath(
914
file: string,
1015
options?: ParserOptions,

0 commit comments

Comments
 (0)