@cluerise/tools 5.1.1 → 5.1.3

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.3.0
1
+ v24.4.0
@@ -74,10 +74,18 @@ export default defineConfig([
74
74
  }
75
75
  },
76
76
  {
77
- name: 'cluerise: typescript-eslint/rules',
77
+ name: 'cluerise: typescript-eslint/rules/ts',
78
78
  files: ['**/*.{ts,tsx}'],
79
79
  rules: {
80
- '@typescript-eslint/consistent-type-imports': ['error', { fixStyle: 'inline-type-imports' }]
80
+ '@typescript-eslint/consistent-type-imports': ['error', { fixStyle: 'inline-type-imports' }],
81
+ '@typescript-eslint/unbound-method': ['error', { ignoreStatic: true }]
82
+ }
83
+ },
84
+ {
85
+ name: 'cluerise: typescript-eslint/rules/tests',
86
+ files: ['**/*.test.{ts,tsx}'],
87
+ rules: {
88
+ '@typescript-eslint/no-unsafe-assignment': 'off'
81
89
  }
82
90
  },
83
91
  // JSON
@@ -147,7 +155,7 @@ export default defineConfig([
147
155
  'import/no-duplicates': 'error',
148
156
  'import/no-mutable-exports': 'error',
149
157
  'import/no-unassigned-import': ['error', { allow: ['reset-css'] }],
150
- 'import/no-unresolved': ['error', { ignore: ['cloudflare:test'] }],
158
+ 'import/no-unresolved': ['error', { ignore: ['cloudflare:test', 'cloudflare:workers', 'cloudflare:workflows'] }],
151
159
  'import/order': 'off'
152
160
  }
153
161
  },
@@ -166,6 +174,21 @@ export default defineConfig([
166
174
  'import/no-default-export': 'off'
167
175
  }
168
176
  },
