Skip to content

chore: inquirer v13#4682

Draft
escapedcat wants to merge 1 commit intochore/node22-dep-cleanupfrom
chore/inquirer-v13
Draft

chore: inquirer v13#4682
escapedcat wants to merge 1 commit intochore/node22-dep-cleanupfrom
chore/inquirer-v13

Conversation

@escapedcat
Copy link
Copy Markdown
Member

Fixes: #4554
Replaces: #4672

Users can now use inquirer v9, v10, v11, or v12.
v13 is excluded because it removes the "list" prompt type.

Closes #4554

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@escapedcat escapedcat changed the title Chore/inquirer v13 chore: inquirer v13 Apr 3, 2026
@escapedcat escapedcat marked this pull request as ready for review April 3, 2026 07:37
@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Upgrade to Node.js v22 and replace external dependencies with native APIs

✨ Enhancement 🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Upgrade minimum Node.js version from v18 to v22 across all packages
• Replace external dependencies with native Node.js built-in APIs
  - Replace glob and fast-glob with node:fs/promises glob
  - Replace minimist with node:util parseArgs
  - Replace fs-extra with node:fs/promises
  - Replace import-meta-resolve with native module resolution
• Widen cz-commitlint inquirer peer dependency to support v9-v12
• Update CI matrix to Node.js [22, 24] and add ubuntu-26.04
Diagram
flowchart LR
  A["Node.js v18 minimum"] -->|upgrade| B["Node.js v22 minimum"]
  C["External dependencies<br/>glob, minimist, fs-extra<br/>import-meta-resolve"] -->|replace| D["Native Node.js APIs<br/>node:fs, node:util<br/>module resolution"]
  E["inquirer ^9.0.0"] -->|widen| F["inquirer ^9-12"]
  B --> G["Updated CI matrix<br/>Node 22, 24<br/>Ubuntu 26.04"]
Loading

Grey Divider

File Changes

1. @commitlint/cli/src/cli.test.ts Dependencies +1/-1

Replace fs-extra with native fs/promises

@commitlint/cli/src/cli.test.ts


2. @commitlint/config-pnpm-scopes/index.ts Dependencies +16/-11

Replace fast-glob with native fs glob

@commitlint/config-pnpm-scopes/index.ts


3. @commitlint/ensure/src/index.test.ts Dependencies +4/-5

Replace glob with native fs globSync

@commitlint/ensure/src/index.test.ts


View more (55)
4. @commitlint/read/src/read.ts Dependencies +7/-2

Replace minimist with native util.parseArgs

@commitlint/read/src/read.ts


5. @commitlint/resolve-extends/src/index.ts Dependencies +9/-15

Replace import-meta-resolve with native resolution

@commitlint/resolve-extends/src/index.ts


6. @commitlint/rules/src/index.test.ts Dependencies +4/-5

Replace glob with native fs globSync

@commitlint/rules/src/index.test.ts


7. @packages/test/src/fix.ts Dependencies +4/-2

Replace fs-extra copy with native fs.cp

@packages/test/src/fix.ts


8. @packages/test/src/index.test.ts Dependencies +1/-1

Replace fs-extra with native fs module

@packages/test/src/index.test.ts


9. @packages/test/src/npm.ts Dependencies +11/-5

Replace fs-extra with native fs/promises

@packages/test/src/npm.ts


10. @commitlint/config-lerna-scopes/index.js Dependencies +11/-5

Replace fast-glob with native fs glob

@commitlint/config-lerna-scopes/index.js


11. @commitlint/config-patternplate/index.js Dependencies +6/-3

Replace glob with native fs/promises glob

@commitlint/config-patternplate/index.js


12. @commitlint/config-workspace-scopes/index.js Dependencies +5/-2

Replace glob with native fs globSync

@commitlint/config-workspace-scopes/index.js


13. .github/workflows/CI.yml ⚙️ Configuration changes +5/-5

Update CI matrix to Node 22, 24 and ubuntu-26.04

.github/workflows/CI.yml


14. .github/workflows/docs-deploy.yml ⚙️ Configuration changes +1/-1

Update Node.js version to 22 in docs deployment

.github/workflows/docs-deploy.yml


15. .husky/pre-commit ⚙️ Configuration changes +2/-2

Add --ignore-engines flag to yarn commands

.husky/pre-commit


16. .mise.toml ⚙️ Configuration changes +1/-1

Update Node.js version requirement to 22

.mise.toml


17. @commitlint/cli/package.json Dependencies +2/-3

Update engines and remove fs-extra dependency

@commitlint/cli/package.json


18. @commitlint/cz-commitlint/package.json Dependencies +2/-2

Widen inquirer peer dependency to v9-v12

@commitlint/cz-commitlint/package.json


19. @commitlint/read/package.json Dependencies +2/-4

Remove minimist dependency and update types

@commitlint/read/package.json


20. @commitlint/resolve-extends/package.json Dependencies +1/-2

Remove import-meta-resolve dependency

@commitlint/resolve-extends/package.json


21. @commitlint/config-lerna-scopes/package.json Dependencies +2/-3

