chore: add Node 24 to CI + fix deprecation warnings (#11168)

This commit is contained in:
Sébastien Lorber 2025-05-09 18:29:07 +02:00 committed by GitHub
parent 8061f2267b
commit 4af8982278
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 12 additions and 6 deletions

View file

@ -14,6 +14,7 @@ import {
escapePath,
findAsyncSequential,
getFileLoaderUtils,
parseURLOrPath,
} from '@docusaurus/utils';
import escapeHtml from 'escape-html';
import {imageSizeFromFile} from 'image-size/fromFile';
@ -50,7 +51,7 @@ async function toImageRequireNode(
);
relativeImagePath = `./${relativeImagePath}`;
const parsedUrl = url.parse(node.url);
const parsedUrl = parseURLOrPath(node.url, 'https://example.com');
const hash = parsedUrl.hash ?? '';
const search = parsedUrl.search ?? '';
const requireString = `${context.inlineMarkdownImageFileLoader}${

View file

@ -14,6 +14,7 @@ import {
escapePath,
findAsyncSequential,
getFileLoaderUtils,
parseURLOrPath,
} from '@docusaurus/utils';
import escapeHtml from 'escape-html';
import {assetRequireAttributeValue, transformNode} from '../utils';
@ -51,7 +52,7 @@ async function toAssetRequireNode(
path.relative(path.dirname(context.filePath), assetPath),
)}`;
const parsedUrl = url.parse(node.url);
const parsedUrl = parseURLOrPath(node.url);
const hash = parsedUrl.hash ?? '';
const search = parsedUrl.search ?? '';