genlayer 0.38.16 → 0.39.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.
@@ -1,5 +1,6 @@
1
1
  name: Release & Publish Package to NPM
2
2
 
3
+ # Triggered on push to main/staging or manual dispatch.
3
4
  on:
4
5
  workflow_dispatch:
5
6
  push:
@@ -16,14 +17,14 @@ permissions:
16
17
  jobs:
17
18
  release:
18
19
  runs-on: ubuntu-latest
19
- environment: npm
20
+ environment: Publish
20
21
  steps:
21
22
  - name: Get CI Bot Token
22
- uses: tibdex/github-app-token@v2
23
+ uses: actions/create-github-app-token@v3
23
24
  id: ci_bot_token
24
25
  with:
25
- app_id: ${{ secrets.CI_BOT_APP_ID }}
26
- private_key: ${{ secrets.CI_BOT_SECRET }}
26
+ client-id: ${{ vars.PUBLISH_CI_APP_CLIENT_ID }}
27
+ private-key: ${{ secrets.PUBLISH_CI_APP_KEY }}
27
28
 
28
29
  - name: Checkout source code
29
30
  uses: actions/checkout@v4
@@ -10,6 +10,7 @@ jobs:
10
10
  # Skip for pre-releases (tags containing '-') unless manually dispatched
11
11
  if: github.event_name != 'release' || !contains(github.event.release.tag_name, '-')
12
12
  runs-on: ubuntu-latest
13
+ environment: Sync-docs
13
14
  permissions:
14
15
  contents: read
15
16
  steps:
@@ -44,29 +45,11 @@ jobs:
44
45
  DOCS_VERSION: ${{ steps.version.outputs.value }}
45
46
  run: node scripts/generate-cli-docs.mjs | cat
46
47
 
47
- - name: Set up Git (for committing to CLI repo)
48
- run: |
49
- git config user.name "github-actions[bot]"
50
- git config user.email "github-actions[bot]@users.noreply.github.com"
51
-
52
- - name: Commit and push docs back to CLI repo (non-beta releases)
53
- if: github.event_name == 'release' && !contains(github.event.release.tag_name, '-')
54
- run: |
55
- set -euo pipefail
56
- if [ -n "$(git status --porcelain docs/api-references || true)" ]; then
57
- git add docs/api-references
58
- VERSION=${{ steps.version.outputs.value }}
59
- git commit -m "docs(cli): update API reference for ${VERSION}"
60
- git push
61
- else
62
- echo "No docs changes to commit"
63
- fi
64
-
65
48
  - name: Generate docs repo token
66
49
  id: app-token
67
- uses: actions/create-github-app-token@v1
50
+ uses: actions/create-github-app-token@v3
68
51
  with:
69
- app-id: ${{ vars.DOCS_SYNC_APP_ID }}
52
+ client-id: ${{ vars.DOCS_SYNC_APP_CLIENT_ID }}
70
53
  private-key: ${{ secrets.DOCS_SYNC_APP_KEY }}
71
54
  repositories: genlayer-docs
72
55
 
@@ -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.1 (2026-05-06)
4
+
5
+ ### Bug Fixes
6
+
7
+ * **ci:** add trigger comment to publish workflow ([#300](https://github.com/genlayerlabs/genlayer-cli/issues/300)) ([f3eeb99](https://github.com/genlayerlabs/genlayer-cli/commit/f3eeb99ce4e9222e9ba1bd9f6d31faf0e11bd380)), closes [#297](https://github.com/genlayerlabs/genlayer-cli/issues/297) [#298](https://github.com/genlayerlabs/genlayer-cli/issues/298)
8
+
9
+ ## 0.39.0 (2026-04-23)
10
+
11
+ ### ⚠ BREAKING CHANGES
12
+
13
+ * **release:** footer or `!:` marker.
14
+
15
+ Background: a stray "BREAKING CHANGE:" line in any commit body would
16
+ trip `conventional-recommended-bump` into recommending a major release,
17
+ which in this CLI's current 0.38.x state would instantly ship 1.0.0
18
+ without any intended stability declaration. Matching the fix applied
19
+
20
+ ### Miscellaneous Chores
21
+
22
+ * **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)
23
+
3
24
  ## 0.38.16 (2026-04-22)
4
25
 
5
26
  ### Bug Fixes
package/dist/index.js CHANGED
@@ -20078,7 +20078,7 @@ var require_cli_table3 = __commonJS({
20078
20078
  import { program } from "commander";
20079
20079
 
20080
20080
  // package.json
20081
- var version = "0.38.16";
20081
+ var version = "0.39.1";
20082
20082
  var package_default = {
20083
20083
  name: "genlayer",
20084
20084
  version,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genlayer",
3
- "version": "0.38.16",
3
+ "version": "0.39.1",
4
4
  "description": "GenLayer Command Line Tool",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
package/.release-it.json DELETED
@@ -1,66 +0,0 @@
1
- {
2
- "git": {
3
- "commitMessage": "Release v${version} [skip ci]",
4
- "tagName": "v${version}",
5
- "requireCleanWorkingDir": false,
6
- "requireUpstream": false,
7
- "requireCommits": false,
8
- "push": true
9
- },
10
- "github": {
11
- "release": true,
12
- "tokenRef": "GITHUB_TOKEN"
13
- },
14
- "npm": {
15
- "publish": true,
16
- "publishArgs": ["--provenance --access public"],
17
- "skipChecks": true
18
- },
19
- "plugins": {
20
- "@release-it/conventional-changelog": {
21
- "preset": "conventionalcommits",
22
- "infile": "CHANGELOG.md",
23
- "types": [
24
- {
25
- "type": "feat",
26
- "section": "Features"
27
- },
28
- {
29
- "type": "fix",
30
- "section": "Bug Fixes"
31
- },
32
- {
33
- "type": "chore",
34
- "section": "Improvement Tasks"
35
- },
36
- {
37
- "type": "ci",
38
- "section": "Continuous Integration"
39
- },
40
- {
41
- "type": "docs",
42
- "section": "Documentation"
43
- },
44
- {
45
- "type": "style",
46
- "section": "Styles"
47
- },
48
- {
49
- "type": "refactor",
50
- "section": "Refactor Tasks"
51
- },
52
- {
53
- "type": "perf",
54
- "section": "Performance Improvements"
55
- },
56
- {
57
- "type": "test",
58
- "section": "Testing"
59
- }
60
- ]
61
- }
62
- },
63
- "hooks": {
64
- "after:bump": "npm run build"
65
- }
66
- }