Remove fast-glob dependency and update engines

@commitlint/config-lerna-scopes/package.json


22. @commitlint/config-pnpm-scopes/package.json Dependencies +2/-3

Remove fast-glob dependency and update engines

@commitlint/config-pnpm-scopes/package.json


23. @commitlint/config-patternplate/package.json Dependencies +1/-2

Remove glob dependency and update engines

@commitlint/config-patternplate/package.json


24. @commitlint/config-workspace-scopes/package.json Dependencies +2/-6

Remove glob dependency and update engines

@commitlint/config-workspace-scopes/package.json


25. @packages/test/package.json Dependencies +1/-3

Remove fs-extra dependency and update engines

@packages/test/package.json


26. Dockerfile.ci ⚙️ Configuration changes +2/-2

Update Node.js base image to version 22

Dockerfile.ci


27. README.md 📝 Documentation +1/-1

Update Node.js LTS requirement to v22

README.md


28. docs/guides/ci-setup.md 📝 Documentation +1/-1

Update Node.js version in CI setup example

docs/guides/ci-setup.md


29. package.json ⚙️ Configuration changes +1/-1

Update minimum Node.js engine requirement

package.json


30. @alias/commitlint-config-angular/package.json Additional files +1/-1

...

@alias/commitlint-config-angular/package.json


31. @alias/commitlint-config-lerna-scopes/package.json Additional files +1/-1

...

@alias/commitlint-config-lerna-scopes/package.json


32. @alias/commitlint-config-nx-scopes/package.json Additional files +1/-1

...

@alias/commitlint-config-nx-scopes/package.json


33. @alias/commitlint-config-patternplate/package.json Additional files +1/-1

...

@alias/commitlint-config-patternplate/package.json


34. @alias/commitlint/package.json Additional files +1/-1

...

@alias/commitlint/package.json


35. @commitlint/config-angular-type-enum/package.json Additional files +1/-1

...

@commitlint/config-angular-type-enum/package.json


36. @commitlint/config-angular/package.json Additional files +1/-1

...

@commitlint/config-angular/package.json


37. @commitlint/config-conventional/package.json Additional files +1/-1

...

@commitlint/config-conventional/package.json


38. @commitlint/config-nx-scopes/package.json Additional files +1/-1

...

@commitlint/config-nx-scopes/package.json


39. @commitlint/config-rush-scopes/package.json Additional files +1/-1

...

@commitlint/config-rush-scopes/package.json


40. @commitlint/config-validator/package.json Additional files +1/-1

...

@commitlint/config-validator/package.json


41. @commitlint/core/package.json Additional files +1/-1

...

@commitlint/core/package.json


42. @commitlint/ensure/package.json Additional files +2/-3

...

@commitlint/ensure/package.json


43. @commitlint/execute-rule/package.json Additional files +1/-1

...

@commitlint/execute-rule/package.json


44. @commitlint/format/package.json Additional files +1/-1

...

@commitlint/format/package.json


45. @commitlint/is-ignored/package.json Additional files +1/-1

...

@commitlint/is-ignored/package.json


46. @commitlint/lint/package.json Additional files +1/-1

...

@commitlint/lint/package.json


47. @commitlint/load/package.json Additional files +2/-2

...

@commitlint/load/package.json


48. @commitlint/message/package.json Additional files +1/-1

...

@commitlint/message/package.json


49. @commitlint/parse/package.json Additional files +1/-1

...

@commitlint/parse/package.json


50. @commitlint/prompt-cli/package.json Additional files +1/-1

...

@commitlint/prompt-cli/package.json


51. @commitlint/prompt/package.json Additional files +1/-1

...

@commitlint/prompt/package.json


52. @commitlint/rules/package.json Additional files +2/-3

...

@commitlint/rules/package.json


53. @commitlint/to-lines/package.json Additional files +1/-1

...

@commitlint/to-lines/package.json


54. @commitlint/top-level/package.json Additional files +1/-1

...

@commitlint/top-level/package.json


55. @commitlint/travis-cli/package.json Additional files +1/-1

...

@commitlint/travis-cli/package.json


56. @commitlint/types/package.json Additional files +1/-1

...

@commitlint/types/package.json


57. @packages/test-environment/package.json Additional files +1/-1

...

@packages/test-environment/package.json


58. @packages/utils/package.json Additional files +1/-1

...

@packages/utils/package.json


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review bot commented Apr 3, 2026

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📎 Requirement gaps (1) 🎨 UX Issues (0)

Grey Divider


Action required

1. inquirer peerDep still v9 📎 Requirement gap ≡ Correctness
Description
@commitlint/cz-commitlint still lists inquirer ^9.0.0 and does not include the latest
supported major (v13), and its README continues to instruct installing inquirer@9, creating
outdated/conflicting guidance. This violates the requirement to update peer dependency guidance away
from inquirer@9 toward inquirer@latest (or equivalent).
Code

@commitlint/cz-commitlint/package.json[55]

