fork-version 2.0.1 → 2.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/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkGQO6W4DN_cjs = require('./chunk-GQO6W4DN.cjs');
3
+ var chunkRJRVHSEG_cjs = require('./chunk-RJRVHSEG.cjs');
4
4
 
5
5
  // src/config/define-config.ts
6
6
  function defineConfig(config) {
@@ -9,59 +9,59 @@ function defineConfig(config) {
9
9
 
10
10
  Object.defineProperty(exports, "CommitParser", {
11
11
  enumerable: true,
12
- get: function () { return chunkGQO6W4DN_cjs.CommitParser; }
12
+ get: function () { return chunkRJRVHSEG_cjs.CommitParser; }
13
13
  });
14
14
  Object.defineProperty(exports, "FileManager", {
15
15
  enumerable: true,
16
- get: function () { return chunkGQO6W4DN_cjs.FileManager; }
16
+ get: function () { return chunkRJRVHSEG_cjs.FileManager; }
17
17
  });
18
18
  Object.defineProperty(exports, "ForkConfigSchema", {
19
19
  enumerable: true,
20
- get: function () { return chunkGQO6W4DN_cjs.ForkConfigSchema; }
20
+ get: function () { return chunkRJRVHSEG_cjs.ForkConfigSchema; }
21
21
  });
22
22
  Object.defineProperty(exports, "Git", {
23
23
  enumerable: true,
24
- get: function () { return chunkGQO6W4DN_cjs.Git; }
24
+ get: function () { return chunkRJRVHSEG_cjs.Git; }
25
25
  });
26
26
  Object.defineProperty(exports, "Logger", {
27
27
  enumerable: true,
28
- get: function () { return chunkGQO6W4DN_cjs.Logger; }
28
+ get: function () { return chunkRJRVHSEG_cjs.Logger; }
29
29
  });
30
30
  Object.defineProperty(exports, "commitChanges", {
31
31
  enumerable: true,
32
- get: function () { return chunkGQO6W4DN_cjs.commitChanges; }
32
+ get: function () { return chunkRJRVHSEG_cjs.commitChanges; }
33
33
  });
34
34
  Object.defineProperty(exports, "createParserOptions", {
35
35
  enumerable: true,
36
- get: function () { return chunkGQO6W4DN_cjs.createParserOptions; }
36
+ get: function () { return chunkRJRVHSEG_cjs.createParserOptions; }
37
37
  });
38
38
  Object.defineProperty(exports, "filterRevertedCommits", {
39
39
  enumerable: true,
40
- get: function () { return chunkGQO6W4DN_cjs.filterRevertedCommits; }
40
+ get: function () { return chunkRJRVHSEG_cjs.filterRevertedCommits; }
41
41
  });
42
42
  Object.defineProperty(exports, "getCommitsSinceTag", {
43
43
  enumerable: true,
44
- get: function () { return chunkGQO6W4DN_cjs.getCommitsSinceTag; }
44
+ get: function () { return chunkRJRVHSEG_cjs.getCommitsSinceTag; }
45
45
  });
46
46
  Object.defineProperty(exports, "getCurrentVersion", {
47
47
  enumerable: true,
48
- get: function () { return chunkGQO6W4DN_cjs.getCurrentVersion; }
48
+ get: function () { return chunkRJRVHSEG_cjs.getCurrentVersion; }
49
49
  });
50
50
  Object.defineProperty(exports, "getNextVersion", {
51
51
  enumerable: true,
52
- get: function () { return chunkGQO6W4DN_cjs.getNextVersion; }
52
+ get: function () { return chunkRJRVHSEG_cjs.getNextVersion; }
53
53
  });
54
54
  Object.defineProperty(exports, "getUserConfig", {
55
55
  enumerable: true,
56
- get: function () { return chunkGQO6W4DN_cjs.getUserConfig; }
56
+ get: function () { return chunkRJRVHSEG_cjs.getUserConfig; }
57
57
  });
58
58
  Object.defineProperty(exports, "tagChanges", {
59
59
  enumerable: true,
60
- get: function () { return chunkGQO6W4DN_cjs.tagChanges; }
60
+ get: function () { return chunkRJRVHSEG_cjs.tagChanges; }
61
61
  });
62
62
  Object.defineProperty(exports, "updateChangelog", {
63
63
  enumerable: true,
64
- get: function () { return chunkGQO6W4DN_cjs.updateChangelog; }
64
+ get: function () { return chunkRJRVHSEG_cjs.updateChangelog; }
65
65
  });
66
66
  exports.defineConfig = defineConfig;
67
67
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/config/define-config.ts"],"names":[],"mappings":";;;;;AAKO,SAAS,aAAa,MAAwB,EAAA;AACpD,EAAO,OAAA,MAAA;AACR","file":"index.cjs","sourcesContent":["import type { Config } from \"./types\";\n\n/**\n * [Fork-Version - Config Properties](https://github.com/eglavin/fork-version/blob/main/README.md#config-properties)\n */\nexport function defineConfig(config: Config): Config {\n\treturn config;\n}\n"]}
1
+ {"version":3,"sources":["../src/config/define-config.ts"],"names":[],"mappings":";;;;;AAKO,SAAS,aAAa,MAAA,EAAwB;AACpD,EAAA,OAAO,MAAA;AACR","file":"index.cjs","sourcesContent":["import type { Config } from \"./types\";\n\n/**\n * [Fork-Version - Config Properties](https://github.com/eglavin/fork-version/blob/main/README.md#config-properties)\n */\nexport function defineConfig(config: Config): Config {\n\treturn config;\n}\n"]}
package/dist/index.d.cts CHANGED
@@ -65,325 +65,46 @@ interface ParserOptions {
65
65
  declare function createParserOptions(userOptions?: Partial<ParserOptions>): ParserOptions;
66
66
 
67
67
  declare const ForkConfigSchema: z.ZodObject<{
68
- /**
69
- * If set, Fork-Version will print the current version and exit.
70
- * @default false
71
- */
72
68
  inspectVersion: z.ZodBoolean;
73
- /**
74
- * List of the files to be updated.
75
- * @default
76
- * ```js
77
- * ["bower.json", "deno.json", "deno.jsonc", "jsr.json", "jsr.jsonc", "manifest.json", "npm-shrinkwrap.json", "package-lock.json", "package.json"]
78
- * ```
79
- */
80
- files: z.ZodArray<z.ZodString, "many">;
81
- /**
82
- * Glob pattern to match files to be updated.
83
- *
84
- * Internally we're using [glob](https://github.com/isaacs/node-glob) to match files.
85
- *
86
- * Read more about the pattern syntax [here](https://github.com/isaacs/node-glob/tree/v10.3.12?tab=readme-ov-file#glob-primer).
87
- *
88
- * @default undefined
89
- * @example "*.json"
90
- */
69
+ files: z.ZodArray<z.ZodString>;
91
70
  glob: z.ZodOptional<z.ZodString>;
92
- /**
93
- * The path Fork-Version will run from.
94
- * @default
95
- * ```js
96
- * process.cwd()
97
- * ```
98
- */
99
71
  path: z.ZodString;
100
- /**
101
- * Name of the changelog file.
102
- * @default "CHANGELOG.md"
103
- */
104
72
  changelog: z.ZodString;
105
- /**
106
- * The header text for the changelog.
107
- * @default
108
- * ```markdown
109
- * # Changelog
110
- *
111
- * All notable changes to this project will be documented in this file. See [fork-version](https://github.com/eglavin/fork-version) for commit guidelines.
112
- * ```
113
- */
114
73
  header: z.ZodString;
115
- /**
116
- * Specify a prefix for the created tag.
117
- *
118
- * For instance if your version tag is prefixed by "version/" instead of "v" you have to specify
119
- * `tagPrefix: "version/"`.
120
- *
121
- * `tagPrefix` can also be used for a monorepo environment where you might want to deploy
122
- * multiple package from the same repository. In this case you can specify a prefix for
123
- * each package:
124
- *
125
- * | Example Value | Tag Created |
126
- * |:-------------------------|:------------------------------|
127
- * | "" | `1.2.3` |
128
- * | "version/" | `version/1.2.3` |
129
- * | "@eglavin/fork-version-" | `@eglavin/fork-version-1.2.3` |
130
- *
131
- * @example "", "version/", "@eglavin/fork-version-"
132
- * @default "v"
133
- */
134
74
  tagPrefix: z.ZodString;
135
- /**
136
- * Make a pre-release with optional label if given value is a string.
137
- *
138
- * | Example Value | Produced Version |
139
- * |:--------------|:-----------------|
140
- * | true | `1.2.3-0` |
141
- * | "alpha" | `1.2.3-alpha-0` |
142
- * | "beta" | `1.2.3-beta-0` |
143
- *
144
- * @example true, "alpha", "beta", "rc"
145
- * @default undefined
146
- */
147
75
  preRelease: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
148
- /**
149
- * If set, Fork-Version will use this version instead of trying to determine one.
150
- * @example "1.0.0"
151
- * @default undefined
152
- */
153
76
  currentVersion: z.ZodOptional<z.ZodString>;
154
- /**
155
- * If set, Fork-Version will attempt to update to this version, instead of incrementing using "conventional-commit".
156
- * @example "2.0.0"
157
- * @default undefined
158
- */
159
77
  nextVersion: z.ZodOptional<z.ZodString>;
160
- /**
161
- * Release as increments the version by the specified level. Overrides the default behaviour of "conventional-commit".
162
- * @example "major", "minor", "patch"
163
- * @default undefined
164
- */
165
- releaseAs: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"major">, z.ZodLiteral<"minor">, z.ZodLiteral<"patch">]>>;
166
- /**
167
- * Don't throw an error if multiple versions are found in the given files.
168
- * @default true
169
- */
78
+ releaseAs: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"major">, z.ZodLiteral<"minor">, z.ZodLiteral<"patch">]>>;
170
79
  allowMultipleVersions: z.ZodBoolean;
