@regardio/dev 2.4.1 → 2.6.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.
@@ -0,0 +1,116 @@
1
+ # Regardio npm-publishing workflow — Forgejo Actions
2
+ #
3
+ # Pushes to staging and production are driven by ship tooling, not by hand:
4
+ # pnpm ship:staging — fast-forward main → staging (no version bump)
5
+ # pnpm ship:production — version bump + main → production + sync staging
6
+ # pnpm ship:hotfix finish — version bump + hotfix → production → staging → main
7
+ #
8
+ # Full documentation: node_modules/@regardio/dev/docs/en/tools/releases.md
9
+ #
10
+ # This template covers the npm-publishing case.
11
+ # Adapt the publish job for Docker / Coolify deployments as needed.
12
+ #
13
+ # Required setup:
14
+ # 1. Ship scripts in package.json (ship:hotfix, ship:production, ship:staging)
15
+ # 2. .versionrc.json in each publishable package directory
16
+ # (template: node_modules/@regardio/dev/templates/versionrc/.versionrc.json)
17
+ # 3. staging and production branches created and pushed
18
+ # 4. NPM_TOKEN repo secret; first publish of any new package done locally
19
+ #
20
+ # NOTE: npm provenance is not supported on Forgejo. If Forgejo is added to
21
+ # npm's trusted-publisher list in the future, add --provenance to the publish step.
22
+
23
+ name: Release
24
+
25
+ on:
26
+ push:
27
+ branches: [staging, production]
28
+
29
+ concurrency:
30
+ group: ${{ github.workflow }}-${{ github.ref }}
31
+ cancel-in-progress: ${{ github.ref_name == 'staging' }}
32
+
33
+ jobs:
34
+ typecheck:
35
+ name: ʦ TypeScript
36
+ # Husky enforces typecheck pre-commit; only re-run on production to guard against hotfixes.
37
+ if: github.ref_name == 'production'
38
+ runs-on: codeberg-small
39
+ timeout-minutes: 8
40
+ steps:
41
+ - uses: actions/checkout@v5
42
+ with:
43
+ fetch-depth: 1
44
+ - uses: actions/setup-node@v4
45
+ with:
46
+ node-version: '24'
47
+ - run: corepack enable
48
+ - name: Get pnpm store path
49
+ id: pnpm-store
50
+ run: echo "path=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
51
+ - uses: actions/cache@v4
52
+ with:
53
+ path: ${{ steps.pnpm-store.outputs.path }}
54
+ key: pnpm-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
55
+ restore-keys: pnpm-${{ runner.os }}-
56
+ - run: pnpm install --frozen-lockfile --ignore-scripts --prefer-offline
57
+ - run: pnpm typecheck
58
+
59
+ test:
60
+ name: ⚫️ Test
61
+ runs-on: codeberg-small
62
+ timeout-minutes: 10
63
+ steps:
64
+ - uses: actions/checkout@v5
65
+ with:
66
+ fetch-depth: 1
67
+ - uses: actions/setup-node@v4
68
+ with:
69
+ node-version: '24'
70
+ - run: corepack enable
71
+ - name: Get pnpm store path
72
+ id: pnpm-store
73
+ run: echo "path=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
74
+ - uses: actions/cache@v4
75
+ with:
76
+ path: ${{ steps.pnpm-store.outputs.path }}
77
+ key: pnpm-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
78
+ restore-keys: pnpm-${{ runner.os }}-
79
+ - run: pnpm install --frozen-lockfile --ignore-scripts --prefer-offline
80
+ - run: pnpm test
81
+
82
+ publish:
83
+ name: 📦 Publish
84
+ needs: [typecheck, test]
85
+ if: |
86
+ always() &&
87
+ github.ref_name == 'production' &&
88
+ needs.typecheck.result == 'success' &&
89
+ needs.test.result == 'success'
90
+ runs-on: codeberg-small
91
+ timeout-minutes: 10
92
+ steps:
93
+ - uses: actions/checkout@v5
94
+ with:
95
+ fetch-depth: 0
96
+ - uses: actions/setup-node@v4
97
+ with:
98
+ node-version: '24'
99
+ - run: corepack enable
100
+ - name: Get pnpm store path
101
+ id: pnpm-store
102
+ run: echo "path=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
103
+ - uses: actions/cache@v4
104
+ with:
105
+ path: ${{ steps.pnpm-store.outputs.path }}
106
+ key: pnpm-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
107
+ restore-keys: pnpm-${{ runner.os }}-
108
+ - name: Configure npm auth
109
+ run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
110
+ env:
111
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
112
+ - run: pnpm install --frozen-lockfile --ignore-scripts --prefer-offline
113
+ - run: pnpm -r build
114
+ - run: pnpm -r publish --access public --no-git-checks
115
+ env:
116
+ NPM_CONFIG_USERCONFIG: /root/.npmrc
@@ -0,0 +1,93 @@
1
+ # Regardio npm-publishing workflow — GitHub Actions
2
+ #
3
+ # Pushes to staging and production are driven by ship tooling, not by hand:
4
+ # pnpm ship:staging — fast-forward main → staging (no version bump)
5
+ # pnpm ship:production — version bump + main → production + sync staging
6
+ # pnpm ship:hotfix finish — version bump + hotfix → production → staging → main
7
+ #
8
+ # Full documentation: node_modules/@regardio/dev/docs/en/tools/releases.md
9
+ #
10
+ # This template covers the npm-publishing case.
11
+ # Adapt the publish job for Docker / Cloudflare deployments as needed.
12
+ #
13
+ # Required setup:
14
+ # 1. Ship scripts in package.json (ship:hotfix, ship:production, ship:staging)
15
+ # 2. .versionrc.json in each publishable package directory
16
+ # (template: node_modules/@regardio/dev/templates/versionrc/.versionrc.json)
17
+ # 3. staging and production branches created and pushed
18
+ # 4. NPM_TOKEN repo secret; first publish of any new package done locally
19
+
20
+ name: Release
21
+
22
+ on:
23
+ push:
24
+ branches: [staging, production]
25
+
26
+ concurrency:
27
+ group: ${{ github.workflow }}-${{ github.ref }}
28
+ cancel-in-progress: ${{ github.ref_name == 'staging' }}
29
+
30
+ jobs:
31
+ typecheck:
32
+ name: ʦ TypeScript
33
+ # Husky enforces typecheck pre-commit; only re-run on production to guard against hotfixes.
34
+ if: github.ref_name == 'production'
35
+ runs-on: ubuntu-latest
36
+ timeout-minutes: 8
37
+ steps:
38
+ - uses: actions/checkout@v6
39
+ with:
40
+ fetch-depth: 1
41
+ - uses: pnpm/action-setup@v5
42
+ - uses: actions/setup-node@v6
43
+ with:
44
+ node-version: 24
45
+ cache: pnpm
46
+ - run: pnpm install --frozen-lockfile --ignore-scripts --prefer-offline
47
+ - run: pnpm typecheck
48
+
49
+ test:
50
+ name: ⚫️ Test
51
+ runs-on: ubuntu-latest
52
+ timeout-minutes: 10
53
+ steps:
54
+ - uses: actions/checkout@v6
55
+ with:
56
+ fetch-depth: 1
57
+ - uses: pnpm/action-setup@v5
58
+ - uses: actions/setup-node@v6
59
+ with:
60
+ node-version: 24
61
+ cache: pnpm
62
+ - run: pnpm install --frozen-lockfile --ignore-scripts --prefer-offline
63
+ - run: pnpm test
64
+
65
+ publish:
66
+ name: 📦 Publish
67
+ needs: [typecheck, test]
68
+ if: |
69
+ always() &&
70
+ github.ref_name == 'production' &&
71
+ needs.typecheck.result == 'success' &&
72
+ needs.test.result == 'success'
73
+ runs-on: ubuntu-latest
74
+ timeout-minutes: 10
75
+ permissions:
76
+ contents: read
77
+ id-token: write
78
+ steps:
79
+ - uses: actions/checkout@v6
80
+ with:
81
+ fetch-depth: 0
82
+ - uses: pnpm/action-setup@v5
83
+ - uses: actions/setup-node@v6
84
+ with:
85
+ node-version: 24
86
+ cache: pnpm
87
+ registry-url: https://registry.npmjs.org
88
+ - run: pnpm install --frozen-lockfile --ignore-scripts --prefer-offline
89
+ - run: pnpm -r build
90
+ - run: pnpm -r publish --access public --no-git-checks
91
+ env:
92
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
93
+ NPM_CONFIG_PROVENANCE: "true"
@@ -0,0 +1,37 @@
1
+ # [Project Name] — Agent Context
2
+
3
+ [One sentence: what this project is and its role.]
4
+
5
+ ## Standards
6
+
7
+ This project uses `@regardio/dev`. After `pnpm install`, all Regardio standards are available locally:
8
+
9
+ | What | Path |
10
+ |------|------|
11
+ | Full index | `node_modules/@regardio/dev/docs/en/README.md` |
12
+ | Principles | `node_modules/@regardio/dev/docs/en/principles.md` |
13
+ | Writing & language | `node_modules/@regardio/dev/docs/en/writing.md` |
14
+ | Documentation shape | `node_modules/@regardio/dev/docs/en/documentation.md` |
15
+ | Code standards | `node_modules/@regardio/dev/docs/en/standards/` |
16
+ | Toolchain | `node_modules/@regardio/dev/docs/en/tools/` |
17
+
18
+ Read the full index first. It lists every standard and toolchain doc in one place.
19
+
20
+ ## Structure
21
+
22
+ [Describe the project's key directories and what lives where.]
23
+
24
+ ## Commands
25
+
26
+ ```bash
27
+ pnpm build # Build
28
+ pnpm test # Run tests
29
+ pnpm typecheck # Type check
30
+ pnpm lint # Lint
31
+ ```
32
+
33
+ Run `typecheck` and `lint` before calling a task done.
34
+
35
+ ## Working here
36
+
37
+ [Anything project-specific an agent needs to know: domain context, conventions that differ from the standards, areas to be careful about.]
@@ -1,16 +1,48 @@
1
1
  {
2
2
  "commitAll": false,
3
+ "gitRawCommitsOpts": {
4
+ "path": "."
5
+ },
6
+ "releaseCommitMessageFormat": "chore(release): @my-scope/my-pkg@v{{currentTag}}",
3
7
  "sign": false,
4
- "tagPrefix": "v",
8
+ "tagPrefix": "@my-scope/my-pkg@v",
5
9
  "types": [
6
- { "section": "Features", "type": "feat" },
7
- { "section": "Bug Fixes", "type": "fix" },
8
- { "section": "Performance", "type": "perf" },
9
- { "section": "Refactoring", "type": "refactor" },
10
- { "hidden": false, "section": "Chores", "type": "chore" },
11
- { "hidden": true, "type": "docs" },
12
- { "hidden": true, "type": "style" },
13
- { "hidden": true, "type": "test" },
14
- { "hidden": true, "type": "ci" }
10
+ {
11
+ "section": "Features",
12
+ "type": "feat"
13
+ },
14
+ {
15
+ "section": "Bug Fixes",
16
+ "type": "fix"
17
+ },
18
+ {
19
+ "section": "Performance",
20
+ "type": "perf"
21
+ },
22
+ {
23
+ "section": "Refactoring",
24
+ "type": "refactor"
25
+ },
26
+ {
27
+ "hidden": false,
28
+ "section": "Chores",
29
+ "type": "chore"
30
+ },
31
+ {
32
+ "hidden": true,
33
+ "type": "docs"
34
+ },
35
+ {
36
+ "hidden": true,
37
+ "type": "style"
38
+ },
39
+ {
40
+ "hidden": true,
41
+ "type": "test"
42
+ },
43
+ {
44
+ "hidden": true,
45
+ "type": "ci"
46
+ }
15
47
  ]
16
48
  }
@@ -1,68 +0,0 @@
1
- # Regardio Release Workflow (GitHub Actions)
2
- # Copy this file to .github/workflows/release.yml
3
- #
4
- # Required setup:
5
- # 1. Add these scripts to package.json:
6
- # "release": "commit-and-tag-version",
7
- # "release:major": "commit-and-tag-version --release-as major",
8
- # "release:minor": "commit-and-tag-version --release-as minor",
9
- # "release:patch": "commit-and-tag-version --release-as patch",
10
- # "ship:staging": "ship-staging",
11
- # "ship:production": "ship-production",
12
- # "ship:hotfix": "ship-hotfix"
13
- # 2. Copy .versionrc.json from node_modules/@regardio/dev/templates/versionrc/.versionrc.json
14
- # 3. Create the branches:
15
- # git checkout -b staging && git push -u origin staging
16
- # git checkout -b production && git push -u origin production
17
- # 4. Add `NPM_TOKEN` to repo secrets. First npm publish of any new package
18
- # must be done locally (`npm publish --access public`).
19
- #
20
- # Usage:
21
- # - `pnpm ship:staging` deploys to staging for validation (optional)
22
- # - `pnpm ship:production` runs commit-and-tag-version locally, bumps the version,
23
- # merges to production. This workflow then publishes to npm.
24
-
25
- name: Release
26
-
27
- on:
28
- push:
29
- branches:
30
- - production
31
-
32
- concurrency: ${{ github.workflow }}-${{ github.ref }}
33
-
34
- jobs:
35
- release:
36
- name: Release
37
- runs-on: ubuntu-latest
38
- permissions:
39
- contents: write
40
- id-token: write
41
- steps:
42
- - name: Checkout
43
- uses: actions/checkout@v6
44
- with:
45
- fetch-depth: 0
46
-
47
- - name: Setup pnpm
48
- uses: pnpm/action-setup@v5
49
- with:
50
- version: 10
51
-
52
- - name: Setup Node.js
53
- uses: actions/setup-node@v6
54
- with:
55
- node-version: 24
56
- registry-url: https://registry.npmjs.org
57
-
58
- - name: Install dependencies
59
- run: pnpm install --frozen-lockfile
60
-
61
- - name: Build
62
- run: pnpm -r build
63
-
64
- - name: Publish changed public packages
65
- run: pnpm -r publish --access public --no-git-checks
66
- env:
67
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
68
- NPM_CONFIG_PROVENANCE: "true"