genlayer 0.38.15 → 0.39.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/.github/workflows/smoke.yml +16 -0
- package/.release-it.cjs +87 -0
- package/CHANGELOG.md +21 -0
- package/dist/index.js +2294 -2961
- package/package.json +2 -2
- package/src/commands/account/send.ts +13 -11
- package/tests/smoke.test.ts +4 -1
- package/.release-it.json +0 -66
|
@@ -23,5 +23,21 @@ jobs:
|
|
|
23
23
|
|
|
24
24
|
- run: npm ci
|
|
25
25
|
|
|
26
|
+
# Smoke tests shell out to `node dist/index.js` to exercise the
|
|
27
|
+
# compiled CLI — without a build first, that file doesn't exist
|
|
28
|
+
# and the `genlayer staking validators` assertion fails with
|
|
29
|
+
# MODULE_NOT_FOUND before it can hit the network at all.
|
|
30
|
+
- name: Build CLI
|
|
31
|
+
run: npm run build
|
|
32
|
+
|
|
33
|
+
# The staking subcommands need a keystore for the default account
|
|
34
|
+
# even for read-only listings (BaseAction loads the account to
|
|
35
|
+
# report "your stake"). Create a throwaway one with a known
|
|
36
|
+
# password so the subprocess test in tests/smoke.test.ts can run.
|
|
37
|
+
- name: Create default keystore for CLI subprocess tests
|
|
38
|
+
run: node dist/index.js account create --name default --password ci-smoke-test
|
|
39
|
+
env:
|
|
40
|
+
CI: true
|
|
41
|
+
|
|
26
42
|
- name: Run smoke tests
|
|
27
43
|
run: npm run test:smoke
|
package/.release-it.cjs
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* release-it configuration.
|
|
3
|
+
*
|
|
4
|
+
* Converted from `.release-it.json` to `.cjs` so we can supply a custom
|
|
5
|
+
* `whatBump` function that caps the recommended bump at `minor`. Reason:
|
|
6
|
+
*
|
|
7
|
+
* `@release-it/conventional-changelog` forwards the default bump logic to
|
|
8
|
+
* `conventional-recommended-bump`, whose `conventionalcommits` preset always
|
|
9
|
+
* returns `major` when any commit's body contains a "BREAKING CHANGE" footer
|
|
10
|
+
* (case-insensitive) or a `!:` marker. That would silently jump this CLI
|
|
11
|
+
* from 0.x → 1.0.0 on a single stray commit, which is never what we want.
|
|
12
|
+
*
|
|
13
|
+
* This override forces the recommended bump to stop at `minor`. A genuine
|
|
14
|
+
* major release still requires an operator to pass `release-it major`
|
|
15
|
+
* explicitly, which is how most mature TS libraries handle it.
|
|
16
|
+
*
|
|
17
|
+
* `.release-it.json` takes precedence over `.release-it.cjs` in release-it's
|
|
18
|
+
* config resolution order, so the JSON file must not exist.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
module.exports = {
|
|
22
|
+
git: {
|
|
23
|
+
commitMessage: "Release v${version} [skip ci]",
|
|
24
|
+
tagName: "v${version}",
|
|
25
|
+
requireCleanWorkingDir: false,
|
|
26
|
+
requireUpstream: false,
|
|
27
|
+
requireCommits: false,
|
|
28
|
+
push: true,
|
|
29
|
+
},
|
|
30
|
+
github: {
|
|
31
|
+
release: true,
|
|
32
|
+
tokenRef: "GITHUB_TOKEN",
|
|
33
|
+
},
|
|
34
|
+
npm: {
|
|
35
|
+
publish: true,
|
|
36
|
+
publishArgs: ["--provenance --access public"],
|
|
37
|
+
skipChecks: true,
|
|
38
|
+
},
|
|
39
|
+
plugins: {
|
|
40
|
+
"@release-it/conventional-changelog": {
|
|
41
|
+
preset: "conventionalcommits",
|
|
42
|
+
infile: "CHANGELOG.md",
|
|
43
|
+
/**
|
|
44
|
+
* Cap automatic bumps at minor. Levels: 0 = major, 1 = minor, 2 = patch.
|
|
45
|
+
* BREAKING CHANGE footer or `!:` marker → minor (was: major)
|
|
46
|
+
* feat: → minor (unchanged)
|
|
47
|
+
* fix: / chore: / etc. → patch (unchanged)
|
|
48
|
+
* Run `release-it major` manually for a genuine major release.
|
|
49
|
+
*/
|
|
50
|
+
whatBump: (commits) => {
|
|
51
|
+
const hasBreaking = commits.some((c) => {
|
|
52
|
+
const bangMarker = typeof c.header === "string" && /^[^:!\s]+!:/.test(c.header);
|
|
53
|
+
const breakingFooter =
|
|
54
|
+
Array.isArray(c.notes) && c.notes.some((n) => /BREAKING[ -]CHANGE/i.test(n.title ?? ""));
|
|
55
|
+
return bangMarker || breakingFooter;
|
|
56
|
+
});
|
|
57
|
+
const hasFeat = commits.some((c) => c.type === "feat");
|
|
58
|
+
|
|
59
|
+
if (hasBreaking) {
|
|
60
|
+
return {
|
|
61
|
+
level: 1,
|
|
62
|
+
reason:
|
|
63
|
+
"BREAKING CHANGE detected; auto-bump capped at minor. Run `release-it major` to force a major release.",
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
if (hasFeat) {
|
|
67
|
+
return { level: 1, reason: "feat commits present → minor" };
|
|
68
|
+
}
|
|
69
|
+
return { level: 2, reason: "no feat/breaking commits → patch" };
|
|
70
|
+
},
|
|
71
|
+
types: [
|
|
72
|
+
{ type: "feat", section: "Features" },
|
|
73
|
+
{ type: "fix", section: "Bug Fixes" },
|
|
74
|
+
{ type: "chore", section: "Improvement Tasks" },
|
|
75
|
+
{ type: "ci", section: "Continuous Integration" },
|
|
76
|
+
{ type: "docs", section: "Documentation" },
|
|
77
|
+
{ type: "style", section: "Styles" },
|
|
78
|
+
{ type: "refactor", section: "Refactor Tasks" },
|
|
79
|
+
{ type: "perf", section: "Performance Improvements" },
|
|
80
|
+
{ type: "test", section: "Testing" },
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
hooks: {
|
|
85
|
+
"after:bump": "npm run build",
|
|
86
|
+
},
|
|
87
|
+
};
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.39.0 (2026-04-23)
|
|
4
|
+
|
|
5
|
+
### ⚠ BREAKING CHANGES
|
|
6
|
+
|
|
7
|
+
* **release:** footer or `!:` marker.
|
|
8
|
+
|
|
9
|
+
Background: a stray "BREAKING CHANGE:" line in any commit body would
|
|
10
|
+
trip `conventional-recommended-bump` into recommending a major release,
|
|
11
|
+
which in this CLI's current 0.38.x state would instantly ship 1.0.0
|
|
12
|
+
without any intended stability declaration. Matching the fix applied
|
|
13
|
+
|
|
14
|
+
### Miscellaneous Chores
|
|
15
|
+
|
|
16
|
+
* **release:** cap auto-bumps at minor to avoid accidental majors ([#295](https://github.com/genlayerlabs/genlayer-cli/issues/295)) ([d0b5519](https://github.com/genlayerlabs/genlayer-cli/commit/d0b551931499c7c666ad27dfd6be21f9cd5f8db1)), closes [#159](https://github.com/genlayerlabs/genlayer-cli/issues/159)
|
|
17
|
+
|
|
18
|
+
## 0.38.16 (2026-04-22)
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **account:** send parses plain integer as wei, not GEN ([#294](https://github.com/genlayerlabs/genlayer-cli/issues/294)) ([660e745](https://github.com/genlayerlabs/genlayer-cli/commit/660e745678c717eeff3f0a5496203c8a4952e680)), closes [genlayer-js#155](https://github.com/genlayerlabs/genlayer-js/issues/155)
|
|
23
|
+
|
|
3
24
|
## 0.38.15 (2026-04-14)
|
|
4
25
|
|
|
5
26
|
### Bug Fixes
|