@virmator/publish 13.3.7 → 13.3.8

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.
Files changed (2) hide show
  1. package/dist/publish.js +5 -3
  2. package/package.json +2 -2
package/dist/publish.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { awaitedBlockingMap, extractErrorMessage, isEnumValue, isTruthy, safeMatch, } from '@augment-vir/common';
2
2
  import { askQuestionUntilConditionMet, readPackageJson, runShellCommand as runHiddenShellCommand, runShellCommand, } from '@augment-vir/node-js';
3
3
  import { defineVirmatorPlugin, parseTsConfig, VirmatorNoTraceError, } from '@virmator/core';
4
+ import mri from 'mri';
4
5
  import { existsSync } from 'node:fs';
5
6
  import { readFile, writeFile } from 'node:fs/promises';
6
7
  import { join, relative, resolve } from 'node:path';
@@ -47,8 +48,9 @@ export const virmatorPublishPlugin = defineVirmatorPlugin(import.meta.dirname, {
47
48
  else if (await doChangesExist(monoRepoRootPath)) {
48
49
  throw new VirmatorNoTraceError('Git changes exist, cannot run publish. Commit or stash the changes.');
49
50
  }
50
- const flagArgs = filteredArgs.filter((arg) => arg.startsWith('--'));
51
- const isDryRun = flagArgs.includes('--dry-run');
51
+ const nonFlagArgs = mri(filteredArgs)._;
52
+ const publishArgs = filteredArgs.filter((arg) => !nonFlagArgs.includes(arg));
53
+ const isDryRun = publishArgs.includes('--dry-run');
52
54
  const monoRepoPackageJsonFiles = await Promise.all(monoRepoPackages.map(async (monoRepoPackage) => {
53
55
  const packageJson = await readPackageJson(monoRepoPackage.fullPath);
54
56
  if (!packageJson.name) {
@@ -97,7 +99,7 @@ export const virmatorPublishPlugin = defineVirmatorPlugin(import.meta.dirname, {
97
99
  `${inVirmatorEnvKey}=true`,
98
100
  'npm',
99
101
  'publish',
100
- ...flagArgs,
102
+ ...publishArgs,
101
103
  ]
102
104
  .filter(isTruthy)
103
105
  .join(' ');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@virmator/publish",
3
- "version": "13.3.7",
3
+ "version": "13.3.8",
4
4
  "description": "Default publish plugin for virmator.",
5
5
  "keywords": [
6
6
  "virmator",
@@ -35,7 +35,7 @@
35
35
  "dependencies": {
36
36
  "@augment-vir/common": "^29.3.0",
37
37
  "@augment-vir/node-js": "^29.3.0",
38
- "@virmator/core": "^13.3.7",
38
+ "@virmator/core": "^13.3.8",
39
39
  "chalk": "^5.3.0",
40
40
  "mri": "^1.2.0",
41
41
  "run-time-assertions": "^1.5.2",