versionary 0.2.0 → 0.4.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.
- package/README.md +231 -12
- package/dist/app/release/artifact-rules.d.ts +3 -0
- package/dist/app/release/artifact-rules.js +186 -0
- package/dist/app/release/pr.d.ts +23 -0
- package/dist/{simple → app/release}/pr.js +90 -79
- package/dist/app/release/recovery.d.ts +20 -0
- package/dist/app/release/recovery.js +101 -0
- package/dist/app/release/release.d.ts +19 -0
- package/dist/app/release/release.js +111 -0
- package/dist/app/release/state.d.ts +9 -0
- package/dist/app/release/state.js +93 -0
- package/dist/app/release/verify.d.ts +2 -0
- package/dist/app/release/verify.js +5 -0
- package/dist/cli/index.js +71 -15
- package/dist/config/load-config.js +2 -12
- package/dist/config/schema.d.ts +1 -0
- package/dist/config/schema.js +34 -1
- package/dist/domain/release/changelog.d.ts +12 -0
- package/dist/domain/release/changelog.js +123 -0
- package/dist/{simple → domain/release}/plan.d.ts +4 -3
- package/dist/{simple → domain/release}/plan.js +32 -15
- package/dist/domain/release/semver.d.ts +15 -0
- package/dist/domain/release/semver.js +111 -0
- package/dist/domain/strategy/node.d.ts +2 -0
- package/dist/domain/strategy/node.js +67 -0
- package/dist/domain/strategy/r.d.ts +2 -0
- package/dist/domain/strategy/r.js +46 -0
- package/dist/domain/strategy/resolve.d.ts +3 -0
- package/dist/domain/strategy/resolve.js +19 -0
- package/dist/domain/strategy/rust.d.ts +2 -0
- package/dist/domain/strategy/rust.js +369 -0
- package/dist/domain/strategy/simple.d.ts +2 -0
- package/dist/domain/strategy/simple.js +28 -0
- package/dist/domain/strategy/types.d.ts +7 -0
- package/dist/domain/strategy/types.js +2 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +5 -1
- package/dist/infra/git/commits.d.ts +65 -0
- package/dist/infra/git/commits.js +436 -0
- package/dist/infra/scm/github/plugin.d.ts +1 -0
- package/dist/infra/scm/github/plugin.js +5 -0
- package/dist/infra/scm/runtime.d.ts +2 -0
- package/dist/infra/scm/runtime.js +24 -0
- package/dist/infra/scm/types.d.ts +1 -0
- package/dist/infra/scm/types.js +2 -0
- package/dist/plugins/runtime.d.ts +1 -2
- package/dist/plugins/runtime.js +3 -22
- package/dist/scm/github-plugin.js +133 -40
- package/dist/strategies/node.d.ts +1 -0
- package/dist/strategies/node.js +5 -0
- package/dist/strategies/resolve.d.ts +1 -0
- package/dist/strategies/resolve.js +5 -0
- package/dist/strategies/simple.d.ts +1 -0
- package/dist/strategies/simple.js +5 -0
- package/dist/strategies/types.d.ts +1 -0
- package/dist/strategies/types.js +2 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/plugins.d.ts +1 -0
- package/dist/verify/verify-project.js +3 -1
- package/package.json +3 -2
- package/dist/simple/changelog.d.ts +0 -3
- package/dist/simple/changelog.js +0 -46
- package/dist/simple/git.d.ts +0 -10
- package/dist/simple/git.js +0 -114
- package/dist/simple/pr.d.ts +0 -15
- package/dist/simple/release.d.ts +0 -1
- package/dist/simple/release.js +0 -77
- package/dist/simple/semver.d.ts +0 -8
- package/dist/simple/semver.js +0 -25
- package/dist/simple/state.d.ts +0 -3
- package/dist/simple/state.js +0 -47
- /package/dist/{simple → infra/git}/repo-url.d.ts +0 -0
- /package/dist/{simple → infra/git}/repo-url.js +0 -0
package/dist/simple/state.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getBaselineStatePath = getBaselineStatePath;
|
|
7
|
-
exports.readBaselineSha = readBaselineSha;
|
|
8
|
-
exports.writeBaselineSha = writeBaselineSha;
|
|
9
|
-
const node_fs_1 = __importDefault(require("node:fs"));
|
|
10
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
11
|
-
const node_child_process_1 = require("node:child_process");
|
|
12
|
-
const load_config_js_1 = require("../config/load-config.js");
|
|
13
|
-
function getBaselineStatePath(cwd) {
|
|
14
|
-
const loaded = (0, load_config_js_1.loadConfig)(cwd);
|
|
15
|
-
const configured = loaded.config["baseline-file"];
|
|
16
|
-
if (configured) {
|
|
17
|
-
return node_path_1.default.join(cwd, configured);
|
|
18
|
-
}
|
|
19
|
-
const preferred = node_path_1.default.join(cwd, ".versionary-manifest.json");
|
|
20
|
-
if (node_fs_1.default.existsSync(preferred)) {
|
|
21
|
-
return preferred;
|
|
22
|
-
}
|
|
23
|
-
const legacy = node_path_1.default.join(cwd, "versionary.versions.json");
|
|
24
|
-
if (node_fs_1.default.existsSync(legacy)) {
|
|
25
|
-
return legacy;
|
|
26
|
-
}
|
|
27
|
-
return preferred;
|
|
28
|
-
}
|
|
29
|
-
function readBaselineSha(cwd = process.cwd()) {
|
|
30
|
-
const filePath = getBaselineStatePath(cwd);
|
|
31
|
-
if (!node_fs_1.default.existsSync(filePath)) {
|
|
32
|
-
return null;
|
|
33
|
-
}
|
|
34
|
-
const parsed = JSON.parse(node_fs_1.default.readFileSync(filePath, "utf8"));
|
|
35
|
-
return parsed.baselineSha ?? null;
|
|
36
|
-
}
|
|
37
|
-
function writeBaselineSha(cwd = process.cwd(), sha) {
|
|
38
|
-
const baselineSha = sha ??
|
|
39
|
-
(0, node_child_process_1.execFileSync)("git", ["rev-parse", "HEAD"], {
|
|
40
|
-
cwd,
|
|
41
|
-
encoding: "utf8",
|
|
42
|
-
stdio: ["ignore", "pipe", "ignore"],
|
|
43
|
-
}).trim();
|
|
44
|
-
const filePath = getBaselineStatePath(cwd);
|
|
45
|
-
const next = { baselineSha };
|
|
46
|
-
node_fs_1.default.writeFileSync(filePath, `${JSON.stringify(next, null, 2)}\n`, "utf8");
|
|
47
|
-
}
|
|
File without changes
|
|
File without changes
|