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

refactor: port config-conventional to ts #3881

Merged

Conversation

Mersho
Copy link
Contributor

@Mersho Mersho commented Jan 30, 2024

No description provided.

@escapedcat escapedcat merged commit 345bcf5 into conventional-changelog:master Jan 30, 2024
5 checks passed
@escapedcat
Copy link
Member

Thanks!

@@ -2,8 +2,9 @@
"name": "@commitlint/config-conventional",
"version": "18.6.0",
"description": "Shareable commitlint config enforcing conventional commits",
"main": "lib/index.js",
Copy link

@jerome-benoit jerome-benoit Feb 13, 2024

Choose a reason for hiding this comment

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

@escapedcat, @Mersho: That change breaks ESM and CommonJS usage of '@commitlint/config-conventional':

  • the generated file is ESM, but the documentation is using CommonJS syntax
  • repo defaulting to ESM can't import: no properly filled exports field in package.json

Replacing it by:

"exports": {
    ".": {
      "types": "./lib/index.d.ts",
      "require": "./lib/index.js",
      "import": "./lib/index.js"
    }
  }

makes things better for ESM but still breaks CommonJS: the dependency code expected syntax is in CommonJS and its default syntax for exported files is ESM ...

Please generate exported files according to the default syntax chosen, CommonJS, and then wrap to ESM, and then use exports field only in package.json.

Copy link

@nwrkbiz nwrkbiz Feb 13, 2024

Choose a reason for hiding this comment

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

Breaking change for converntional-commits cli: #3909

Copy link
Contributor

Choose a reason for hiding this comment

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

@jerome-benoit can I ask you for a review on #3911? 🙏

@escapedcat
Copy link
Member

@Mersho can you have a look?

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.

6 participants