Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: console show DeprecationWarning info when use @commitlint\[email protected] #3952

Closed
4 tasks
liangskyli opened this issue Mar 5, 2024 · 0 comments · Fixed by #3953
Closed
4 tasks
Labels

Comments

@liangskyli
Copy link

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/@[email protected]/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\[email protected])

Affected packages

  • cli
  • core
  • prompt
  • config-angular

Possible Solution

@commitlint\[email protected]
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

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

Successfully merging a pull request may close this issue.

1 participant