@pplancq/commitlint-config 2.3.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/bin/init.mjs +15 -0
- package/index.js +2 -1
- package/package.json +6 -5
- package/bin/init.js +0 -8
package/README.md
CHANGED
|
@@ -23,3 +23,27 @@ npx init-commitlint-config
|
|
|
23
23
|
### @pplancq/commitlint-config
|
|
24
24
|
|
|
25
25
|
This is the default configuration. To use, add `"commitlint": { "extends": ["@pplancq/commitlint-config"] }` to your `package.json`.
|
|
26
|
+
|
|
27
|
+
## ⚠️ Breaking Change: ESM Only from v3
|
|
28
|
+
|
|
29
|
+
As of version 3.x, this package is ESM-only. CommonJS (`require`) is no longer supported.
|
|
30
|
+
|
|
31
|
+
## Migration from CommonJS to ESM
|
|
32
|
+
|
|
33
|
+
**Old (CommonJS) usage:**
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
// .commitlintrc.js or commitlint.config.js
|
|
37
|
+
module.exports = { extends: ['@pplancq/commitlint-config'] };
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**New (ESM) usage:**
|
|
41
|
+
|
|
42
|
+
```js
|
|
43
|
+
// commitlint.config.mjs (or commitlint.config.js when using "type": "module")
|
|
44
|
+
export default {
|
|
45
|
+
extends: ['@pplancq/commitlint-config'],
|
|
46
|
+
};
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If you are using a `.js` config file, ensure your environment supports ESM (e.g., Node.js >= 18, or set "type": "module" in your package.json).
|
package/bin/init.mjs
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { writeFileSync } from 'node:fs';
|
|
3
|
+
|
|
4
|
+
console.info('Add commitlint config in commitlint.config.mjs');
|
|
5
|
+
|
|
6
|
+
writeFileSync(
|
|
7
|
+
'commitlint.config.mjs',
|
|
8
|
+
`export default {
|
|
9
|
+
extends: ['@pplancq/commitlint-config'],
|
|
10
|
+
};
|
|
11
|
+
`,
|
|
12
|
+
{
|
|
13
|
+
encoding: 'utf-8',
|
|
14
|
+
},
|
|
15
|
+
);
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pplancq/commitlint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "pplancq commitlint config",
|
|
6
6
|
"author": "pplancq <paul.plancq@outlook.fr>",
|
|
@@ -24,25 +24,26 @@
|
|
|
24
24
|
"bugs": {
|
|
25
25
|
"url": "https://github.com/pplancq/dev-tools/issues"
|
|
26
26
|
},
|
|
27
|
+
"type": "module",
|
|
27
28
|
"main": "index.js",
|
|
28
29
|
"bin": {
|
|
29
|
-
"init-commitlint-config": "bin/init.
|
|
30
|
+
"init-commitlint-config": "bin/init.mjs"
|
|
30
31
|
},
|
|
31
32
|
"keywords": [
|
|
32
33
|
"commitlint",
|
|
33
34
|
"config"
|
|
34
35
|
],
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@commitlint/config-conventional": "^20.3.
|
|
37
|
+
"@commitlint/config-conventional": "^20.3.1"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
40
|
"@commitlint/cli": "^19.0.3 || ^20.0.0"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"eslint": "^9.39.2",
|
|
43
|
-
"eslint-plugin-prettier": "^5.5.
|
|
44
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
44
45
|
"lint-staged": "^16.2.7",
|
|
45
|
-
"prettier": "^3.
|
|
46
|
+
"prettier": "^3.8.1"
|
|
46
47
|
},
|
|
47
48
|
"engines": {
|
|
48
49
|
"node": ">=v18"
|
package/bin/init.js
DELETED