We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01990c6 commit 89a64b9Copy full SHA for 89a64b9
1 file changed
src/commands/cdxgen.ts
@@ -24,7 +24,7 @@ const {
24
const toLower = (arg: string) => arg.toLowerCase()
25
const arrayToLower = (arg: string[]) => arg.map(toLower)
26
27
-const nodejsPlatformTypes = [
+const nodejsPlatformTypes = new Set([
28
'javascript',
29
'js',
30
'nodejs',
@@ -33,7 +33,7 @@ const nodejsPlatformTypes = [
33
'ts',
34
'tsx',
35
'typescript'
36
-]
+])
37
38
const yargsConfig = {
39
configuration: {
@@ -168,7 +168,7 @@ export const cdxgen: CliSubcommand = {
168
let cleanupPackageLock = false
169
if (
170
yargv.type !== 'yarn' &&
171
- nodejsPlatformTypes.includes(yargv.type) &&
+ nodejsPlatformTypes.has(yargv.type) &&
172
existsSync('./yarn.lock')
173
) {
174
if (existsSync('./package-lock.json')) {
0 commit comments