@virmator/publish 14.32.0 → 14.33.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.
@@ -16,6 +16,7 @@ export const typeDocConfig: Partial<TypeDocOptions> = {
16
16
  defaultCategory: 'MISSING CATEGORY',
17
17
  categoryOrder: [
18
18
  'Main',
19
+ 'Util',
19
20
  'Internal',
20
21
  ],
21
22
  };
@@ -1,4 +1,8 @@
1
- /** JSON-serializable results from npm's publish-time package.json checks. */
1
+ /**
2
+ * JSON-serializable results from npm's publish-time package.json checks.
3
+ *
4
+ * @category Util
5
+ */
2
6
  export type NpmPublishPackageJsonCheckResult = {
3
7
  /** The corrections npm would report as publish warnings. */
4
8
  warnings: string[];
package/dist/publish.d.ts CHANGED
@@ -2,7 +2,11 @@ import { type PackageJson } from '@augment-vir/common';
2
2
  import { VirmatorNoTraceError } from '@virmator/core';
3
3
  import { type SemVer } from 'semver';
4
4
  export * from './npm-publish-package-json-check.js';
5
- /** A virmator plugin for publishing a package to npm. */
5
+ /**
6
+ * A virmator plugin for publishing a package to npm.
7
+ *
8
+ * @category Main
9
+ */
6
10
  export declare const virmatorPublishPlugin: Readonly<Readonly<{
7
11
  name: string;
8
12
  cliCommands: NoInfer<{
@@ -36,7 +40,11 @@ export declare const virmatorPublishPlugin: Readonly<Readonly<{
36
40
  };
37
41
  }>>;
38
42
  }>;
39
- /** Creates the error that prevents publishing an unhealthy package.json. */
43
+ /**
44
+ * Creates the error that prevents publishing an unhealthy package.json.
45
+ *
46
+ * @category Util
47
+ */
40
48
  export declare function createPackageJsonHealthError({ packageDirPath, warnings, errors, }: Readonly<{
41
49
  packageDirPath: string;
42
50
  warnings: ReadonlyArray<string>;
@@ -52,7 +60,11 @@ export declare function assertValidLicense({ license, isPrivate, displayName, }:
52
60
  isPrivate: PackageJson['private'];
53
61
  displayName: string;
54
62
  }): void;
55
- /** Commit message version tags that bump the published version. */
63
+ /**
64
+ * Commit message version tags that bump the published version.
65
+ *
66
+ * @category Util
67
+ */
56
68
  export declare enum ChangeMarker {
57
69
  Patch = "patch",
58
70
  Minor = "minor",
@@ -63,12 +75,16 @@ export declare enum ChangeMarker {
63
75
  * {@link ChangeMarker}, or `undefined` when there is no tag or the tag is an allowed non-bumping one
64
76
  * (e.g. `dev`). Throws a `VirmatorNoTraceError` for any tag outside the allowed set so the publish
65
77
  * aborts.
78
+ *
79
+ * @category Util
66
80
  */
67
81
  export declare function parseCommitChangeMarker(commitMessage: string): ChangeMarker | undefined;
68
82
  /**
69
83
  * The next semver version to publish, derived from the highest-priority bump marker found since the
70
84
  * last version (major > minor > patch). Returns `undefined` when no version was found or no bump
71
85
  * marker is present, in which case the caller asks for a version manually.
86
+ *
87
+ * @category Util
72
88
  */
73
89
  export declare function determineNextVersion({ latestVersion, changeMarkers, }: {
74
90
  latestVersion: SemVer | undefined;
package/dist/publish.js CHANGED
@@ -21,7 +21,11 @@ const inVirmatorEnvKey = 'IN_VIRMATOR';
21
21
  * staged publishes is terrible. If they fix that, then we can flip this back to `true`.
22
22
  */
23
23
  const useStagedPublishing = false;
24
- /** A virmator plugin for publishing a package to npm. */
24
+ /**
25
+ * A virmator plugin for publishing a package to npm.
26
+ *
27
+ * @category Main
28
+ */
25
29
  export const virmatorPublishPlugin = defineVirmatorPlugin(import.meta.dirname, {
26
30
  name: 'Publish',
27
31
  cliCommands: {
@@ -243,7 +247,11 @@ async function assertPackageJsonHealth(packageDirPath) {
243
247
  throw packageJsonHealthError;
244
248
  }
245
249
  }
246
- /** Creates the error that prevents publishing an unhealthy package.json. */
250
+ /**
251
+ * Creates the error that prevents publishing an unhealthy package.json.
252
+ *
253
+ * @category Util
254
+ */
247
255
  export function createPackageJsonHealthError({ packageDirPath, warnings, errors, }) {
248
256
  const healthProblems = [
249
257
  ...errors.map((error) => `Error: ${error}`),
@@ -310,7 +318,11 @@ async function isPublished({ name, version }) {
310
318
  return output.exitCode === 0;
311
319
  }
312
320
  const gitCommitFormatDelimiter = '<**..**>';
313
- /** Commit message version tags that bump the published version. */
321
+ /**
322
+ * Commit message version tags that bump the published version.
323
+ *
324
+ * @category Util
325
+ */
314
326
  export var ChangeMarker;
315
327
  (function (ChangeMarker) {
316
328
  ChangeMarker["Patch"] = "patch";
@@ -331,6 +343,8 @@ const allowedVersionTags = [
331
343
  * {@link ChangeMarker}, or `undefined` when there is no tag or the tag is an allowed non-bumping one
332
344
  * (e.g. `dev`). Throws a `VirmatorNoTraceError` for any tag outside the allowed set so the publish
333
345
  * aborts.
346
+ *
347
+ * @category Util
334
348
  */
335
349
  export function parseCommitChangeMarker(commitMessage) {
336
350
  const [, rawChangeMarker,] = safeMatch(commitMessage.trim(), /^\[([^\]]+)]/);
@@ -409,6 +423,8 @@ async function findChangeMarkersSinceVersion(git) {
409
423
  * The next semver version to publish, derived from the highest-priority bump marker found since the
410
424
  * last version (major > minor > patch). Returns `undefined` when no version was found or no bump
411
425
  * marker is present, in which case the caller asks for a version manually.
426
+ *
427
+ * @category Util
412
428
  */
413
429
  export function determineNextVersion({ latestVersion, changeMarkers, }) {
414
430
  if (!latestVersion) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virmator/publish",
3
- "version": "14.32.0",
3
+ "version": "14.33.0",
4
4
  "description": "Default publish plugin for virmator.",
5
5
  "keywords": [
6
6
  "virmator",
@@ -34,11 +34,11 @@
34
34
  "test:update": "npm test"
35
35
  },
36
36
  "dependencies": {
37
- "@augment-vir/assert": "^32.2.2",
38
- "@augment-vir/common": "^32.2.2",
39
- "@augment-vir/node": "^32.2.2",
37
+ "@augment-vir/assert": "^32.2.3",
38
+ "@augment-vir/common": "^32.2.3",
39
+ "@augment-vir/node": "^32.2.3",
40
40
  "@npmcli/package-json": "^8.0.0",
41
- "@virmator/core": "^14.32.0",
41
+ "@virmator/core": "^14.33.0",
42
42
  "mri": "^1.2.0",
43
43
  "semver": "^7.8.5",
44
44
  "simple-git": "^3.36.0",
@@ -46,7 +46,7 @@
46
46
  "url-vir": "^2.2.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@augment-vir/test": "^32.2.2",
49
+ "@augment-vir/test": "^32.2.3",
50
50
  "@types/node": "^26.2.0",
51
51
  "@types/npmcli__package-json": "^4.0.4",
52
52
  "@types/semver": "^7.8.0",