Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,6 @@
"@playwright/test": "^1.54.1",
"prettier": "^3.6.2",
"tailwindcss": "^4.1.11",
"yargs": "^17.7.2"
"yargs": "^18.0.0"
}
}
39 changes: 21 additions & 18 deletions docs/scripts/formattedTSDemos.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,30 @@
* would indicate equivalence.
*/

import path from 'path';
import fse from 'fs-extra';
import * as babel from '@babel/core';
import prettier from 'prettier';
import { fileURLToPath } from 'url';
import {
getPropTypesFromFile,
injectPropTypesInFile,
} from '@mui/internal-scripts/typescript-to-proptypes';
import { createTypeScriptProjectBuilder } from '@mui-internal/api-docs-builder/utils/createTypeScriptProject';
import yargs from 'yargs';
import { fixBabelGeneratorIssues, fixLineEndings } from '@mui/internal-docs-utils';
// eslint-disable-next-line import/no-relative-packages
import CORE_TYPESCRIPT_PROJECTS from '../../scripts/coreTypeScriptProjects';

const filename = fileURLToPath(import.meta.url);
const dirname = path.dirname(filename);

/**
* List of demos or folders to ignore when transpiling.
* Only ignore files that aren't used in the UI.
*/
const ignoreList = ['/pages.ts', 'docs/data/joy/getting-started/templates'];

const path = require('path');
const fse = require('fs-extra');
const babel = require('@babel/core');
const prettier = require('prettier');
const {
getPropTypesFromFile,
injectPropTypesInFile,
} = require('@mui/internal-scripts/typescript-to-proptypes');
const {
createTypeScriptProjectBuilder,
} = require('@mui-internal/api-docs-builder/utils/createTypeScriptProject');
const yargs = require('yargs');
const { fixBabelGeneratorIssues, fixLineEndings } = require('@mui/internal-docs-utils');
const { default: CORE_TYPESCRIPT_PROJECTS } = require('../../scripts/coreTypeScriptProjects');

const babelConfig = {
presets: ['@babel/preset-typescript'],
plugins: [],
Expand All @@ -35,7 +38,7 @@ const babelConfig = {
shouldPrintComment: (comment) => !comment.startsWith(' @babel-ignore-comment-in-output'),
};

const workspaceRoot = path.join(__dirname, '../../');
const workspaceRoot = path.join(dirname, '../../');

async function getFiles(root) {
const files = [];
Expand Down Expand Up @@ -91,7 +94,7 @@ async function transpileFile(tsxPath, project) {
if (enableJSXPreview) {
transformOptions.plugins = transformOptions.plugins.concat([
[
require.resolve('docs/src/modules/utils/babel-plugin-jsx-preview'),
path.resolve('docs/src/modules/utils/babel-plugin-jsx-preview'),
{ maxLines: 16, outputFilename: `${tsxPath}.preview` },
],
]);
Expand Down Expand Up @@ -213,7 +216,7 @@ async function main(argv) {
console.log('\nWatching for file changes...');
}

yargs
yargs()
.command({
command: '$0',
description: 'transpile TypeScript demos',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@
"webpack": "^5.100.2",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^6.0.1",
"yargs": "^17.7.2"
"yargs": "^18.0.0"
},
"packageManager": "pnpm@10.13.1",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-codemod/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"jscodeshift-add-imports": "^1.0.11",
"postcss": "^8.5.6",
"postcss-cli": "^11.0.1",
"yargs": "^17.7.2"
"yargs": "^18.0.0"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are fine with this slight BC, then this package engines.node field needs to be updated to >=20.19.

},
"devDependencies": {
"@types/chai": "^4.3.20",
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-icons-material/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"rimraf": "^6.0.1",
"shx": "^0.4.0",
"svgo": "^4.0.0",
"yargs": "^17.7.2"
"yargs": "^18.0.0"
},
"peerDependencies": {
"@mui/material": "workspace:^",
Expand Down
80 changes: 70 additions & 10 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions scripts/generateProptypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as fse from 'fs-extra';
import * as prettier from 'prettier';
import glob from 'fast-glob';
import * as _ from 'lodash';
import * as yargs from 'yargs';
import yargs from 'yargs';
import { LiteralType } from '@mui/internal-scripts/typescript-to-proptypes/src/models';
import {
fixBabelGeneratorIssues,
Expand Down Expand Up @@ -372,7 +372,7 @@ async function run(argv: HandlerArgv) {
}
}

yargs
yargs()
.command<HandlerArgv>({
command: '$0',
describe: 'Generates Component.propTypes from TypeScript declarations',
Expand Down
2 changes: 1 addition & 1 deletion test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"stylis": "4.2.0",
"webfontloader": "^1.6.28",
"webpack": "^5.100.2",
"yargs": "^17.7.2"
"yargs": "^18.0.0"
},
"dependencies": {
"@react-spring/web": "^10.0.1"
Expand Down
Loading