Skip to content

Commit 13eeacf

Browse files
authored
fix: check when expression correctly (#69)
1 parent 4ddbf36 commit 13eeacf

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.changeset/proud-masks-kiss.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@alauda/doom": patch
3+
---
4+
5+
fix: check `when` expression correctly

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"version": "changeset version && yarn --no-immutable"
5858
},
5959
"dependencies": {
60-
"@cspell/eslint-plugin": "^9.0.2",
60+
"@cspell/eslint-plugin": "^8.19.4 || ^9.0.2",
6161
"@eslint-react/eslint-plugin": "^1.51.0",
6262
"@inquirer/prompts": "^7.5.3",
6363
"@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
@@ -98,6 +98,7 @@
9898
"swagger2openapi": "^7.0.8",
9999
"tinyglobby": "^0.2.14",
100100
"type-fest": "^4.41.0",
101+
"typescript": "^5.8.3",
101102
"typescript-eslint": "^8.33.1",
102103
"x-fetch": "^0.2.6",
103104
"yaml": "^2.8.0",
@@ -129,7 +130,6 @@
129130
"prettier-plugin-properties": "^0.3.0",
130131
"simple-git-hooks": "^2.13.0",
131132
"type-coverage": "^2.29.7",
132-
"typescript": "^5.8.3",
133133
"yarn-berry-deduplicate": "^6.1.3"
134134
},
135135
"publishConfig": {

src/cli/new.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export const newCommand = new Command('new')
221221
const target = path.resolve(render(layout.target, { parameters }))
222222
const when = layout.when && render(layout.when, { parameters })
223223

224-
if (JS_STR_FALSY_VALUES.has(when)) {
224+
if (when != null && JS_STR_FALSY_VALUES.has(when)) {
225225
continue
226226
}
227227

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ __metadata:
1111
dependencies:
1212
"@changesets/changelog-github": "npm:^0.5.1"
1313
"@changesets/cli": "npm:^2.29.4"
14-
"@cspell/eslint-plugin": "npm:^9.0.2"
14+
"@cspell/eslint-plugin": "npm:^8.19.4 || ^9.0.2"
1515
"@eslint-react/eslint-plugin": "npm:^1.51.0"
1616
"@eslint/js": "npm:^9.28.0"
1717
"@inquirer/prompts": "npm:^7.5.3"
@@ -1154,7 +1154,7 @@ __metadata:
11541154
languageName: node
11551155
linkType: hard
11561156

1157-
"@cspell/eslint-plugin@npm:^9.0.2":
1157+
"@cspell/eslint-plugin@npm:^8.19.4 || ^9.0.2":
11581158
version: 9.0.2
11591159
resolution: "@cspell/eslint-plugin@npm:9.0.2"
11601160
dependencies:

0 commit comments

Comments
 (0)