conventional-changelog / commitlint

📓 Lint commit messages

Home Page:https://commitlint.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fix: console show DeprecationWarning info when use @commitlint\config-pnpm-scopes@19.0.0

liangskyli opened this issue · comments

Steps to Reproduce

1. First step
use packages:
"@commitlint/cli": "^19.0.3",
"@commitlint/config-conventional": "^19.0.3",
"@commitlint/config-pnpm-scopes": "^19.0.0",
2. Second step
exec: pnpm commitlint
console show DeprecationWarning info:
(node:18220) [DEP0151] DeprecationWarning: No "main" or "exports" field defined in the package.json for xxx\node_modules\@commitlint\config-pnpm-scopes\ resolving the main entry point "index.js", imported from xxx\@commitlint\config-pnpm-scopes.
Default "index" lookups for the main are deprecated for ES modules.

log output position: @commitlint/resolve-extends => dependencies "import-meta-resolve": "^4.0.0", path:node_modules/.pnpm/@commitlint+resolve-extends@19.0.3/node_modules/import-meta-resolve/lib/resolve.js

Current Behavior

No response

Expected Behavior

DeprecationWarning info not show, "main" or "exports" field should defined in the package.json (@commitlint\config-pnpm-scopes@19.0.0)

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

@commitlint\config-pnpm-scopes@19.0.0
package.json add "main" or "exports" field

Context

No response

commitlint --version

"@commitlint/config-pnpm-scopes": "^19.0.0",

git --version

2.26.0.windows.1

node --version

v18