From 8335731951cedfb33fce22fb3a5657a3e875a353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20B=C3=B6hm?= <188768+fb55@users.noreply.github.com> Date: Tue, 22 Nov 2022 16:23:00 +0000 Subject: [PATCH] Add jsdom types for benchmarks --- benchmark/suite.ts | 1 - package-lock.json | 35 +++++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/benchmark/suite.ts b/benchmark/suite.ts index 8a8db68caf9..31d3c0421b4 100644 --- a/benchmark/suite.ts +++ b/benchmark/suite.ts @@ -2,7 +2,6 @@ import fs from 'fs'; import path from 'path'; import { Suite, Event } from 'benchmark'; -// @ts-expect-error `jsdom` types currently collide with `parse5` types. import { JSDOM } from 'jsdom'; import { Script } from 'vm'; import cheerio from '../lib/index.js'; diff --git a/package-lock.json b/package-lock.json index ce610b16844..9ba126f0250 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "@octokit/graphql": "^5.0.4", "@types/benchmark": "^2.1.2", "@types/jest": "^29.2.3", + "@types/jsdom": "^20.0.1", "@types/node": "^18.11.9", "@types/whatwg-mimetype": "^3.0.0", "@typescript-eslint/eslint-plugin": "^5.44.0", @@ -1430,6 +1431,17 @@ "pretty-format": "^29.0.0" } }, + "node_modules/@types/jsdom": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", + "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", + "dev": true, + "dependencies": { + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" + } + }, "node_modules/@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -1475,6 +1487,12 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, + "node_modules/@types/tough-cookie": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", + "integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==", + "dev": true + }, "node_modules/@types/unist": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", @@ -8491,6 +8509,17 @@ "pretty-format": "^29.0.0" } }, + "@types/jsdom": { + "version": "20.0.1", + "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-20.0.1.tgz", + "integrity": "sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/tough-cookie": "*", + "parse5": "^7.0.0" + } + }, "@types/json-schema": { "version": "7.0.11", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", @@ -8536,6 +8565,12 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, + "@types/tough-cookie": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-4.0.2.tgz", + "integrity": "sha512-Q5vtl1W5ue16D+nIaW8JWebSSraJVlK+EthKn7e7UcD4KWsaSJ8BqGPXNaPghgtcn/fhvrN17Tv8ksUsQpiplw==", + "dev": true + }, "@types/unist": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", diff --git a/package.json b/package.json index 599166a18ad..a055c38bac3 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "@octokit/graphql": "^5.0.4", "@types/benchmark": "^2.1.2", "@types/jest": "^29.2.3", + "@types/jsdom": "^20.0.1", "@types/node": "^18.11.9", "@types/whatwg-mimetype": "^3.0.0", "@typescript-eslint/eslint-plugin": "^5.44.0",