171
- /**
172
- * Commit all changes, not just files updated by Fork-Version.
173
- * @default false
174
- */
175
80
  commitAll: z.ZodBoolean;
176
- /**
177
- * By default the conventional-changelog spec will only add commit types of `feat` and `fix` to the generated changelog.
178
- * If this flag is set, all [default commit types](https://github.com/conventional-changelog/conventional-changelog-config-spec/blob/238093090c14bd7d5151eb5316e635623ce633f9/versions/2.2.0/schema.json#L18)
179
- * will be added to the changelog.
180
- * @default false
181
- */
182
81
  changelogAll: z.ZodBoolean;
183
- /**
184
- * Output debug information.
185
- * @default false
186
- */
187
82
  debug: z.ZodBoolean;
188
- /**
189
- * No output will be written to disk or committed.
190
- * @default false
191
- */
192
83
  dryRun: z.ZodBoolean;
193
- /**
194
- * Run without logging to the terminal.
195
- * @default false
196
- */
197
84
  silent: z.ZodBoolean;
198
- /**
199
- * If unable to find a version in the given files, fallback and attempt to use the latest git tag.
200
- * @default true
201
- */
202
85
  gitTagFallback: z.ZodBoolean;
203
- /**
204
- * If true, git will sign the commit with the systems GPG key.
205
- * @see {@link https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--Sltkeyidgt Git - GPG Sign Commits}
206
- * @default false
207
- */
208
86
  sign: z.ZodBoolean;
