chore(deps): Bump deps (#4970)

This commit is contained in:
Felix Boehm
2025-12-20 23:00:49 +00:00
committed by GitHub
parent 54c9e2d8a1
commit 2eef3ebc73
9 changed files with 2232 additions and 5441 deletions

View File

@@ -25,9 +25,9 @@ jobs:
fail-fast: false
matrix:
node:
- 18
- 20
- 22
- 24
- lts/*
steps:

2267
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -125,7 +125,7 @@
"parse5": "^7.3.0",
"parse5-htmlparser2-tree-adapter": "^7.1.0",
"parse5-parser-stream": "^7.1.2",
"undici": "^7.12.0",
"undici": "^7.16.0",
"whatwg-mimetype": "^4.0.0"
},
"devDependencies": {
@@ -134,28 +134,28 @@
"@imgix/js-core": "^3.8.0",
"@octokit/graphql": "^9.0.3",
"@types/jsdom": "^27.0.0",
"@types/node": "^24.10.1",
"@types/node": "^25.0.3",
"@types/whatwg-mimetype": "^3.0.2",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/eslint-plugin": "^1.4.3",
"eslint": "^9.39.1",
"@vitest/coverage-v8": "^4.0.16",
"@vitest/eslint-plugin": "^1.5.4",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-jsdoc": "^61.4.1",
"eslint-plugin-jsdoc": "^61.5.0",
"eslint-plugin-n": "^17.23.1",
"eslint-plugin-unicorn": "^59.0.1",
"eslint-plugin-unicorn": "^62.0.0",
"globals": "^16.5.0",
"husky": "^9.1.7",
"jquery": "^3.7.1",
"jsdom": "^27.2.0",
"jsdom": "^27.3.0",
"lint-staged": "^16.2.7",
"prettier": "^3.6.2",
"prettier-plugin-jsdoc": "^1.5.0",
"tinybench": "^5.1.0",
"prettier": "^3.7.4",
"prettier-plugin-jsdoc": "^1.8.0",
"tinybench": "^6.0.0",
"tshy": "^3.1.0",
"tsx": "^4.20.6",
"typescript": "^5.9.2",
"typescript-eslint": "^8.47.0",
"vitest": "^3.1.4"
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"typescript-eslint": "^8.50.0",
"vitest": "^4.0.16"
},
"engines": {
"node": ">=20.18.1"

View File

@@ -1136,7 +1136,6 @@ describe('$(...)', () => {
it('(fn) : should work with no initial class attribute', () => {
const $inputs = load(inputs);
$inputs('input, select').toggleClass(function () {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- `get` should never return undefined here.
return $inputs(this).get(0)!.tagName === 'select'
? 'selectable'
: 'inputable';

View File

@@ -273,7 +273,7 @@ export const parents: <T extends AnyNode>(
selector?: AcceptedFilters<Element>,
) => Cheerio<Element> = _matcher(
(elem) => {
const matched = [];
const matched: Element[] = [];
while (elem.parent && !isDocument(elem.parent)) {
matched.push(elem.parent as Element);
elem = elem.parent;
@@ -281,6 +281,7 @@ export const parents: <T extends AnyNode>(
return matched;
},
uniqueSort,
// eslint-disable-next-line unicorn/no-array-reverse
(elems) => elems.reverse(),
);
@@ -309,6 +310,7 @@ export const parentsUntil: <T extends AnyNode>(
) => Cheerio<Element> = _matchUntil(
({ parent }) => (parent && !isDocument(parent) ? (parent as Element) : null),
uniqueSort,
// eslint-disable-next-line unicorn/no-array-reverse
(elems) => elems.reverse(),
);

View File

@@ -199,21 +199,23 @@ describe('fromURL', () => {
});
it('should follow redirects', async () => {
let redirected = false;
let firstRequestUrl: string | undefined;
let secondRequestUrl: string | undefined;
const port = await createTestServer('text/html', TEST_HTML, (req, res) => {
if (redirected) {
expect(req.url).toBe('/final/path');
res.writeHead(200, { 'Content-Type': 'text/html' });
res.end(TEST_HTML);
} else {
expect(req.url).toBe('/first');
redirected = true;
if (firstRequestUrl === undefined) {
firstRequestUrl = req.url;
res.writeHead(302, { Location: `http://localhost:${port}/final/path` });
res.end();
} else {
secondRequestUrl = req.url;
res.writeHead(200, { 'Content-Type': 'text/html' });
res.end(TEST_HTML);
}
});
const $ = await cheerio.fromURL(`http://localhost:${port}/first`);
expect(firstRequestUrl).toBe('/first');
expect(secondRequestUrl).toBe('/final/path');
expect($.html()).toBe(
`<html><head></head><body>${TEST_HTML}</body></html>`,
);

View File

@@ -11,9 +11,7 @@ import type { DomSerializerOptions } from 'dom-serializer';
* @see https://github.com/fb55/htmlparser2/wiki/Parser-options
*/
export interface HTMLParser2Options
extends DomHandlerOptions,
DomSerializerOptions,
HTMLParser2ParserOptions {
extends DomHandlerOptions, DomSerializerOptions, HTMLParser2ParserOptions {
/** Treat the input as an XML document. */
xmlMode?: boolean;
}
@@ -24,8 +22,7 @@ export interface HTMLParser2Options
* Please note that parser-specific options are _only recognized_ if the
* relevant parser is used.
*/
export interface CheerioOptions
extends Parse5ParserOptions<Htmlparser2TreeAdapterMap> {
export interface CheerioOptions extends Parse5ParserOptions<Htmlparser2TreeAdapterMap> {
/**
* Recommended way of configuring htmlparser2 when wanting to parse XML.
*
@@ -88,8 +85,7 @@ export interface CheerioOptions
/** Internal options for Cheerio. */
export interface InternalOptions
extends HTMLParser2Options,
Omit<CheerioOptions, 'xml'> {
extends HTMLParser2Options, Omit<CheerioOptions, 'xml'> {
/**
* Whether to use htmlparser2.
*

5329
website/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -20,22 +20,22 @@
"@docusaurus/module-type-aliases": "^3.9.2",
"@docusaurus/plugin-client-redirects": "^3.9.2",
"@docusaurus/preset-classic": "^3.9.2",
"@docusaurus/remark-plugin-npm2yarn": "^3.9.1",
"@docusaurus/remark-plugin-npm2yarn": "^3.9.2",
"@docusaurus/theme-live-codeblock": "^3.9.2",
"@mdx-js/react": "^3.1.1",
"clsx": "^2.1.1",
"docusaurus-plugin-typedoc": "^1.4.2",
"prism-react-renderer": "^2.4.1",
"react": "^19.1.0",
"react-dom": "^19.2.0",
"typedoc": "^0.28.14",
"react": "^19.2.3",
"react-dom": "^19.2.3",
"typedoc": "^0.28.15",
"typedoc-plugin-markdown": "^4.9.0",
"typedoc-plugin-mdn-links": "^5.0.10"
},
"devDependencies": {
"@crowdin/cli": "^4.11.0",
"@crowdin/cli": "^4.12.0",
"@docusaurus/faster": "^3.9.2",
"@tsconfig/docusaurus": "^2.0.4",
"@tsconfig/docusaurus": "^2.0.7",
"typescript": "^5.9.3"
},
"browserslist": {