@cluerise/tools 5.2.2 → 5.3.1

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.
@@ -1 +1 @@
1
- v24.4.1
1
+ v24.9.0
@@ -45,6 +45,9 @@ hooks/*
45
45
  *.svg
46
46
  *.webp
47
47
 
48
+ # Lingui
49
+ *.po
50
+
48
51
  # Lock files
49
52
  pnpm-lock.yaml
50
53
  package-lock.json
@@ -60,5 +63,8 @@ etc/
60
63
  # Stryker
61
64
  .stryker-tmp/
62
65
 
66
+ # Swift
67
+ *.swift
68
+
63
69
  # Tests coverage
64
70
  coverage/
@@ -7,7 +7,6 @@ export const defaultReleaseRules = [
7
7
  { type: 'fix', release: 'patch' },
8
8
  { type: 'perf', release: 'minor' },
9
9
  { type: 'deps', release: false },
10
- { type: 'deps', scope: 'prod', release: 'patch' },
11
10
  { type: 'refactor', release: false },
12
11
  { type: 'docs', release: false },
13
12
  { type: 'chore', release: false },
@@ -20,8 +19,7 @@ export const defaultReleaseRules = [
20
19
  export const defaultChangelogTypes = [
21
20
  { type: 'feat', section: 'Features' },
22
21
  { type: 'fix', section: 'Fixes' },
23
- { type: 'perf', section: 'Performance improvements' },
24
- { type: 'deps', scope: 'prod', section: 'Dependency updates' }
22
+ { type: 'perf', section: 'Performance improvements' }
25
23
  ];
26
24
 
27
25
  const getRepositoryUrl = (path) => {
@@ -38,58 +36,74 @@ export const createReleaseConfig = ({
38
36
  repository,
39
37
  path = '',
40
38
  tagFormat,
41
- releaseRules = defaultReleaseRules,
42
- changelogTypes = defaultChangelogTypes
43
- }) => ({
44
- extends: [Path.join(import.meta.dirname, 'release-cwd.config.cjs')],
45
- branches: ['main'],
46
- repositoryUrl: getRepositoryUrl(path),
47
- tagFormat,
48
- preset: 'conventionalcommits',
49
- dryRun: true,
50
-
51
- plugins: [
52
- [
53
- '@semantic-release/commit-analyzer',
54
- {
55
- releaseRules
56
- }
57
- ],
58
- [
59
- '@semantic-release/release-notes-generator',
60
- {
61
- host,
62
- presetConfig: {
63
- types: changelogTypes
64
- },
65
- writerOpts: {
66
- commitGroupsSort: ({ title: titleA }, { title: titleB }) => {
67
- const indexA = changelogTypes.findIndex(({ section }) => section === titleA);
68
- const indexB = changelogTypes.findIndex(({ section }) => section === titleB);
69
-
70
- return indexA - indexB;
71
- },
72
- finalizeContext: (context) => {
73
- const commitGroups = context.commitGroups.map((commitGroup) => ({
74
- ...commitGroup,
75
- commits: commitGroup.commits.map((commit) => ({
76
- ...commit,
77
- subject: commit.subject.replace(
78
- `${host}/${context.owner}/${context.repository}`,
79
- `${host}/${owner}/${repository}`
80
- )
81
- })),
82
- collapse: commitGroup.title === 'Dependency updates'
83
- }));
84
-
85
- return {
86
- ...context,
87
- owner,
88
- repository,
89
- commitGroups
90
- };
39
+ releaseRules: inputReleaseRules = defaultReleaseRules,
40
+ changelogTypes: inputChangelogTypes = defaultChangelogTypes,
41
+ dependencyScopes = ['prod']
42
+ }) => {
43
+ const releaseRules = [
44
+ ...inputReleaseRules,
45
+ ...dependencyScopes.map((scope) => ({ type: 'deps', scope, release: 'patch' }))
46
+ ];
47
+
48
+ const changelogTypes = [
49
+ ...inputChangelogTypes,
50
+ ...dependencyScopes.map((scope) => ({
51
+ type: 'deps',
52
+ scope,
53
+ section: 'Dependency updates'
54
+ }))
55
+ ];
56
+
57
+ return {
58
+ extends: [Path.join(import.meta.dirname, 'release-cwd.config.cjs')],
59
+ branches: ['main'],
60
+ repositoryUrl: getRepositoryUrl(path),
61
+ tagFormat,
62
+ preset: 'conventionalcommits',
63
+ dryRun: true,
64
+
65
+ plugins: [
66
+ [
67
+ '@semantic-release/commit-analyzer',
68
+ {
69
+ releaseRules
70
+ }
71
+ ],
72
+ [
73
+ '@semantic-release/release-notes-generator',
74
+ {
75
+ host,
76
+ presetConfig: {
77
+ types: changelogTypes
91
78
  },
92
- mainTemplate: `{{> header}}
79
+ writerOpts: {
80
+ commitGroupsSort: ({ title: titleA }, { title: titleB }) => {
81
+ const indexA = changelogTypes.findIndex(({ section }) => section === titleA);
82
+ const indexB = changelogTypes.findIndex(({ section }) => section === titleB);
83
+
84
+ return indexA - indexB;
85
+ },
86
+ finalizeContext: (context) => {
87
+ const commitGroups = context.commitGroups.map((commitGroup) => ({
88
+ ...commitGroup,
89
+ commits: commitGroup.commits.map((commit) => ({
90
+ ...commit,
91
+ subject: commit.subject.replace(
92
+ `${host}/${context.owner}/${context.repository}`,
93
+ `${host}/${owner}/${repository}`
94
+ )
95
+ })),
96
+ collapse: commitGroup.title === 'Dependency updates'
97
+ }));
98
+
99
+ return {
100
+ ...context,
101
+ owner,
102
+ repository,
103
+ commitGroups
104
+ };
105
+ },
106
+ mainTemplate: `{{> header}}
93
107
 
94
108
  {{#if noteGroups}}
95
109
  {{#each noteGroups}}
@@ -121,11 +135,12 @@ export const createReleaseConfig = ({
121
135
  {{/if}}
122
136
 
123
137
  {{/each}}`
138
+ }
124
139
  }
125
- }
140
+ ]
126
141
  ]
127
- ]
128
- });
142
+ };
143
+ };
129
144
 
130
145
  export default createReleaseConfig({
131
146
  host: 'https://github.com',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cluerise/tools",
3
- "version": "5.2.2",
3
+ "version": "5.3.1",
4
4
  "description": "Tools for maintaining TypeScript projects.",
5
5
  "author": "Branislav Holý <brano@holy.am>",
6
6
  "repository": "github:cluerise/tools",
@@ -18,34 +18,34 @@
18
18
  ],
19
19
  "dependencies": {
20
20
  "@actions/core": "1.11.1",
21
- "@commitlint/cli": "19.8.1",
22
- "@commitlint/config-conventional": "19.8.1",
23
- "@commitlint/load": "19.8.1",
24
- "@commitlint/types": "19.8.1",
25
- "@eslint/js": "9.32.0",
26
- "@eslint/json": "0.13.1",
27
- "@eslint/markdown": "7.1.0",
28
- "@html-eslint/eslint-plugin": "0.43.1",
29
- "@html-eslint/parser": "0.43.0",
30
- "@typescript-eslint/parser": "8.38.0",
21
+ "@commitlint/cli": "20.1.0",
22
+ "@commitlint/config-conventional": "20.0.0",
23
+ "@commitlint/load": "20.1.0",
24
+ "@commitlint/types": "20.0.0",
25
+ "@eslint/js": "9.36.0",
26
+ "@eslint/json": "0.13.2",
27
+ "@eslint/markdown": "7.3.0",
28
+ "@html-eslint/eslint-plugin": "0.47.0",
29
+ "@html-eslint/parser": "0.47.0",
30
+ "@typescript-eslint/parser": "8.45.0",
31
31
  "conventional-changelog-conventionalcommits": "9.1.0",
32
- "eslint": "9.32.0",
32
+ "eslint": "9.36.0",
33
33
  "eslint-config-prettier": "10.1.8",
34
34
  "eslint-import-resolver-typescript": "4.4.4",
35
35
  "eslint-plugin-import": "2.32.0",
36
- "eslint-plugin-prettier": "5.5.3",
36
+ "eslint-plugin-prettier": "5.5.4",
37
37
  "eslint-plugin-simple-import-sort": "12.1.1",
38
- "eslint-plugin-unicorn": "60.0.0",
38
+ "eslint-plugin-unicorn": "61.0.2",
39
39
  "eslint-plugin-yml": "1.18.0",
40
40
  "glob": "11.0.3",
41
- "globals": "16.3.0",
42
- "lint-staged": "16.1.2",
41
+ "globals": "16.4.0",
42
+ "lint-staged": "16.2.3",
43
43
  "prettier": "3.6.2",
44
44
  "prettier-plugin-sh": "0.18.0",
45
- "semantic-release": "24.2.7",
45
+ "semantic-release": "24.2.9",
46
46
  "semver": "7.7.2",
47
- "smol-toml": "1.4.1",
48
- "typescript-eslint": "8.38.0",
49
- "zod": "4.0.14"
47
+ "smol-toml": "1.4.2",
48
+ "typescript-eslint": "8.45.0",
49
+ "zod": "4.1.11"
50
50
  }
51
51
  }