@mui/internal-markdown 2.0.10 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { expect } from 'chai';
2
- import extractImports from './extractImports';
2
+ import extractImports from './extractImports.mjs';
3
3
 
4
4
  describe('extractImports', () => {
5
5
  it('finds all imports', () => {
package/loader.mjs CHANGED
@@ -460,10 +460,15 @@ export default async function demoLoader() {
460
460
  demos[demoName].relativeModules = {};
461
461
  }
462
462
 
463
- const addedModulesRelativeToModulePath = new Set();
463
+ const addedModulesRelativeToModulePathPerVariant = {};
464
+
464
465
  await Promise.all(
465
466
  Array.from(relativeModules.get(demoName)).map(async ([relativeModuleID, variants]) => {
466
467
  for (const variant of variants) {
468
+ addedModulesRelativeToModulePathPerVariant[variant] ??= new Set();
469
+ const addedModulesRelativeToModulePath =
470
+ addedModulesRelativeToModulePathPerVariant[variant];
471
+
467
472
  let raw = '';
468
473
  const relativeModuleFilePath = path.join(
469
474
  path.dirname(moduleFilepath),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/internal-markdown",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
4
4
  "author": "MUI Team",
5
5
  "description": "MUI markdown parser. This is an internal package not meant for general use.",
6
6
  "main": "./index.mjs",
@@ -21,14 +21,14 @@
21
21
  "directory": "packages/markdown"
22
22
  },
23
23
  "dependencies": {
24
- "@babel/runtime": "^7.28.3",
25
- "lodash": "^4.17.21",
26
- "marked": "^16.2.0",
24
+ "@babel/runtime": "^7.28.4",
25
+ "es-toolkit": "^1.40.0",
26
+ "marked": "^16.4.1",
27
27
  "prismjs": "^1.30.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/chai": "^4.3.20",
31
- "chai": "^4.5.0"
31
+ "chai": "^6.0.1"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"
@@ -7,7 +7,7 @@ import {
7
7
  getCodeblock,
8
8
  renderMarkdown,
9
9
  createRender,
10
- } from './parseMarkdown';
10
+ } from './parseMarkdown.mjs';
11
11
 
12
12
  describe('parseMarkdown', () => {
13
13
  describe('getTitle', () => {
@@ -283,6 +283,7 @@ title: "Our docs just got a major upgrade—here's what that means for you"
283
283
  describe('createRender', () => {
284
284
  it('should collect headers correctly', () => {
285
285
  const context = { toc: [], headingHashes: {} };
286
+ // eslint-disable-next-line testing-library/render-result-naming-convention
286
287
  const render = createRender(context);
287
288
 
288
289
  expect(
@@ -1,6 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
- import kebabCase from 'lodash/kebabCase.js';
3
+ import { kebabCase } from 'es-toolkit/string';
4
4
  import {
5
5
  createRender,
6
6
  getContents,
@@ -1,5 +1,5 @@
1
1
  import { expect } from 'chai';
2
- import prepareMarkdown from './prepareMarkdown';
2
+ import prepareMarkdown from './prepareMarkdown.mjs';
3
3
 
4
4
  describe('prepareMarkdown', () => {
5
5
  const defaultParams = {
@@ -1,6 +1,6 @@
1
1
  import { expect } from 'chai';
2
2
  import { parseInline as renderInlineMarkdown } from 'marked';
3
- import textToHash from './textToHash';
3
+ import textToHash from './textToHash.mjs';
4
4
 
5
5
  describe('textToHash', () => {
6
6
  it('should hash as expected', () => {
@@ -17,6 +17,7 @@ describe('textToHash', () => {
17
17
  ];
18
18
  table.forEach((entry, index) => {
19
19
  const [markdown, expected] = entry;
20
+ // eslint-disable-next-line testing-library/render-result-naming-convention
20
21
  const text = renderInlineMarkdown(markdown, { mangle: false, headerIds: false });
21
22
  const actual = textToHash(text);
22
23