177
+ {
178
+ name: 'cluerise: eslint/import/rules/setup.js,cjs',
179
+ files: ['**/*.setup.{js,cjs}'],
180
+ rules: {
181
+ '@typescript-eslint/no-require-imports': 'off',
182
+ 'import/no-commonjs': 'off'
183
+ }
184
+ },
185
+ {
186
+ name: 'cluerise: eslint/import/rules/setup.js,cjs,ts',
187
+ files: ['**/*.setup.{js,cjs,ts}'],
188
+ rules: {
189
+ 'import/no-default-export': 'off'
190
+ }
191
+ },
169
192
  {
170
193
  name: 'cluerise: eslint/import/rules/routes',
171
194
  files: ['**/*-route.tsx'],
@@ -215,12 +238,14 @@ export default defineConfig([
215
238
  ignore: [String.raw`\.md$`]
216
239
  }
217
240
  ],
241
+ 'unicorn/no-array-reduce': 'off',
218
242
  'unicorn/no-null': 'off',
219
243
  'unicorn/no-static-only-class': 'off',
220
244
  'unicorn/no-useless-undefined': 'off',
221
245
  'unicorn/prevent-abbreviations': [
222
246
  'error',
223
247
  {
248
+ ignore: [/.*e2e.*/],
224
249
  replacements: {
225
250
  acc: false,
226
251
  arg: false,
@@ -228,7 +253,6 @@ export default defineConfig([
228
253
  dist: false,
229
254
  env: false,
230
255
  envs: false,
231
- e2e: false,
232
256
  param: false,
233
257
  params: false,
234
258
  prev: false,
@@ -33,13 +33,13 @@ const enginesSchema = z.object({
33
33
  const repositoryObjectSchema = z.object({
34
34
  type: z.string(),
35
35
  url: z.string(),
36
- directory: z.ostring()
36
+ directory: z.string().optional()
37
37
  });
38
38
  const repositorySchema = z.union([z.string(), repositoryObjectSchema]);
39
39
  const packageJsonDataSchema = z.object({
40
40
  name: z.string(),
41
- version: z.string(),
42
- description: z.ostring(),
41
+ version: z.string().optional(),
42
+ description: z.string().optional(),
43
43
  engines: enginesSchema.optional(),
44
44
  repository: repositorySchema.optional()
45
45
  });
@@ -11,13 +11,13 @@ const enginesSchema = z.object({
11
11
  const repositoryObjectSchema = z.object({
12
12
  type: z.string(),
13
13
  url: z.string(),
14
- directory: z.ostring()
14
+ directory: z.string().optional()
15
15
  });
16
16
  const repositorySchema = z.union([z.string(), repositoryObjectSchema]);
17
17
  z.object({
18
18
  name: z.string(),
19
- version: z.string(),
20
- description: z.ostring(),
19
+ version: z.string().optional(),
20
+ description: z.string().optional(),
21
21
  engines: enginesSchema.optional(),
22
22
  repository: repositorySchema.optional()
23
23
  });
@@ -11,13 +11,13 @@ const enginesSchema = z.object({
11
11
  const repositoryObjectSchema = z.object({
12
12
  type: z.string(),
13
13
  url: z.string(),
14
- directory: z.ostring()
14
+ directory: z.string().optional()
15
15
  });
16
16
  const repositorySchema = z.union([z.string(), repositoryObjectSchema]);
17
17
  z.object({
18
18
  name: z.string(),
19
- version: z.string(),
20
- description: z.ostring(),
19
+ version: z.string().optional(),
20
+ description: z.string().optional(),
21
21
  engines: enginesSchema.optional(),
22
22
  repository: repositorySchema.optional()
23
23
  });
@@ -119,13 +119,13 @@ const enginesSchema = z.object({
119
119
  const repositoryObjectSchema = z.object({
120
120
  type: z.string(),
121
121
  url: z.string(),
122
- directory: z.ostring()
122
+ directory: z.string().optional()
123
123
  });
124
124
  const repositorySchema = z.union([z.string(), repositoryObjectSchema]);
125
125
  const packageJsonDataSchema = z.object({
126
126
  name: z.string(),
127
- version: z.string(),
128
- description: z.ostring(),
127
+ version: z.string().optional(),
128
+ description: z.string().optional(),
129
129
  engines: enginesSchema.optional(),
130
130
  repository: repositorySchema.optional()
131
131
  });
@@ -93,13 +93,13 @@ const enginesSchema = z.object({
93
93
  const repositoryObjectSchema = z.object({
94
94
  type: z.string(),
95
95
  url: z.string(),
96
- directory: z.ostring()
96
+ directory: z.string().optional()
97
97
  });
98
98
  const repositorySchema = z.union([z.string(), repositoryObjectSchema]);
99
99
  z.object({
100
100
  name: z.string(),
101
- version: z.string(),
102
- description: z.ostring(),
101
+ version: z.string().optional(),
102
+ description: z.string().optional(),
103
103
  engines: enginesSchema.optional(),
104
104
  repository: repositorySchema.optional()
105
105
  });
@@ -40,13 +40,13 @@ const enginesSchema = z.object({
40
40
  const repositoryObjectSchema = z.object({
41
41
  type: z.string(),
42
42
  url: z.string(),
43
- directory: z.ostring()
43
+ directory: z.string().optional()
44
44
  });
45
45
  const repositorySchema = z.union([z.string(), repositoryObjectSchema]);
46
46
  const packageJsonDataSchema = z.object({
47
47
  name: z.string(),
48
- version: z.string(),
49
- description: z.ostring(),
48
+ version: z.string().optional(),
49
+ description: z.string().optional(),
50
50
  engines: enginesSchema.optional(),
51
51
  repository: repositorySchema.optional()
52
52
  });
@@ -380,14 +380,17 @@ class Releaser {
380
380
  * @throws If no release is found or if the header is not found in the changelog.
381
381
  */
382
382
  async getLatestReleaseInfo() {
383
- const packageJson = await PackageJson.init();
383
+ const { name, version } = await PackageJson.init();
384
+ if (!version) {
385
+ throw new Error("Package version is not defined in package.json");
386
+ }
384
387
  const tagFormat = this.#config.tagFormat ?? "v${version}";
385
- const tag = tagFormat.replace("${version}", packageJson.version);
388
+ const tag = tagFormat.replace("${version}", version);
386
389
  const latestBranch = tagFormat.replace("v${version}", "latest");
387
390
  const changelog = await this.#getLatestReleaseChangelog();
388
391
  return {
389
- name: packageJson.name,
390
- version: packageJson.version,
392
+ name,
393
+ version,
391
394
  tag,
392
395
  latestBranch,
393
396
  changelog
@@ -33,13 +33,13 @@ const enginesSchema = z.object({
33
33
  const repositoryObjectSchema = z.object({
34
34
  type: z.string(),
35
35
  url: z.string(),
36
- directory: z.ostring()
36
+ directory: z.string().optional()
37
37
  });
38
38
  const repositorySchema = z.union([z.string(), repositoryObjectSchema]);
39
39
  const packageJsonDataSchema = z.object({
40
40
  name: z.string(),
41
- version: z.string(),
42
- description: z.ostring(),
41
+ version: z.string().optional(),
42
+ description: z.string().optional(),
43
43
  engines: enginesSchema.optional(),
44
44
  repository: repositorySchema.optional()
45
45
  });
@@ -186,17 +186,17 @@ const nodeJsReleaseSchema = z.object({
186
186
  date: z.string(),
187
187
  // '2023-08-09',
188
188
  files: z.array(z.string()),
189
- npm: z.ostring(),
189
+ npm: z.string().optional(),
190
190
  // '9.8.0',
191
191
  v8: z.string(),
192
192
  // '11.3.244.8',
193
- uv: z.ostring(),
193
+ uv: z.string().optional(),
194
194
  // '1.46.0',
195
- zlib: z.ostring(),
195
+ zlib: z.string().optional(),
196
196
  // '1.2.13.1-motley',
197
- openssl: z.ostring(),
197
+ openssl: z.string().optional(),
198
198
  // '3.0.10+quic',
199
- modules: z.ostring(),
199
+ modules: z.string().optional(),
200
200
  // '115',
201
201
  lts: z.union([z.boolean(), z.string()]),
202
202
  // false, 'Argon',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cluerise/tools",
3
- "version": "5.1.1",
3
+ "version": "5.1.3",
4
4
  "description": "Tools for maintaining TypeScript projects.",
5
5
  "author": "Branislav Holý <brano@holy.am>",
6
6
  "repository": "github:cluerise/tools",
@@ -22,14 +22,14 @@
22
22
  "@commitlint/config-conventional": "19.8.1",
23
23
  "@commitlint/load": "19.8.1",
24
24
  "@commitlint/types": "19.8.1",
25
- "@eslint/js": "9.30.0",
26
- "@eslint/json": "0.12.0",
27
- "@eslint/markdown": "6.6.0",
25
+ "@eslint/js": "9.31.0",
26
+ "@eslint/json": "0.13.0",
27
+ "@eslint/markdown": "7.0.0",
28
28
  "@html-eslint/eslint-plugin": "0.42.0",
29
29
  "@html-eslint/parser": "0.42.0",
30
- "@typescript-eslint/parser": "8.35.0",
31
- "conventional-changelog-conventionalcommits": "9.0.0",
32
- "eslint": "9.30.0",
30
+ "@typescript-eslint/parser": "8.36.0",
31
+ "conventional-changelog-conventionalcommits": "9.1.0",
32
+ "eslint": "9.31.0",
33
33
  "eslint-config-prettier": "10.1.5",
34
34
  "eslint-import-resolver-typescript": "4.4.4",
35
35
  "eslint-plugin-import": "2.32.0",
@@ -38,14 +38,14 @@
38
38
  "eslint-plugin-unicorn": "59.0.1",
39
39
  "eslint-plugin-yml": "1.18.0",
40
40
  "glob": "11.0.3",
41
- "globals": "16.2.0",
41
+ "globals": "16.3.0",
42
42
  "lint-staged": "16.1.2",
43
43
  "prettier": "3.6.2",
44
44
  "prettier-plugin-sh": "0.18.0",
45
- "semantic-release": "24.2.5",
45
+ "semantic-release": "24.2.7",
46
46
  "semver": "7.7.2",
47
- "smol-toml": "1.4.0",
48
- "typescript-eslint": "8.35.0",
49
- "zod": "3.25.67"
47
+ "smol-toml": "1.4.1",
48
+ "typescript-eslint": "8.36.0",
49
+ "zod": "4.0.5"
50
50
  }
51
51
  }