Skip to content

Commit 8da2f44

Browse files
committed
Fix yargs call
1 parent 066e599 commit 8da2f44

File tree

14 files changed

+34
-20
lines changed

14 files changed

+34
-20
lines changed

docs/data/joy/components/button/InputFileUpload.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import SvgIcon from '@mui/joy/SvgIcon';
44
import { styled } from '@mui/joy';
55

66
const VisuallyHiddenInput = styled('input')`
7+
/* stylelint-disable-next-line property-no-deprecated */
78
clip: rect(0 0 0 0);
89
clip-path: inset(50%);
910
height: 1px;

docs/data/joy/components/button/InputFileUpload.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import SvgIcon from '@mui/joy/SvgIcon';
44
import { styled } from '@mui/joy';
55

66
const VisuallyHiddenInput = styled('input')`
7+
/* stylelint-disable-next-line property-no-deprecated */
78
clip: rect(0 0 0 0);
89
clip-path: inset(50%);
910
height: 1px;

docs/data/material/integrations/interoperability/StyledComponentsDeep.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ import Box from '@mui/material/Box';
66
const CustomizedSlider = styled(Slider)`
77
color: #20b2aa;
88
9-
:hover {
9+
/* stylelint-disable-next-line nesting-selector-no-missing-scoping-root */
10+
&:hover {
1011
color: #2e8b57;
1112
}
1213
14+
/* stylelint-disable-next-line nesting-selector-no-missing-scoping-root */
1315
& .MuiSlider-thumb {
1416
border-radius: 1px;
1517
}

docs/data/material/integrations/interoperability/StyledComponentsDeep.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ import Box from '@mui/material/Box';
66
const CustomizedSlider = styled(Slider)`
77
color: #20b2aa;
88
9-
:hover {
9+
/* stylelint-disable-next-line nesting-selector-no-missing-scoping-root */
10+
&:hover {
1011
color: #2e8b57;
1112
}
1213
14+
/* stylelint-disable-next-line nesting-selector-no-missing-scoping-root */
1315
& .MuiSlider-thumb {
1416
border-radius: 1px;
1517
}

docs/data/material/integrations/interoperability/StyledComponentsPortal.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Tooltip from '@mui/material/Tooltip';
66
const StyledTooltip = styled(({ className, ...props }) => (
77
<Tooltip {...props} classes={{ popper: className }} />
88
))`
9+
/* stylelint-disable-next-line nesting-selector-no-missing-scoping-root */
910
& .MuiTooltip-tooltip {
1011
background: navy;
1112
}

docs/data/material/integrations/interoperability/StyledComponentsPortal.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Tooltip, { TooltipProps } from '@mui/material/Tooltip';
66
const StyledTooltip = styled(({ className, ...props }: TooltipProps) => (
77
<Tooltip {...props} classes={{ popper: className }} />
88
))`
9+
/* stylelint-disable-next-line nesting-selector-no-missing-scoping-root */
910
& .MuiTooltip-tooltip {
1011
background: navy;
1112
}

docs/scripts/formattedTSDemos.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ const {
2222
const {
2323
createTypeScriptProjectBuilder,
2424
} = require('@mui-internal/api-docs-builder/utils/createTypeScriptProject');
25-
const yargs = require('yargs');
25+
const yargs = require('yargs').default;
26+
const hideBin = require('yargs/helpers').hideBin;
2627
const { fixBabelGeneratorIssues, fixLineEndings } = require('@mui/internal-docs-utils');
2728
const { default: CORE_TYPESCRIPT_PROJECTS } = require('../../scripts/coreTypeScriptProjects');
2829

@@ -213,7 +214,7 @@ async function main(argv) {
213214
console.log('\nWatching for file changes...');
214215
}
215216

216-
yargs
217+
yargs()
217218
.command({
218219
command: '$0',
219220
description: 'transpile TypeScript demos',
@@ -240,4 +241,4 @@ yargs
240241
.help()
241242
.strict(true)
242243
.version(false)
243-
.parse();
244+
.parse(hideBin(process.argv));

packages/mui-codemod/codemod.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
const childProcess = require('child_process');
44
const { promises: fs } = require('fs');
55
const path = require('path');
6-
const yargs = require('yargs');
6+
const yargs = require('yargs').default;
7+
const hideBin = require('yargs/helpers').hideBin;
78
const jscodeshiftPackage = require('jscodeshift/package.json');
89
const postcssCliPackage = require('postcss-cli/package.json');
910

@@ -165,7 +166,7 @@ function run(argv) {
165166
runPostcssTransform(codemod, files);
166167
}
167168

168-
yargs
169+
yargs()
169170
.command({
170171
command: '$0 <codemod> <paths...>',
171172
describe: 'Applies a `@mui/codemod` to the specified paths',
@@ -212,4 +213,4 @@ yargs
212213
.example('$0 v4.0.0/theme-spacing-api src')
213214
.example('$0 v5.0.0/component-rename-prop src -- --component=Grid --from=prop --to=newProp')
214215
.help()
215-
.parse();
216+
.parse(hideBin(process.argv));

packages/mui-codemod/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"jscodeshift-add-imports": "^1.0.11",
3737
"postcss": "^8.5.6",
3838
"postcss-cli": "^11.0.1",
39-
"yargs": "^17.7.2"
39+
"yargs": "^18.0.0"
4040
},
4141
"devDependencies": {
4242
"@types/chai": "^4.3.20",

packages/mui-icons-material/builder.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import * as svgo from 'svgo';
88
import { fileURLToPath } from 'url';
99
import intersection from 'lodash/intersection.js';
1010
import { Queue } from '@mui/internal-waterfall';
11+
import { hideBin } from 'yargs/helpers';
1112

1213
const currentDirectory = fileURLToPath(new URL('.', import.meta.url));
1314

@@ -297,7 +298,7 @@ const modulePath = path.resolve(fileURLToPath(import.meta.url));
297298
const isRunningDirectlyViaCLI = nodePath === modulePath;
298299

299300
if (isRunningDirectlyViaCLI) {
300-
yargs(process.argv.slice(2))
301+
yargs()
301302
.command({
302303
command: '$0>',
303304
description: "Build JSX components from SVG's.",
@@ -347,5 +348,5 @@ if (isRunningDirectlyViaCLI) {
347348
.help()
348349
.strict(true)
349350
.version(false)
350-
.parse();
351+
.parse(hideBin(process.argv));
351352
}

0 commit comments

Comments
 (0)