+    "inquirer": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0"
Evidence
PR Compliance ID 1 requires updating @commitlint/cz-commitlint peer dependency guidance so it no
longer specifies inquirer@9 and instead reflects the latest supported Inquirer. The changed peer
dependency line still includes ^9.0.0 (and omits v13), while the package README still tells users
to install inquirer@9, resulting in outdated/ambiguous guidance.

Update @commitlint/cz-commitlint peerDependency reference from inquirer@9 to inquirer@latest (docs and/or package metadata)
@commitlint/cz-commitlint/package.json[53-56]
@commitlint/cz-commitlint/README.md[11-19]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`@commitlint/cz-commitlint` still references `inquirer@9` in both package metadata and docs, and the peer dependency range does not reflect the latest supported Inquirer major (v13).

## Issue Context
Compliance requires removing `inquirer@9` guidance and updating to `inquirer@latest` (or equivalent wording indicating latest supported Inquirer).

## Fix Focus Areas
- @commitlint/cz-commitlint/package.json[53-56]
- @commitlint/cz-commitlint/README.md[11-19]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Windows symlink regression 🐞 Bug ☼ Reliability
Description
@packages/test installModules now uses node:fs/promises (instead of fs-extra) but still creates
dependency directory links via fs.symlink() without an explicit directory link type, which can fail
on Windows. This can break npm.bootstrap()-based tests, and the CI matrix runs tests on
windows-2022/windows-2025.
Code

@packages/test/src/npm.ts[4]

+import fs from "node:fs/promises";
Evidence
The PR switches the fs implementation to node:fs/promises while keeping the same directory-symlink
behavior: installModules computes sourcePath as a package directory, then calls
fs.symlink(sourcePath, targetPath). installModules is invoked by npm.bootstrap(), which is used by
multiple package test suites. CI explicitly runs the test job on Windows runners, so any
Windows-incompatible symlink behavior will fail the pipeline.

@packages/test/src/npm.ts[1-89]
@commitlint/config-workspace-scopes/index.test.js[54-86]
.github/workflows/CI.yml[16-42]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`@packages/test` switched from `fs-extra` to `node:fs/promises`, but `installModules()` still creates symlinks for **package directories** using `fs.symlink(sourcePath, targetPath)` without specifying a directory-safe link type for Windows. This can cause failures when tests/fixtures call `npm.bootstrap()` on Windows CI.

### Issue Context
- `installModules()` symlinks package directories into `<cwd>/node_modules`.
- `npm.bootstrap()` calls `installModules()` and is used widely by package tests.
- CI runs tests on Windows runners.

### Fix Focus Areas
- @packages/test/src/npm.ts[11-83]

### Suggested fix
- Detect whether `sourcePath` is a directory (e.g., `await fs.lstat(sourcePath)`), and when on Windows (`process.platform === "win32"`) pass an explicit directory type (commonly `"junction"`) to `fs.symlink()`.
- While touching this code, consider replacing `fs.mkdir(path.join(targetPath, ".."), { recursive: true })` with `fs.mkdir(path.dirname(targetPath), { recursive: true })` for clarity (optional).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@escapedcat escapedcat changed the base branch from master to chore/node22-dep-cleanup April 3, 2026 07:39
"peerDependencies": {
"commitizen": "^4.0.3",
"inquirer": "^9.0.0"
"inquirer": "^9.0.0 || ^10.0.0 || ^11.0.0 || ^12.0.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. inquirer peerdep still v9 📎 Requirement gap ≡ Correctness

@commitlint/cz-commitlint still lists inquirer ^9.0.0 and does not include the latest
supported major (v13), and its README continues to instruct installing inquirer@9, creating
outdated/conflicting guidance. This violates the requirement to update peer dependency guidance away
from inquirer@9 toward inquirer@latest (or equivalent).
Agent Prompt
## Issue description
`@commitlint/cz-commitlint` still references `inquirer@9` in both package metadata and docs, and the peer dependency range does not reflect the latest supported Inquirer major (v13).

## Issue Context
Compliance requires removing `inquirer@9` guidance and updating to `inquirer@latest` (or equivalent wording indicating latest supported Inquirer).

## Fix Focus Areas
- @commitlint/cz-commitlint/package.json[53-56]
- @commitlint/cz-commitlint/README.md[11-19]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@knocte
Copy link
Copy Markdown
Contributor

knocte commented Apr 3, 2026

LGTM

@knocte
Copy link
Copy Markdown
Contributor

knocte commented Apr 3, 2026

But why is CI "broken"?

@escapedcat
Copy link
Copy Markdown
Member Author

But why is CI "broken"?

Ubuntu 26.04 is not available yet

@knocte
Copy link
Copy Markdown
Contributor

knocte commented Apr 3, 2026

Yeah, so why is that on CI?

I don't see the 26.04 entry in the workflows actually. I'm confused.

@escapedcat escapedcat marked this pull request as draft April 3, 2026 11:39
@escapedcat
Copy link
Copy Markdown
Member Author

Ah, switched to draft
It'a all based on #4679
Will create more drafts that will be merged step by step when 26.04 is out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

feat: Update @commitlint/cz-commitlint peerDependency on inquirer@9 to inquirer@latest

2 participants