Skip to content

Commit b2288cd

Browse files
authoredJun 21, 2022
fix: ensure that we can define dependency argument in config (#743)
Fixes: #742
1 parent 76b06f2 commit b2288cd

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed
 

‎README.md

+2
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ Or you can also set them in the `package.json`, so that you avoid having to rety
7474
{
7575
"vsce": {
7676
"baseImagesUrl": "https://my.custom/base/images/url"
77+
"dependencies": true,
78+
"yarn": false
7779
}
7880
}
7981
```

‎src/main.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ module.exports = function (argv: string[]): void {
7070
undefined
7171
)
7272
.option('--ignoreFile <path>', 'Indicate alternative .vscodeignore')
73-
.option('--no-dependencies', 'Disable dependency detection via npm or yarn')
73+
// default must remain undefined for dependencies or we will fail to load defaults from package.json
74+
.option('--dependencies', 'Enable dependency detection via npm or yarn', undefined)
75+
.option('--no-dependencies', 'Disable dependency detection via npm or yarn', undefined)
7476
.action(({ yarn, packagedDependencies, ignoreFile, dependencies }) =>
7577
main(ls({ useYarn: yarn, packagedDependencies, ignoreFile, dependencies }))
7678
);
@@ -102,6 +104,8 @@ module.exports = function (argv: string[]): void {
102104
.option('--ignoreFile <path>', 'Indicate alternative .vscodeignore')
103105
.option('--no-gitHubIssueLinking', 'Disable automatic expansion of GitHub-style issue syntax into links')
104106
.option('--no-gitLabIssueLinking', 'Disable automatic expansion of GitLab-style issue syntax into links')
107+
// default must remain undefined for dependencies or we will fail to load defaults from package.json
108+
.option('--dependencies', 'Enable dependency detection via npm or yarn', undefined)
105109
.option('--no-dependencies', 'Disable dependency detection via npm or yarn')
106110
.option('--pre-release', 'Mark this package as a pre-release')
107111
.option('--allow-star-activation', 'Allow using * in activation events')
@@ -185,7 +189,9 @@ module.exports = function (argv: string[]): void {
185189
.option('--no-yarn', 'Use npm instead of yarn (default inferred from lack of yarn.lock or .yarnrc)')
186190
.option('--noVerify')
187191
.option('--ignoreFile <path>', 'Indicate alternative .vscodeignore')
188-
.option('--no-dependencies', 'Disable dependency detection via npm or yarn')
192+
// default must remain undefined for dependencies or we will fail to load defaults from package.json
193+
.option('--dependencies', 'Enable dependency detection via npm or yarn', undefined)
194+
.option('--no-dependencies', 'Disable dependency detection via npm or yarn', undefined)
189195
.option('--pre-release', 'Mark this package as a pre-release')
190196
.option('--allow-star-activation', 'Allow using * in activation events')
191197
.option('--allow-missing-repository', 'Allow missing a repository URL in package.json')

0 commit comments

Comments
 (0)
Please sign in to comment.