mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-25 12:38:57 +02:00
chore: add Node 24 to CI + fix deprecation warnings (#11168)
This commit is contained in:
parent
8061f2267b
commit
4af8982278
8 changed files with 12 additions and 6 deletions
|
@ -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}${
|
||||
|
|
|
@ -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 ?? '';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue