Skip to content

Commit 3d5c697

Browse files
authored
chore: use prompts and remove enquirer (#3812)
1 parent b3857f2 commit 3d5c697

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
"chalk": "^4.1.1",
3636
"conventional-changelog-cli": "^2.1.1",
3737
"cross-env": "^7.0.3",
38-
"enquirer": "^2.3.6",
3938
"eslint": "^7.28.0",
4039
"eslint-define-config": "^1.0.8",
4140
"eslint-plugin-node": "^11.1.0",
@@ -48,6 +47,7 @@
4847
"npm-run-all": "^4.1.5",
4948
"playwright-chromium": "^1.12.2",
5049
"prettier": "2.3.1",
50+
"prompts": "^2.4.1",
5151
"rimraf": "^3.0.2",
5252
"semver": "^7.3.5",
5353
"sirv": "^1.0.12",

packages/create-app/template-svelte-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
"typescript": "^4.3.2",
1818
"vite": "^2.3.7"
1919
}
20-
}
20+
}

packages/create-app/template-svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
"svelte": "^3.37.0",
1212
"vite": "^2.3.7"
1313
}
14-
}
14+
}

packages/vite/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@
9797
"debug": "^4.3.2",
9898
"dotenv": "^8.6.0",
9999
"dotenv-expand": "^5.1.0",
100-
"enquirer": "^2.3.6",
101100
"es-module-lexer": "^0.4.1",
102101
"estree-walker": "^2.0.2",
103102
"etag": "^1.8.1",

scripts/release.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const fs = require('fs')
99
const args = require('minimist')(process.argv.slice(2))
1010
const semver = require('semver')
1111
const chalk = require('chalk')
12-
const { prompt } = require('enquirer')
12+
const prompts = require('prompts')
1313

1414
const pkgDir = process.cwd()
1515
const pkgPath = path.resolve(pkgDir, 'package.json')
@@ -77,21 +77,22 @@ async function main() {
7777
/**
7878
* @type {{ release: string }}
7979
*/
80-
const { release } = await prompt({
80+
const { release } = await prompts({
8181
type: 'select',
8282
name: 'release',
8383
message: 'Select release type',
8484
choices: versionIncrements
8585
.map((i) => `${i} (${inc(i)})`)
8686
.concat(['custom'])
87+
.map((i) => ({ value: i, title: i }))
8788
})
8889

8990
if (release === 'custom') {
9091
/**
9192
* @type {{ version: string }}
9293
*/
93-
const res = await prompt({
94-
type: 'input',
94+
const res = await prompts({
95+
type: 'text',
9596
name: 'version',
9697
message: 'Input custom version',
9798
initial: currentVersion
@@ -113,7 +114,7 @@ async function main() {
113114
/**
114115
* @type {{ tagBeta: boolean }}
115116
*/
116-
const { tagBeta } = await prompt({
117+
const { tagBeta } = await prompts({
117118
type: 'confirm',
118119
name: 'tagBeta',
119120
message: `Publish under dist-tag "beta"?`
@@ -125,7 +126,7 @@ async function main() {
125126
/**
126127
* @type {{ yes: boolean }}
127128
*/
128-
const { yes } = await prompt({
129+
const { yes } = await prompts({
129130
type: 'confirm',
130131
name: 'yes',
131132
message: `Releasing ${tag}. Confirm?`

0 commit comments

Comments
 (0)