Skip to content

Commit 0efa7a3

Browse files
authored
chore: drop direct dependency on inquirer (#912)
1 parent 3dfe005 commit 0efa7a3

File tree

5 files changed

+5
-9
lines changed

5 files changed

+5
-9
lines changed

lib/router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import pkg from './utils/project-package.js';
1616
export default class Router {
1717
/** @type {import('yeoman-environment').default} */
1818
env;
19-
/** @type {import('@yeoman/adapter').TerminalAdapter} */
19+
/** @type {import('@yeoman/adapter/types').InputOutputAdapter} */
2020
adapter;
2121

2222
constructor({adapter, env, config}) {

lib/routes/clear-config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import _ from 'lodash';
22
import chalk from 'chalk';
3-
import inquirer from 'inquirer';
43
import globalConfig from '../utils/global-config.js';
54
import {namespaceToName} from '../utils/namespace.js';
65

@@ -40,7 +39,7 @@ export const clearConfig = async app => {
4039
}).compact().sortBy(generatorName => generatorName.sort).value();
4140

4241
if (generatorList.length > 0) {
43-
generatorList.push(new inquirer.Separator());
42+
generatorList.push(app.adapter.separator?.());
4443
defaultChoices.unshift({
4544
name: 'Clear all',
4645
value: '*',

lib/routes/home.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import _ from 'lodash';
22
import chalk from 'chalk';
33
import fullname from 'fullname';
4-
import inquirer from 'inquirer';
54
import {namespaceToName} from '../utils/namespace.js';
65
import globalConfig from '../utils/global-config.js';
76

@@ -62,11 +61,11 @@ export const home = async app => {
6261
type: 'list',
6362
message: `${allo}What would you like to do?`,
6463
choices: [
65-
new inquirer.Separator('Run a generator'),
64+
app.adapter.separator?.('Run a generator'),
6665
generatorList,
67-
new inquirer.Separator(),
66+
app.adapter.separator?.(),
6867
defaultChoices,
69-
new inquirer.Separator(),
68+
app.adapter.separator?.(),
7069
].flat(),
7170
}]).then(answer => {
7271
if (answer.whatNext.method === 'run') {

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"fullname": "^5.0.0",
5454
"global-agent": "^3.0.0",
5555
"humanize-string": "^3.1.0",
56-
"inquirer": "^12.9.6",
5756
"lodash": "^4.17.21",
5857
"meow": "^14.0.0",
5958
"npm-keyword": "^8.0.0",

0 commit comments

Comments
 (0)