209
- /**
210
- * If true, git will run user defined git hooks before committing.
211
- * @see {@link https://git-scm.com/docs/githooks Git - Git Hooks}
212
- * @default false
213
- */
214
87
  verify: z.ZodBoolean;
215
- /**
216
- * Skip the bump step.
217
- * @default false
218
- */
219
88
  skipBump: z.ZodBoolean;
220
- /**
221
- * Skip the changelog step.
222
- * @default false
223
- */
224
89
  skipChangelog: z.ZodBoolean;
225
- /**
226
- * Skip the commit step.
227
- * @default false
228
- */
229
90
  skipCommit: z.ZodBoolean;
230
- /**
231
- * Skip the tag step.
232
- * @default false
233
- */
234
91
  skipTag: z.ZodBoolean;
235
- /**
236
- * Override the default "conventional-changelog-conventionalcommits" preset configuration.
237
- */
238
92
  changelogPresetConfig: z.ZodObject<{
239
93
  types: z.ZodOptional<z.ZodArray<z.ZodObject<{
240
- /**
241
- * The type of commit message.
242
- * @example "feat", "fix", "chore", etc..
243
- */
244
94
  type: z.ZodString;
245
- /**
246
- * The scope of the commit message.
247
- */
248
95
  scope: z.ZodOptional<z.ZodString>;
249
- /**
250
- * The section of the `CHANGELOG` the commit should show up in.
251
- */
252
96
  section: z.ZodOptional<z.ZodString>;
253
- /**
254
- * Should show in the generated changelog message?
255
- */
256
97
  hidden: z.ZodOptional<z.ZodBoolean>;
257
- }, "strip", z.ZodTypeAny, {
258
- type: string;
259
- scope?: string | undefined;
260
- section?: string | undefined;
261
- hidden?: boolean | undefined;
262
- }, {
263
- type: string;
264
- scope?: string | undefined;
265
- section?: string | undefined;
266
- hidden?: boolean | undefined;
267
- }>, "many">>;
98
+ }, z.core.$strip>>>;
268
99
  commitUrlFormat: z.ZodOptional<z.ZodString>;
269
100
  compareUrlFormat: z.ZodOptional<z.ZodString>;
270
101
  issueUrlFormat: z.ZodOptional<z.ZodString>;
271
102
  userUrlFormat: z.ZodOptional<z.ZodString>;
