@varlet/release 2.2.0 → 2.2.1-alpha.1776224189096
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/cli.js +2 -2
- package/dist/index.js +1 -1
- package/dist/{src-JMmGEAWu.js → src-DwRUa0a2.js} +4 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { c as release, i as lockfileCheck, p as commitLint, s as publish, u as changelog } from "./src-
|
|
2
|
+
import { c as release, i as lockfileCheck, p as commitLint, s as publish, u as changelog } from "./src-DwRUa0a2.js";
|
|
3
3
|
import { cli, command } from "cleye";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/cli.ts
|
|
6
6
|
cli({
|
|
7
7
|
name: "vr",
|
|
8
|
-
version: "2.2.
|
|
8
|
+
version: "2.2.1-alpha.1776224189096",
|
|
9
9
|
commands: [
|
|
10
10
|
command({
|
|
11
11
|
name: "release",
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getPackageJsons, c as release, d as COMMIT_HEADER_RE, f as COMMIT_MESSAGE_RE, h as isVersionCommitMessage, i as lockfileCheck, l as updateVersion, m as getCommitMessage, n as getLockfilePath, o as isSameVersion, p as commitLint, r as installDependencies, s as publish, t as checkLockfileSync, u as changelog } from "./src-
|
|
1
|
+
import { a as getPackageJsons, c as release, d as COMMIT_HEADER_RE, f as COMMIT_MESSAGE_RE, h as isVersionCommitMessage, i as lockfileCheck, l as updateVersion, m as getCommitMessage, n as getLockfilePath, o as isSameVersion, p as commitLint, r as installDependencies, s as publish, t as checkLockfileSync, u as changelog } from "./src-DwRUa0a2.js";
|
|
2
2
|
export { COMMIT_HEADER_RE, COMMIT_MESSAGE_RE, changelog, checkLockfileSync, commitLint, getCommitMessage, getLockfilePath, getPackageJsons, installDependencies, isSameVersion, isVersionCommitMessage, lockfileCheck, publish, release, updateVersion };
|
|
@@ -371,10 +371,9 @@ async function getReleaseVersion(currentVersion) {
|
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
|
-
async function restorePackageJsons() {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
} catch {}
|
|
374
|
+
async function restorePackageJsons(cwd = process.cwd()) {
|
|
375
|
+
const paths = getPackageJsons(cwd).map(({ filePath }) => filePath);
|
|
376
|
+
if (paths.length > 0) await execGit("restore", ...paths);
|
|
378
377
|
}
|
|
379
378
|
async function release(options) {
|
|
380
379
|
const cwd = options.cwd ?? process.cwd();
|
|
@@ -407,7 +406,7 @@ async function release(options) {
|
|
|
407
406
|
await pushGit(expectVersion, options.remote, options.skipGitTag);
|
|
408
407
|
}
|
|
409
408
|
logger.success(`Release version ${expectVersion} successfully!`);
|
|
410
|
-
if (isPreRelease) await restorePackageJsons();
|
|
409
|
+
if (isPreRelease) await restorePackageJsons(cwd);
|
|
411
410
|
} catch (error) {
|
|
412
411
|
logger.error(error);
|
|
413
412
|
process.exit(1);
|