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(deps): support for yargs>=17.1.0. #129

Merged
merged 2 commits into from Oct 6, 2021
Merged
Show file tree
Hide file tree
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
19 changes: 13 additions & 6 deletions bin/d2l-license-checker
Expand Up @@ -16,10 +16,17 @@ const OverrideHelper = require('../lib/override-helper');

const defaultConfigFilePath = '.licensechecker.json';
const argv = require('yargs')
.usage(
'$0 [project-path [config-file-path]]\n\n' +
' If no project path is given, the current directory with be used\n' +
` If no config path is given, the file <project-path>/${defaultConfigFilePath} will be used as default.`)
.usage('$0 [project-path] [config-file-path]', '', yargs => {
yargs
.positional('project-path', {
describe: 'Path to the project from current directory.',
defaultDescription: 'current directory.'
})
.positional('config-file-path', {
describe: 'Path to configuration file from current directory.',
defaultDescription: `<project-path>/${defaultConfigFilePath}`
})
})
.help('h')
.alias('h', 'help')
.alias('t', 'generate-template')
Expand All @@ -32,8 +39,8 @@ const argv = require('yargs')
.boolean(['d', 'p', 't'])
.strict()
.argv;
const projectDir = argv._[0] || process.cwd();
const configFilePath = path.resolve(argv._[1] || path.join(projectDir, defaultConfigFilePath));
const projectDir = argv.projectPath || process.cwd();
const configFilePath = path.resolve(argv.configFilePath || path.join(projectDir, defaultConfigFilePath));
const configAcceptedEntries = ['manualOverrides', 'acceptedScopes', 'ignoreUnusedManualOverrides'];
const spdxExceptions = ['Public-Domain', 'Project-Owner'];
const specialExemptionPrefix = 'D2L-Open-Source-Special-Exemption';
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -23,7 +23,7 @@
"semver": "^7.3.5",
"spdx-license-ids": "^3.0.10",
"spdx-satisfies": "^5.0.1",
"yargs": "17.0.1"
"yargs": "^17.2.1"
},
"devDependencies": {
"chai": "^4.3.4",
Expand Down