Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix traverse script after yargs upgrade #11990

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 4 additions & 6 deletions scripts/traverse.js
Expand Up @@ -12,13 +12,13 @@ const { argv } = require('yargs').command(
})
.positional('folder', {
describe: 'The folder(s) to test (set to "all" for all folders)',
type: 'array',
type: 'string',
default: 'all',
})
.positional('value', {
describe: 'The value(s) to test against',
type: 'array',
default: ['null', 'true'],
type: 'string',
default: 'null,true',
})
.option('depth', {
alias: 'd',
Expand Down Expand Up @@ -79,9 +79,7 @@ const folders =
'xslt',
]
: argv.folder.split(',');
const values = Array.isArray(argv.value)
? argv.value
: argv.value.toString().split(',');
const values = argv.value.split(',');

for (const folder in folders)
traverseFeatures(bcd[folders[folder]], argv.depth, `${folders[folder]}.`);
Expand Down