@programinglive/commiter 1.0.0 โ†’ 1.0.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.0.2](https://github.com/programinglive/commiter/compare/v1.0.1...v1.0.2) (2025-10-19)
6
+
7
+ ### [1.0.1](https://github.com/programinglive/commiter/compare/v1.0.0...v1.0.1) (2025-10-18)
8
+
9
+
10
+ ### ๐Ÿ› Bug Fixes
11
+
12
+ * align commitlint config with project module type ([d051eac](https://github.com/programinglive/commiter/commit/d051eace5471d0c54fd8de6a3bede6a0df020dad))
13
+
5
14
  ## 1.0.0 (2025-10-17)
6
15
 
7
16
 
package/index.js CHANGED
@@ -60,10 +60,20 @@ function setupCommiter() {
60
60
  // Write updated package.json
61
61
  fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n');
62
62
 
63
- // Create commitlint config
64
- console.log('โš™๏ธ Creating commitlint config...');
65
- const commitlintConfig = `module.exports = { extends: ['@commitlint/config-conventional'] };\n`;
66
- fs.writeFileSync('commitlint.config.js', commitlintConfig);
63
+ // Determine commitlint config format based on project module type
64
+ const isEsmProject = packageJson.type === 'module';
65
+ const commitlintConfigFile = isEsmProject ? 'commitlint.config.js' : 'commitlint.config.cjs';
66
+ const commitlintConfigContent = isEsmProject
67
+ ? `export default { extends: ['@commitlint/config-conventional'] }\n`
68
+ : `module.exports = { extends: ['@commitlint/config-conventional'] }\n`;
69
+
70
+ const legacyCommitlintConfigFile = isEsmProject ? 'commitlint.config.cjs' : 'commitlint.config.js';
71
+ if (fs.existsSync(legacyCommitlintConfigFile)) {
72
+ fs.rmSync(legacyCommitlintConfigFile);
73
+ }
74
+
75
+ console.log(`โš™๏ธ Creating commitlint config (${commitlintConfigFile})...`);
76
+ fs.writeFileSync(commitlintConfigFile, commitlintConfigContent);
67
77
 
68
78
  // Initialize Husky
69
79
  console.log('๐Ÿถ Setting up Husky...');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@programinglive/commiter",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Commit convention tooling for standard-version releases with beautiful changelogs",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -39,17 +39,50 @@
39
39
  "standard-version": {
40
40
  "releaseCommitMessageFormat": "chore(release): {{currentTag}} ๐Ÿš€",
41
41
  "types": [
42
- { "type": "feat", "section": "โœจ Features" },
43
- { "type": "fix", "section": "๐Ÿ› Bug Fixes" },
44
- { "type": "perf", "section": "โšก Performance" },
45
- { "type": "refactor", "section": "โ™ป๏ธ Refactors" },
46
- { "type": "docs", "section": "๐Ÿ“ Documentation" },
47
- { "type": "style", "section": "๐Ÿ’„ Styles" },
48
- { "type": "test", "section": "โœ… Tests" },
49
- { "type": "build", "section": "๐Ÿ—๏ธ Build System" },
50
- { "type": "ci", "section": "๐Ÿ‘ท Continuous Integration" },
51
- { "type": "chore", "section": "๐Ÿงน Chores" },
52
- { "type": "revert", "section": "โช Reverts" }
42
+ {
43
+ "type": "feat",
44
+ "section": "โœจ Features"
45
+ },
46
+ {
47
+ "type": "fix",
48
+ "section": "๐Ÿ› Bug Fixes"
49
+ },
50
+ {
51
+ "type": "perf",
52
+ "section": "โšก Performance"
53
+ },
54
+ {
55
+ "type": "refactor",
56
+ "section": "โ™ป๏ธ Refactors"
57
+ },
58
+ {
59
+ "type": "docs",
60
+ "section": "๐Ÿ“ Documentation"
61
+ },
62
+ {
63
+ "type": "style",
64
+ "section": "๐Ÿ’„ Styles"
65
+ },
66
+ {
67
+ "type": "test",
68
+ "section": "โœ… Tests"
69
+ },
70
+ {
71
+ "type": "build",
72
+ "section": "๐Ÿ—๏ธ Build System"
73
+ },
74
+ {
75
+ "type": "ci",
76
+ "section": "๐Ÿ‘ท Continuous Integration"
77
+ },
78
+ {
79
+ "type": "chore",
80
+ "section": "๐Ÿงน Chores"
81
+ },
82
+ {
83
+ "type": "revert",
84
+ "section": "โช Reverts"
85
+ }
53
86
  ]
54
87
  },
55
88
  "devDependencies": {