Skip to content

Commit

Permalink
feat: add CJS export for cz-commitlint
Browse files Browse the repository at this point in the history
relates to: #3850 (comment)

resolves #3949
  • Loading branch information
frantic1048 committed Mar 8, 2024
1 parent 67baff9 commit a6401ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions @commitlint/cz-commitlint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"version": "19.0.3",
"description": "Commitizen adapter using the commitlint.config.js",
"main": "./lib/index.js",
"exports": {
"import": "./lib/index.js",
"require": "./lib/index.cjs"
},
"files": [
"lib"
],
Expand Down
7 changes: 7 additions & 0 deletions @commitlint/cz-commitlint/src/index.cts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const esmPrompterPromise = import('./index.js');

export const prompter: Awaited<typeof esmPrompterPromise>['prompter'] = async (
...args
) => {
(await esmPrompterPromise).prompter(...args);
};

0 comments on commit a6401ba

Please sign in to comment.