diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 72084ce6..f7564c99 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,10 +12,6 @@ updates: interval: daily open-pull-requests-limit: 4 versioning-strategy: increase - # TODO: We cannot update React to v18. See https://github.com/facebook/docusaurus/issues/7264 - ignore: - - dependency-name: 'react' - versions: ['18.x'] - package-ecosystem: 'github-actions' directory: '/' schedule: diff --git a/Readme.md b/Readme.md index f394ff23..fa1339ed 100644 --- a/Readme.md +++ b/Readme.md @@ -22,7 +22,7 @@ [中文文档 (Chinese Readme)](https://github.com/cheeriojs/cheerio/wiki/Chinese-README) ```js -const cheerio = require('cheerio'); +import * as cheerio from 'cheerio'; const $ = cheerio.load('

Hello world

'); $('h2.title').text('Hello there!'); @@ -61,7 +61,7 @@ jQuery operates on the one, baked-in DOM. With Cheerio, we need to pass in the HTML document. ```js -// ES6 or TypeScript: +// ESM or TypeScript: import * as cheerio from 'cheerio'; // In other environments: diff --git a/benchmark/benchmark.ts b/benchmark/benchmark.ts index b02b830a..bb2c81e4 100755 --- a/benchmark/benchmark.ts +++ b/benchmark/benchmark.ts @@ -5,7 +5,7 @@ import type { Element } from 'domhandler'; import type { Cheerio } from '../src/cheerio.js'; import type { CheerioAPI } from '../src/load.js'; import { JSDOM } from 'jsdom'; -import { load } from '../src/base-exports.js'; +import { load } from '../src/load-parse.js'; const documentDir = new URL('documents/', import.meta.url); const jQuerySrc = await fs.readFile( diff --git a/src/__fixtures__/fixtures.ts b/src/__fixtures__/fixtures.ts index 4487d4c5..d153fe2d 100644 --- a/src/__fixtures__/fixtures.ts +++ b/src/__fixtures__/fixtures.ts @@ -1,3 +1,9 @@ +import type { CheerioAPI } from '../load.js'; +import { load } from '../load-parse.js'; + +/** A Cheerio instance with no content. */ +export const cheerio: CheerioAPI = load([]); + export const fruits: string = [ '