@mui/internal-markdown 2.0.9 → 2.0.11

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),
@@ -476,7 +481,7 @@ export default async function demoLoader() {
476
481
  }
477
482
 
478
483
  try {
479
- // We are only iterating trough an array that looks
484
+ // We are only iterating through an array that looks
480
485
  // like this: ['JS', 'TS'], so it is safe to await
481
486
  // eslint-disable-next-line no-await-in-loop
482
487
  raw = await fs.readFile(relativeModuleFilePath, {
@@ -515,7 +520,7 @@ export default async function demoLoader() {
515
520
  entry,
516
521
  );
517
522
 
518
- // We are only iterating trough an array that looks
523
+ // We are only iterating through an array that looks
519
524
  // like this: ['JS', 'TS'], so it is safe to await
520
525
  // eslint-disable-next-line no-await-in-loop
521
526
  const rawEntry = await fs.readFile(entryModuleFilePath, { encoding: 'utf8' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/internal-markdown",
3
- "version": "2.0.9",
3
+ "version": "2.0.11",
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.2",
24
+ "@babel/runtime": "^7.28.4",
25
25
  "lodash": "^4.17.21",
26
- "marked": "^16.1.2",
26
+ "marked": "^16.3.0",
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', () => {
@@ -64,7 +64,7 @@ describe('parseMarkdown', () => {
64
64
  title: React Alert component
65
65
  components: Alert, AlertTitle
66
66
  hooks: useAlert
67
- githubLabel: 'component: alert'
67
+ githubLabel: 'scope: alert'
68
68
  packageName: '@mui/lab'
69
69
  waiAria: https://www.w3.org/TR/wai-aria-practices/#alert
70
70
  authors: ['foo', 'bar']
@@ -73,7 +73,7 @@ authors: ['foo', 'bar']
73
73
  ).to.deep.equal({
74
74
  components: ['Alert', 'AlertTitle'],
75
75
  hooks: ['useAlert'],
76
- githubLabel: 'component: alert',
76
+ githubLabel: 'scope: alert',
77
77
  packageName: '@mui/lab',
78
78
  title: 'React Alert component',
79
79
  waiAria: 'https://www.w3.org/TR/wai-aria-practices/#alert',
@@ -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', () => {