@b12k/mvm 1.0.0 → 1.1.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.
- package/README.md +3 -3
- package/dist/cli.js +1 -1
- package/dist/propagate.d.ts +5 -1
- package/dist/propagate.js +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -102,9 +102,9 @@ await changed({ name: '@example/web', source: 'git' }); // Check only Git for a
|
|
|
102
102
|
await changed({ name: '@example/web', source: 'artifacts' }); // Check only artifacts for a named package.
|
|
103
103
|
|
|
104
104
|
await propagate(); // Use the current package and its manifest version.
|
|
105
|
-
await propagate('@example/core'); // Use a named package and its manifest version.
|
|
106
|
-
await propagate(
|
|
107
|
-
await propagate('@example/core', '2.0.0'); // Override a named package's version.
|
|
105
|
+
await propagate({ name: '@example/core' }); // Use a named package and its manifest version.
|
|
106
|
+
await propagate({ version: '2.0.0' }); // Override the current package's version.
|
|
107
|
+
await propagate({ name: '@example/core', version: '2.0.0' }); // Override a named package's version.
|
|
108
108
|
|
|
109
109
|
await seal(); // Save the current package's artifact hash.
|
|
110
110
|
await seal('@example/core'); // Save a named package's artifact hash.
|
package/dist/cli.js
CHANGED
|
@@ -25,7 +25,7 @@ function reportMutation(hasChanges, error) {
|
|
|
25
25
|
process.exitCode = getResultCode(hasChanges ?? false);
|
|
26
26
|
}
|
|
27
27
|
program.name('mvm').description('Monorepo Versions Manager').helpCommand(false).exitOverride();
|
|
28
|
-
program.command('propagate').description('record a released version in downstream mvm.lock files').option('-n, --name <name>', 'package name (defaults to the current package)').option('-v, --version <version>', 'version to record (defaults to the package.json version)').action(
|
|
28
|
+
program.command('propagate').description('record a released version in downstream mvm.lock files').option('-n, --name <name>', 'package name (defaults to the current package)').option('-v, --version <version>', 'version to record (defaults to the package.json version)').action(propagate);
|
|
29
29
|
program.command('seal').description('record the hash of the package artifacts in its mvm.lock').option('-n, --name <name>', 'package name (defaults to the current package)').action(({ name })=>seal(name));
|
|
30
30
|
program.command('changed').description('report 0 if Git or artifacts changed since the last release, or 1 otherwise').option('-g, --git', 'compare workspace files with the last Git release tag').option('-a, --artifacts', 'compare artifacts with the hash saved in mvm.lock').option('-e, --error', 'use the result as the exit code instead of printing it').option('-n, --name <name>', 'package name (defaults to the current package)').action(handleChanged);
|
|
31
31
|
program.command('pin').description('apply dependency versions from mvm.lock to package.json').option('-n, --name <name>', 'package name (defaults to the current package)').option('-r, --range <range>', 'version range: exact, ^ or ~').option(...LOCK_ERROR_OPTION).action(async ({ error, name, range })=>reportMutation(await pin({
|
package/dist/propagate.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
interface PropagateConfig {
|
|
2
|
+
name?: string | undefined;
|
|
3
|
+
version?: string | undefined;
|
|
4
|
+
}
|
|
5
|
+
declare function propagate({ name, version }?: PropagateConfig): Promise<void>;
|
|
2
6
|
export { propagate };
|
package/dist/propagate.js
CHANGED
|
@@ -3,7 +3,7 @@ import { getRepoRootPath } from "./git.js";
|
|
|
3
3
|
import { checkIsJsonObject } from "./json.js";
|
|
4
4
|
import { getLockedDependencies, readLockFile, writeLockFile } from "./lock-file.js";
|
|
5
5
|
import { DEPENDENCY_TYPES, checkIsDependencyProtocol, checkIsPackageVersion, findPackageManifest, listPackageManifests, readPackageJson } from "./package-json.js";
|
|
6
|
-
async function propagate(name, version) {
|
|
6
|
+
async function propagate({ name, version } = {}) {
|
|
7
7
|
const packageDir = process.cwd();
|
|
8
8
|
const manifests = await listPackageManifests(getRepoRootPath(packageDir));
|
|
9
9
|
const selectedManifest = void 0 === name ? readPackageJson(node_path.join(packageDir, 'package.json')) : findPackageManifest(manifests, name);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@b12k/mvm",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Monorepo versions manager",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"monorepo",
|
|
@@ -40,21 +40,21 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@b12k/branch-name-lint": "1.3.0",
|
|
43
|
-
"@commitlint/config-conventional": "21.
|
|
43
|
+
"@commitlint/config-conventional": "21.3.0",
|
|
44
44
|
"@release-it/conventional-changelog": "12.0.2",
|
|
45
|
-
"@rslib/core": "1.0
|
|
45
|
+
"@rslib/core": "1.1.0",
|
|
46
46
|
"@rstest/core": "0.12.6",
|
|
47
|
-
"@types/node": "26.6.
|
|
47
|
+
"@types/node": "26.6.11",
|
|
48
48
|
"@types/semver": "7.8.0",
|
|
49
|
-
"commitlint": "21.
|
|
49
|
+
"commitlint": "21.3.0",
|
|
50
50
|
"eslint-plugin-perfectionist": "5.14.0",
|
|
51
51
|
"husky": "9.1.7",
|
|
52
|
-
"lint-staged": "17.6.
|
|
52
|
+
"lint-staged": "17.6.3",
|
|
53
53
|
"npm-check-updates": "23.1.1",
|
|
54
54
|
"npm-run-all2": "9.1.0",
|
|
55
55
|
"oxfmt": "0.80.0",
|
|
56
56
|
"oxlint": "1.95.0",
|
|
57
|
-
"oxlint-tsgolint": "7.0.
|
|
57
|
+
"oxlint-tsgolint": "7.0.2009",
|
|
58
58
|
"release-it": "21.1.3",
|
|
59
59
|
"tsx": "4.23.15",
|
|
60
60
|
"typescript": "7.0.2"
|