Skip to content

Commit

Permalink
fix: ensure that we can define dependency argument in config (#743)
Browse files Browse the repository at this point in the history
Fixes: #742
  • Loading branch information
ssbarnea authored Jun 21, 2022
1 parent 76b06f2 commit b2288cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ Or you can also set them in the `package.json`, so that you avoid having to rety
{
"vsce": {
"baseImagesUrl": "https://my.custom/base/images/url"
"dependencies": true,
"yarn": false
}
}
```
Expand Down
10 changes: 8 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ module.exports = function (argv: string[]): void {
undefined
)
.option('--ignoreFile <path>', 'Indicate alternative .vscodeignore')
.option('--no-dependencies', 'Disable dependency detection via npm or yarn')
// default must remain undefined for dependencies or we will fail to load defaults from package.json
.option('--dependencies', 'Enable dependency detection via npm or yarn', undefined)
.option('--no-dependencies', 'Disable dependency detection via npm or yarn', undefined)
.action(({ yarn, packagedDependencies, ignoreFile, dependencies }) =>
main(ls({ useYarn: yarn, packagedDependencies, ignoreFile, dependencies }))
);
Expand Down Expand Up @@ -102,6 +104,8 @@ module.exports = function (argv: string[]): void {
.option('--ignoreFile <path>', 'Indicate alternative .vscodeignore')
.option('--no-gitHubIssueLinking', 'Disable automatic expansion of GitHub-style issue syntax into links')
.option('--no-gitLabIssueLinking', 'Disable automatic expansion of GitLab-style issue syntax into links')
// default must remain undefined for dependencies or we will fail to load defaults from package.json
.option('--dependencies', 'Enable dependency detection via npm or yarn', undefined)
.option('--no-dependencies', 'Disable dependency detection via npm or yarn')
.option('--pre-release', 'Mark this package as a pre-release')
.option('--allow-star-activation', 'Allow using * in activation events')
Expand Down Expand Up @@ -185,7 +189,9 @@ module.exports = function (argv: string[]): void {
.option('--no-yarn', 'Use npm instead of yarn (default inferred from lack of yarn.lock or .yarnrc)')
.option('--noVerify')
.option('--ignoreFile <path>', 'Indicate alternative .vscodeignore')
.option('--no-dependencies', 'Disable dependency detection via npm or yarn')
// default must remain undefined for dependencies or we will fail to load defaults from package.json
.option('--dependencies', 'Enable dependency detection via npm or yarn', undefined)
.option('--no-dependencies', 'Disable dependency detection via npm or yarn', undefined)
.option('--pre-release', 'Mark this package as a pre-release')
.option('--allow-star-activation', 'Allow using * in activation events')
.option('--allow-missing-repository', 'Allow missing a repository URL in package.json')
Expand Down

0 comments on commit b2288cd

Please sign in to comment.