272
103
  releaseCommitMessageFormat: z.ZodOptional<z.ZodString>;
273
- issuePrefixes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
274
- }, "strip", z.ZodTypeAny, {
275
- commitUrlFormat?: string | undefined;
276
- compareUrlFormat?: string | undefined;
277
- issueUrlFormat?: string | undefined;
278
- userUrlFormat?: string | undefined;
279
- releaseCommitMessageFormat?: string | undefined;
280
- types?: {
281
- type: string;
282
- scope?: string | undefined;
283
- section?: string | undefined;
284
- hidden?: boolean | undefined;
285
- }[] | undefined;
286
- issuePrefixes?: string[] | undefined;
287
- }, {
288
- commitUrlFormat?: string | undefined;
289
- compareUrlFormat?: string | undefined;
290
- issueUrlFormat?: string | undefined;
291
- userUrlFormat?: string | undefined;
292
- releaseCommitMessageFormat?: string | undefined;
293
- types?: {
294
- type: string;
295
- scope?: string | undefined;
296
- section?: string | undefined;
297
- hidden?: boolean | undefined;
298
- }[] | undefined;
299
- issuePrefixes?: string[] | undefined;
300
- }>;
301
- /**
302
- * Add a suffix to the release commit message.
303
- * @example "[skip ci]"
304
- */
104
+ issuePrefixes: z.ZodOptional<z.ZodArray<z.ZodString>>;
105
+ }, z.core.$strip>;
305
106
  releaseMessageSuffix: z.ZodOptional<z.ZodString>;
306
- }, "strip", z.ZodTypeAny, {
307
- inspectVersion: boolean;
308
- files: string[];
309
- path: string;
310
- changelog: string;
311
- header: string;
312
- tagPrefix: string;
313
- allowMultipleVersions: boolean;
314
- commitAll: boolean;
315
- changelogAll: boolean;
316
- debug: boolean;
317
- dryRun: boolean;
318
- silent: boolean;
319
- gitTagFallback: boolean;
320
- sign: boolean;
321
- verify: boolean;
322
- skipBump: boolean;
323
- skipChangelog: boolean;
324
- skipCommit: boolean;
325
- skipTag: boolean;
326
- changelogPresetConfig: {
327
- commitUrlFormat?: string | undefined;
328
- compareUrlFormat?: string | undefined;
329
- issueUrlFormat?: string | undefined;
330
- userUrlFormat?: string | undefined;
331
- releaseCommitMessageFormat?: string | undefined;
332
- types?: {
333
- type: string;
334
- scope?: string | undefined;
335
- section?: string | undefined;
336
- hidden?: boolean | undefined;
337
- }[] | undefined;
338
- issuePrefixes?: string[] | undefined;
339
- };
340
- glob?: string | undefined;
341
- preRelease?: string | boolean | undefined;
342
- currentVersion?: string | undefined;
343
- nextVersion?: string | undefined;
344
- releaseAs?: "major" | "minor" | "patch" | undefined;
345
- releaseMessageSuffix?: string | undefined;
346
- }, {
347
- inspectVersion: boolean;
348
- files: string[];
349
- path: string;
350
- changelog: string;
351
- header: string;
352
- tagPrefix: string;
353
- allowMultipleVersions: boolean;
354
- commitAll: boolean;
355
- changelogAll: boolean;
356
- debug: boolean;
357
- dryRun: boolean;
358
- silent: boolean;
359
- gitTagFallback: boolean;
360
- sign: boolean;
361
- verify: boolean;
362
- skipBump: boolean;
363
- skipChangelog: boolean;
364
- skipCommit: boolean;
365
- skipTag: boolean;
366
- changelogPresetConfig: {
367
- commitUrlFormat?: string | undefined;
368
- compareUrlFormat?: string | undefined;
369
- issueUrlFormat?: string | undefined;
370
- userUrlFormat?: string | undefined;
371
- releaseCommitMessageFormat?: string | undefined;
372
- types?: {
373
- type: string;
374
- scope?: string | undefined;
375
- section?: string | undefined;
376
- hidden?: boolean | undefined;
377
- }[] | undefined;
378
- issuePrefixes?: string[] | undefined;
379
- };
380
- glob?: string | undefined;
381
- preRelease?: string | boolean | undefined;
382
- currentVersion?: string | undefined;
383
- nextVersion?: string | undefined;
384
- releaseAs?: "major" | "minor" | "patch" | undefined;
385
- releaseMessageSuffix?: string | undefined;
386
- }>;
107
+ }, z.core.$strip>;
387
108
 
388
109
  type ForkConfig = z.infer<typeof ForkConfigSchema>;
389
110
  type Config = Partial<ForkConfig>;