glab-setup-git-identity 0.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.
- package/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/.github/workflows/release.yml +372 -0
- package/.husky/pre-commit +1 -0
- package/.jscpd.json +20 -0
- package/.prettierignore +7 -0
- package/.prettierrc +10 -0
- package/CHANGELOG.md +143 -0
- package/LICENSE +24 -0
- package/README.md +455 -0
- package/bunfig.toml +3 -0
- package/deno.json +7 -0
- package/docs/case-studies/issue-13/README.md +195 -0
- package/docs/case-studies/issue-13/hive-mind-issue-960.json +23 -0
- package/docs/case-studies/issue-13/hive-mind-pr-961-diff.txt +773 -0
- package/docs/case-studies/issue-13/hive-mind-pr-961.json +126 -0
- package/docs/case-studies/issue-21/README.md +384 -0
- package/docs/case-studies/issue-21/ci-logs/run-20803315337.txt +1188 -0
- package/docs/case-studies/issue-21/ci-logs/run-20885464993.txt +1310 -0
- package/docs/case-studies/issue-21/issue-111-data.txt +15 -0
- package/docs/case-studies/issue-21/issue-113-data.txt +15 -0
- package/docs/case-studies/issue-21/pr-112-data.json +109 -0
- package/docs/case-studies/issue-21/pr-112-diff.patch +1336 -0
- package/docs/case-studies/issue-21/pr-114-data.json +126 -0
- package/docs/case-studies/issue-21/pr-114-diff.patch +879 -0
- package/docs/case-studies/issue-3/README.md +338 -0
- package/docs/case-studies/issue-3/created-issues.md +32 -0
- package/docs/case-studies/issue-3/issue-data.json +29 -0
- package/docs/case-studies/issue-3/original-format-release-notes.mjs +212 -0
- package/docs/case-studies/issue-3/reference-pr-59-diff.txt +614 -0
- package/docs/case-studies/issue-3/reference-pr-59.json +109 -0
- package/docs/case-studies/issue-3/release-v0.1.0.json +9 -0
- package/docs/case-studies/issue-3/repositories-with-same-script.json +22 -0
- package/docs/case-studies/issue-3/research-notes.md +33 -0
- package/docs/case-studies/issue-7/BEST-PRACTICES-COMPARISON.md +334 -0
- package/docs/case-studies/issue-7/FORMATTER-COMPARISON.md +649 -0
- package/docs/case-studies/issue-7/current-repository-analysis.json +70 -0
- package/docs/case-studies/issue-7/effect-template-analysis.json +178 -0
- package/eslint.config.js +91 -0
- package/examples/basic-usage.js +64 -0
- package/experiments/test-changeset-scripts.mjs +303 -0
- package/experiments/test-failure-detection.mjs +143 -0
- package/experiments/test-format-major-changes.mjs +49 -0
- package/experiments/test-format-minor-changes.mjs +52 -0
- package/experiments/test-format-no-hash.mjs +43 -0
- package/experiments/test-format-patch-changes.mjs +46 -0
- package/package.json +80 -0
- package/scripts/changeset-version.mjs +75 -0
- package/scripts/check-changesets.mjs +67 -0
- package/scripts/check-version.mjs +129 -0
- package/scripts/create-github-release.mjs +93 -0
- package/scripts/create-manual-changeset.mjs +89 -0
- package/scripts/detect-code-changes.mjs +194 -0
- package/scripts/format-github-release.mjs +83 -0
- package/scripts/format-release-notes.mjs +219 -0
- package/scripts/instant-version-bump.mjs +172 -0
- package/scripts/js-paths.mjs +177 -0
- package/scripts/merge-changesets.mjs +263 -0
- package/scripts/publish-to-npm.mjs +302 -0
- package/scripts/setup-npm.mjs +37 -0
- package/scripts/validate-changeset.mjs +265 -0
- package/scripts/version-and-commit.mjs +284 -0
- package/src/cli.js +386 -0
- package/src/index.d.ts +255 -0
- package/src/index.js +563 -0
- package/tests/index.test.js +137 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changesets
|
|
2
|
+
|
|
3
|
+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
+
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
+
|
|
7
|
+
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
|
|
3
|
+
"changelog": "@changesets/cli/changelog",
|
|
4
|
+
"commit": false,
|
|
5
|
+
"fixed": [],
|
|
6
|
+
"linked": [],
|
|
7
|
+
"access": "public",
|
|
8
|
+
"baseBranch": "main",
|
|
9
|
+
"updateInternalDependencies": "patch",
|
|
10
|
+
"ignore": []
|
|
11
|
+
}
|
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
name: Checks and release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [opened, synchronize, reopened]
|
|
9
|
+
# Manual release support - consolidated here to work with npm trusted publishing
|
|
10
|
+
# npm only allows ONE workflow file as trusted publisher, so all publishing
|
|
11
|
+
# must go through this workflow (release.yml)
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
inputs:
|
|
14
|
+
release_mode:
|
|
15
|
+
description: 'Manual release mode'
|
|
16
|
+
required: true
|
|
17
|
+
type: choice
|
|
18
|
+
default: 'instant'
|
|
19
|
+
options:
|
|
20
|
+
- instant
|
|
21
|
+
- changeset-pr
|
|
22
|
+
bump_type:
|
|
23
|
+
description: 'Manual release type'
|
|
24
|
+
required: true
|
|
25
|
+
type: choice
|
|
26
|
+
options:
|
|
27
|
+
- patch
|
|
28
|
+
- minor
|
|
29
|
+
- major
|
|
30
|
+
description:
|
|
31
|
+
description: 'Manual release description (optional)'
|
|
32
|
+
required: false
|
|
33
|
+
type: string
|
|
34
|
+
|
|
35
|
+
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
36
|
+
|
|
37
|
+
jobs:
|
|
38
|
+
# === DETECT CHANGES - determines which jobs should run ===
|
|
39
|
+
detect-changes:
|
|
40
|
+
name: Detect Changes
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
if: github.event_name != 'workflow_dispatch'
|
|
43
|
+
outputs:
|
|
44
|
+
mjs-changed: ${{ steps.changes.outputs.mjs-changed }}
|
|
45
|
+
js-changed: ${{ steps.changes.outputs.js-changed }}
|
|
46
|
+
package-changed: ${{ steps.changes.outputs.package-changed }}
|
|
47
|
+
docs-changed: ${{ steps.changes.outputs.docs-changed }}
|
|
48
|
+
workflow-changed: ${{ steps.changes.outputs.workflow-changed }}
|
|
49
|
+
any-code-changed: ${{ steps.changes.outputs.any-code-changed }}
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v4
|
|
52
|
+
with:
|
|
53
|
+
fetch-depth: 0
|
|
54
|
+
|
|
55
|
+
- name: Detect changes
|
|
56
|
+
id: changes
|
|
57
|
+
env:
|
|
58
|
+
GITHUB_EVENT_NAME: ${{ github.event_name }}
|
|
59
|
+
GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
60
|
+
GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
61
|
+
run: node scripts/detect-code-changes.mjs
|
|
62
|
+
|
|
63
|
+
# === VERSION CHANGE CHECK ===
|
|
64
|
+
# Prohibit manual version changes in package.json - versions should only be changed by CI/CD
|
|
65
|
+
version-check:
|
|
66
|
+
name: Check for Manual Version Changes
|
|
67
|
+
runs-on: ubuntu-latest
|
|
68
|
+
if: github.event_name == 'pull_request'
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v4
|
|
71
|
+
with:
|
|
72
|
+
fetch-depth: 0
|
|
73
|
+
|
|
74
|
+
- name: Check for version changes in package.json
|
|
75
|
+
env:
|
|
76
|
+
GITHUB_HEAD_REF: ${{ github.head_ref }}
|
|
77
|
+
GITHUB_BASE_REF: ${{ github.base_ref }}
|
|
78
|
+
run: node scripts/check-version.mjs
|
|
79
|
+
|
|
80
|
+
# === CHANGESET CHECK - only runs on PRs with code changes ===
|
|
81
|
+
# Docs-only PRs (./docs folder, markdown files) don't require changesets
|
|
82
|
+
changeset-check:
|
|
83
|
+
name: Check for Changesets
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
needs: [detect-changes]
|
|
86
|
+
if: github.event_name == 'pull_request' && needs.detect-changes.outputs.any-code-changed == 'true'
|
|
87
|
+
steps:
|
|
88
|
+
- uses: actions/checkout@v4
|
|
89
|
+
with:
|
|
90
|
+
fetch-depth: 0
|
|
91
|
+
|
|
92
|
+
- name: Setup Node.js
|
|
93
|
+
uses: actions/setup-node@v4
|
|
94
|
+
with:
|
|
95
|
+
node-version: '20.x'
|
|
96
|
+
|
|
97
|
+
- name: Install dependencies
|
|
98
|
+
run: npm install
|
|
99
|
+
|
|
100
|
+
- name: Check for changesets
|
|
101
|
+
env:
|
|
102
|
+
# Pass PR context to the validation script
|
|
103
|
+
GITHUB_BASE_REF: ${{ github.base_ref }}
|
|
104
|
+
GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
105
|
+
GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
106
|
+
run: |
|
|
107
|
+
# Skip changeset check for automated version PRs
|
|
108
|
+
if [[ "${{ github.head_ref }}" == "changeset-release/"* ]]; then
|
|
109
|
+
echo "Skipping changeset check for automated release PR"
|
|
110
|
+
exit 0
|
|
111
|
+
fi
|
|
112
|
+
|
|
113
|
+
# Run changeset validation script
|
|
114
|
+
# This validates that exactly ONE changeset was ADDED by this PR
|
|
115
|
+
# Pre-existing changesets from other merged PRs are ignored
|
|
116
|
+
node scripts/validate-changeset.mjs
|
|
117
|
+
|
|
118
|
+
# === LINT AND FORMAT CHECK ===
|
|
119
|
+
# Lint runs independently of changeset-check - it's a fast check that should always run
|
|
120
|
+
# See: https://github.com/link-assistant/hive-mind/pull/1024 for why this dependency was removed
|
|
121
|
+
lint:
|
|
122
|
+
name: Lint and Format Check
|
|
123
|
+
runs-on: ubuntu-latest
|
|
124
|
+
needs: [detect-changes]
|
|
125
|
+
if: |
|
|
126
|
+
github.event_name == 'push' ||
|
|
127
|
+
needs.detect-changes.outputs.mjs-changed == 'true' ||
|
|
128
|
+
needs.detect-changes.outputs.js-changed == 'true' ||
|
|
129
|
+
needs.detect-changes.outputs.docs-changed == 'true' ||
|
|
130
|
+
needs.detect-changes.outputs.package-changed == 'true' ||
|
|
131
|
+
needs.detect-changes.outputs.workflow-changed == 'true'
|
|
132
|
+
steps:
|
|
133
|
+
- uses: actions/checkout@v4
|
|
134
|
+
|
|
135
|
+
- name: Setup Node.js
|
|
136
|
+
uses: actions/setup-node@v4
|
|
137
|
+
with:
|
|
138
|
+
node-version: '20.x'
|
|
139
|
+
|
|
140
|
+
- name: Install dependencies
|
|
141
|
+
run: npm install
|
|
142
|
+
|
|
143
|
+
- name: Run ESLint
|
|
144
|
+
run: npm run lint
|
|
145
|
+
|
|
146
|
+
- name: Check formatting
|
|
147
|
+
run: npm run format:check
|
|
148
|
+
|
|
149
|
+
- name: Check code duplication
|
|
150
|
+
run: npm run check:duplication
|
|
151
|
+
|
|
152
|
+
# Test matrix: 3 runtimes (Node.js, Bun, Deno) x 3 OS (Ubuntu, macOS, Windows)
|
|
153
|
+
test:
|
|
154
|
+
name: Test (${{ matrix.runtime }} on ${{ matrix.os }})
|
|
155
|
+
runs-on: ${{ matrix.os }}
|
|
156
|
+
needs: [detect-changes, changeset-check]
|
|
157
|
+
# Run if: push event, OR changeset-check succeeded, OR changeset-check was skipped (docs-only PR)
|
|
158
|
+
if: always() && (github.event_name == 'push' || needs.changeset-check.result == 'success' || needs.changeset-check.result == 'skipped')
|
|
159
|
+
strategy:
|
|
160
|
+
fail-fast: false
|
|
161
|
+
matrix:
|
|
162
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
163
|
+
runtime: [node, bun, deno]
|
|
164
|
+
steps:
|
|
165
|
+
- uses: actions/checkout@v4
|
|
166
|
+
|
|
167
|
+
- name: Setup Node.js
|
|
168
|
+
if: matrix.runtime == 'node'
|
|
169
|
+
uses: actions/setup-node@v4
|
|
170
|
+
with:
|
|
171
|
+
node-version: '20.x'
|
|
172
|
+
|
|
173
|
+
- name: Install dependencies (Node.js)
|
|
174
|
+
if: matrix.runtime == 'node'
|
|
175
|
+
run: npm install
|
|
176
|
+
|
|
177
|
+
- name: Run tests (Node.js)
|
|
178
|
+
if: matrix.runtime == 'node'
|
|
179
|
+
run: npm test
|
|
180
|
+
|
|
181
|
+
- name: Setup Bun
|
|
182
|
+
if: matrix.runtime == 'bun'
|
|
183
|
+
uses: oven-sh/setup-bun@v2
|
|
184
|
+
with:
|
|
185
|
+
bun-version: latest
|
|
186
|
+
|
|
187
|
+
- name: Install dependencies (Bun)
|
|
188
|
+
if: matrix.runtime == 'bun'
|
|
189
|
+
run: bun install
|
|
190
|
+
|
|
191
|
+
- name: Run tests (Bun)
|
|
192
|
+
if: matrix.runtime == 'bun'
|
|
193
|
+
run: bun test
|
|
194
|
+
|
|
195
|
+
- name: Setup Deno
|
|
196
|
+
if: matrix.runtime == 'deno'
|
|
197
|
+
uses: denoland/setup-deno@v2
|
|
198
|
+
with:
|
|
199
|
+
deno-version: v2.x
|
|
200
|
+
|
|
201
|
+
- name: Run tests (Deno)
|
|
202
|
+
if: matrix.runtime == 'deno'
|
|
203
|
+
run: deno test --allow-read --allow-run --allow-env
|
|
204
|
+
|
|
205
|
+
# Release - only runs on main after tests pass (for push events)
|
|
206
|
+
release:
|
|
207
|
+
name: Release
|
|
208
|
+
needs: [lint, test]
|
|
209
|
+
# Use always() to ensure this job runs even if changeset-check was skipped
|
|
210
|
+
# This is needed because lint/test jobs have a transitive dependency on changeset-check
|
|
211
|
+
if: always() && github.ref == 'refs/heads/main' && github.event_name == 'push' && needs.lint.result == 'success' && needs.test.result == 'success'
|
|
212
|
+
runs-on: ubuntu-latest
|
|
213
|
+
# Permissions required for npm OIDC trusted publishing
|
|
214
|
+
permissions:
|
|
215
|
+
contents: write
|
|
216
|
+
pull-requests: write
|
|
217
|
+
id-token: write
|
|
218
|
+
steps:
|
|
219
|
+
- uses: actions/checkout@v4
|
|
220
|
+
with:
|
|
221
|
+
fetch-depth: 0
|
|
222
|
+
|
|
223
|
+
- name: Setup Node.js
|
|
224
|
+
uses: actions/setup-node@v4
|
|
225
|
+
with:
|
|
226
|
+
node-version: '20.x'
|
|
227
|
+
registry-url: 'https://registry.npmjs.org'
|
|
228
|
+
|
|
229
|
+
- name: Install dependencies
|
|
230
|
+
run: npm install
|
|
231
|
+
|
|
232
|
+
- name: Update npm for OIDC trusted publishing
|
|
233
|
+
run: node scripts/setup-npm.mjs
|
|
234
|
+
|
|
235
|
+
- name: Check for changesets
|
|
236
|
+
id: check_changesets
|
|
237
|
+
run: node scripts/check-changesets.mjs
|
|
238
|
+
|
|
239
|
+
- name: Merge multiple changesets
|
|
240
|
+
if: steps.check_changesets.outputs.has_changesets == 'true' && steps.check_changesets.outputs.changeset_count > 1
|
|
241
|
+
run: |
|
|
242
|
+
echo "Multiple changesets detected, merging..."
|
|
243
|
+
node scripts/merge-changesets.mjs
|
|
244
|
+
|
|
245
|
+
- name: Version packages and commit to main
|
|
246
|
+
if: steps.check_changesets.outputs.has_changesets == 'true'
|
|
247
|
+
id: version
|
|
248
|
+
run: node scripts/version-and-commit.mjs --mode changeset
|
|
249
|
+
|
|
250
|
+
- name: Publish to npm
|
|
251
|
+
# Run if version was committed OR if a previous attempt already committed (for re-runs)
|
|
252
|
+
if: steps.version.outputs.version_committed == 'true' || steps.version.outputs.already_released == 'true'
|
|
253
|
+
id: publish
|
|
254
|
+
run: node scripts/publish-to-npm.mjs --should-pull
|
|
255
|
+
|
|
256
|
+
- name: Create GitHub Release
|
|
257
|
+
if: steps.publish.outputs.published == 'true'
|
|
258
|
+
env:
|
|
259
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
260
|
+
run: node scripts/create-github-release.mjs --release-version "${{ steps.publish.outputs.published_version }}" --repository "${{ github.repository }}"
|
|
261
|
+
|
|
262
|
+
- name: Format GitHub release notes
|
|
263
|
+
if: steps.publish.outputs.published == 'true'
|
|
264
|
+
env:
|
|
265
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
266
|
+
run: node scripts/format-github-release.mjs --release-version "${{ steps.publish.outputs.published_version }}" --repository "${{ github.repository }}" --commit-sha "${{ github.sha }}"
|
|
267
|
+
|
|
268
|
+
# Manual Instant Release - triggered via workflow_dispatch with instant mode
|
|
269
|
+
# This job is in release.yml because npm trusted publishing
|
|
270
|
+
# only allows one workflow file to be registered as a trusted publisher
|
|
271
|
+
instant-release:
|
|
272
|
+
name: Instant Release
|
|
273
|
+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.release_mode == 'instant'
|
|
274
|
+
runs-on: ubuntu-latest
|
|
275
|
+
# Permissions required for npm OIDC trusted publishing
|
|
276
|
+
permissions:
|
|
277
|
+
contents: write
|
|
278
|
+
pull-requests: write
|
|
279
|
+
id-token: write
|
|
280
|
+
steps:
|
|
281
|
+
- uses: actions/checkout@v4
|
|
282
|
+
with:
|
|
283
|
+
fetch-depth: 0
|
|
284
|
+
|
|
285
|
+
- name: Setup Node.js
|
|
286
|
+
uses: actions/setup-node@v4
|
|
287
|
+
with:
|
|
288
|
+
node-version: '20.x'
|
|
289
|
+
registry-url: 'https://registry.npmjs.org'
|
|
290
|
+
|
|
291
|
+
- name: Install dependencies
|
|
292
|
+
run: npm install
|
|
293
|
+
|
|
294
|
+
- name: Update npm for OIDC trusted publishing
|
|
295
|
+
run: node scripts/setup-npm.mjs
|
|
296
|
+
|
|
297
|
+
- name: Version packages and commit to main
|
|
298
|
+
id: version
|
|
299
|
+
run: node scripts/version-and-commit.mjs --mode instant --bump-type "${{ github.event.inputs.bump_type }}" --description "${{ github.event.inputs.description }}"
|
|
300
|
+
|
|
301
|
+
- name: Publish to npm
|
|
302
|
+
# Run if version was committed OR if a previous attempt already committed (for re-runs)
|
|
303
|
+
if: steps.version.outputs.version_committed == 'true' || steps.version.outputs.already_released == 'true'
|
|
304
|
+
id: publish
|
|
305
|
+
run: node scripts/publish-to-npm.mjs
|
|
306
|
+
|
|
307
|
+
- name: Create GitHub Release
|
|
308
|
+
if: steps.publish.outputs.published == 'true'
|
|
309
|
+
env:
|
|
310
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
311
|
+
run: node scripts/create-github-release.mjs --release-version "${{ steps.publish.outputs.published_version }}" --repository "${{ github.repository }}"
|
|
312
|
+
|
|
313
|
+
- name: Format GitHub release notes
|
|
314
|
+
if: steps.publish.outputs.published == 'true'
|
|
315
|
+
env:
|
|
316
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
317
|
+
run: node scripts/format-github-release.mjs --release-version "${{ steps.publish.outputs.published_version }}" --repository "${{ github.repository }}" --commit-sha "${{ github.sha }}"
|
|
318
|
+
|
|
319
|
+
# Manual Changeset PR - creates a pull request with the changeset for review
|
|
320
|
+
changeset-pr:
|
|
321
|
+
name: Create Changeset PR
|
|
322
|
+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.release_mode == 'changeset-pr'
|
|
323
|
+
runs-on: ubuntu-latest
|
|
324
|
+
permissions:
|
|
325
|
+
contents: write
|
|
326
|
+
pull-requests: write
|
|
327
|
+
steps:
|
|
328
|
+
- uses: actions/checkout@v4
|
|
329
|
+
with:
|
|
330
|
+
fetch-depth: 0
|
|
331
|
+
|
|
332
|
+
- name: Setup Node.js
|
|
333
|
+
uses: actions/setup-node@v4
|
|
334
|
+
with:
|
|
335
|
+
node-version: '20.x'
|
|
336
|
+
|
|
337
|
+
- name: Install dependencies
|
|
338
|
+
run: npm install
|
|
339
|
+
|
|
340
|
+
- name: Create changeset file
|
|
341
|
+
run: node scripts/create-manual-changeset.mjs --bump-type "${{ github.event.inputs.bump_type }}" --description "${{ github.event.inputs.description }}"
|
|
342
|
+
|
|
343
|
+
- name: Format changeset with Prettier
|
|
344
|
+
run: |
|
|
345
|
+
# Run Prettier on the changeset file to ensure it matches project style
|
|
346
|
+
npx prettier --write ".changeset/*.md" || true
|
|
347
|
+
|
|
348
|
+
echo "Formatted changeset files"
|
|
349
|
+
|
|
350
|
+
- name: Create Pull Request
|
|
351
|
+
uses: peter-evans/create-pull-request@v7
|
|
352
|
+
with:
|
|
353
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
354
|
+
commit-message: 'chore: add changeset for manual ${{ github.event.inputs.bump_type }} release'
|
|
355
|
+
branch: changeset-manual-release-${{ github.run_id }}
|
|
356
|
+
delete-branch: true
|
|
357
|
+
title: 'chore: manual ${{ github.event.inputs.bump_type }} release'
|
|
358
|
+
body: |
|
|
359
|
+
## Manual Release Request
|
|
360
|
+
|
|
361
|
+
This PR was created by a manual workflow trigger to prepare a **${{ github.event.inputs.bump_type }}** release.
|
|
362
|
+
|
|
363
|
+
### Release Details
|
|
364
|
+
- **Type:** ${{ github.event.inputs.bump_type }}
|
|
365
|
+
- **Description:** ${{ github.event.inputs.description || 'Manual release' }}
|
|
366
|
+
- **Triggered by:** @${{ github.actor }}
|
|
367
|
+
|
|
368
|
+
### Next Steps
|
|
369
|
+
1. Review the changeset in this PR
|
|
370
|
+
2. Merge this PR to main
|
|
371
|
+
3. The automated release workflow will create a version PR
|
|
372
|
+
4. Merge the version PR to publish to npm and create a GitHub release
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npx lint-staged
|
package/.jscpd.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"threshold": 0,
|
|
3
|
+
"minTokens": 30,
|
|
4
|
+
"minLines": 5,
|
|
5
|
+
"skipComments": true,
|
|
6
|
+
"ignore": [
|
|
7
|
+
"**/node_modules/**",
|
|
8
|
+
"**/build/**",
|
|
9
|
+
"**/dist/**",
|
|
10
|
+
"**/*.min.js",
|
|
11
|
+
"**/coverage/**",
|
|
12
|
+
"**/.changeset/**",
|
|
13
|
+
"**/package-lock.json",
|
|
14
|
+
"**/pnpm-lock.yaml",
|
|
15
|
+
"**/yarn.lock"
|
|
16
|
+
],
|
|
17
|
+
"format": "console",
|
|
18
|
+
"reporters": ["console", "html"],
|
|
19
|
+
"output": "./reports/jscpd"
|
|
20
|
+
}
|
package/.prettierignore
ADDED
package/.prettierrc
ADDED
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 2706da7: Add CLI tool and update library to use command-stream
|
|
8
|
+
- Add `glab-setup-git-identity` CLI command with all `glab auth login` options
|
|
9
|
+
- Update README.md to match gh-setup-git-identity structure with "Instead of manually running" section
|
|
10
|
+
- Refactor library to use command-stream for shell command execution
|
|
11
|
+
- Add support for all glab auth login options: --hostname, --token, --stdin, --git-protocol, --api-protocol, --api-host, --use-keyring, --job-token
|
|
12
|
+
- Add lino-arguments dependency for CLI argument parsing
|
|
13
|
+
- Update TypeScript definitions with new options (apiProtocol, apiHost, jobToken, stdin)
|
|
14
|
+
|
|
15
|
+
## 0.5.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 5dcac2b: Implement glab-setup-git-identity - GitLab CLI (glab) based git identity setup
|
|
20
|
+
|
|
21
|
+
This is the initial implementation similar to gh-setup-git-identity but for GitLab.
|
|
22
|
+
|
|
23
|
+
Features:
|
|
24
|
+
- Check GitLab CLI authentication status
|
|
25
|
+
- Run interactive or token-based authentication
|
|
26
|
+
- Get GitLab user information (username and email)
|
|
27
|
+
- Configure git user.name and user.email from GitLab account
|
|
28
|
+
- Support for global and local git config scopes
|
|
29
|
+
- Dry-run mode for previewing changes
|
|
30
|
+
- Support for self-hosted GitLab instances via hostname option
|
|
31
|
+
- Full TypeScript type definitions included
|
|
32
|
+
|
|
33
|
+
## 0.4.0
|
|
34
|
+
|
|
35
|
+
### Minor Changes
|
|
36
|
+
|
|
37
|
+
- e6c2691: Add multi-language repository support for CI/CD scripts
|
|
38
|
+
- Add `scripts/js-paths.mjs` utility for automatic JavaScript package root detection
|
|
39
|
+
- Support both `./package.json` (single-language) and `./js/package.json` (multi-language repos)
|
|
40
|
+
- Add `--legacy-peer-deps` flag to npm install commands in release scripts to fix ERESOLVE errors
|
|
41
|
+
- Save and restore working directory after `cd` commands to fix `command-stream` library's `process.chdir()` behavior
|
|
42
|
+
- Add case study documentation with root cause analysis in `docs/case-studies/issue-21/`
|
|
43
|
+
|
|
44
|
+
## 0.3.0
|
|
45
|
+
|
|
46
|
+
### Minor Changes
|
|
47
|
+
|
|
48
|
+
- 80d9c84: Add CI check to prevent manual version modification in package.json
|
|
49
|
+
- Added `check-version.mjs` script that detects manual version changes in PRs
|
|
50
|
+
- Added `check-changesets.mjs` script to check for pending changesets (converted from inline shell)
|
|
51
|
+
- Added `version-check` job to release.yml workflow
|
|
52
|
+
- Automated release PRs (changeset-release/_ and changeset-manual-release-_) are automatically skipped
|
|
53
|
+
|
|
54
|
+
## 0.2.2
|
|
55
|
+
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- 9a12139: Fix CI/CD check differences between pull request and push events
|
|
59
|
+
|
|
60
|
+
Changes:
|
|
61
|
+
- Add `detect-changes` job with cross-platform `detect-code-changes.mjs` script
|
|
62
|
+
- Make lint job independent of changeset-check (runs based on file changes only)
|
|
63
|
+
- Allow docs-only PRs without changeset requirement
|
|
64
|
+
- Handle changeset-check 'skipped' state in dependent jobs
|
|
65
|
+
- Exclude `.changeset/`, `docs/`, `experiments/`, `examples/` folders and markdown files from code changes detection
|
|
66
|
+
|
|
67
|
+
## 0.2.1
|
|
68
|
+
|
|
69
|
+
### Patch Changes
|
|
70
|
+
|
|
71
|
+
- 55aef41: Make Bun the primary runtime choice throughout the template
|
|
72
|
+
- Update all shebangs from `#!/usr/bin/env node` to `#!/usr/bin/env bun` in scripts, experiments, and case studies
|
|
73
|
+
- Update README.md to prioritize Bun in all sections (features, development, runtime support, package managers, scripts reference)
|
|
74
|
+
- Update examples to list Bun first
|
|
75
|
+
- Bun now described as "Primary runtime with highest performance" and "Primary choice" for package management
|
|
76
|
+
- Maintains full compatibility with Node.js and Deno
|
|
77
|
+
|
|
78
|
+
## 0.2.0
|
|
79
|
+
|
|
80
|
+
### Minor Changes
|
|
81
|
+
|
|
82
|
+
- d3f7fcd: Improve changeset CI/CD robustness for concurrent PRs
|
|
83
|
+
- Update validate-changeset.mjs to only check changesets ADDED by the current PR (not pre-existing ones)
|
|
84
|
+
- Add merge-changesets.mjs script to combine multiple pending changesets during release
|
|
85
|
+
- Merged changesets use highest version bump type (major > minor > patch) and combine descriptions chronologically
|
|
86
|
+
- Update release workflow to pass SHA environment variables and add merge step
|
|
87
|
+
- Add comprehensive case study documentation for the CI/CD improvement
|
|
88
|
+
- This prevents PR failures when multiple PRs merge before a release cycle completes
|
|
89
|
+
|
|
90
|
+
## 0.1.4
|
|
91
|
+
|
|
92
|
+
### Patch Changes
|
|
93
|
+
|
|
94
|
+
- e9703b9: Add ESLint complexity rules with reasonable thresholds
|
|
95
|
+
|
|
96
|
+
## 0.1.3
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- 0198aaa: Add case study documentation comparing best practices from effect-template
|
|
101
|
+
|
|
102
|
+
This changeset adds comprehensive documentation analyzing best practices from
|
|
103
|
+
ProverCoderAI/effect-template repository, identifying gaps in our current setup,
|
|
104
|
+
and providing prioritized recommendations for improvements.
|
|
105
|
+
|
|
106
|
+
Key findings include missing best practices like code duplication detection (jscpd),
|
|
107
|
+
ESLint complexity rules, VS Code settings, and test coverage thresholds.
|
|
108
|
+
|
|
109
|
+
## 0.1.2
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- 2ea9b78: Enforce strict no-unused-vars ESLint rule without exceptions. All unused variables, arguments, and caught errors must now be removed or used. The `_` prefix no longer suppresses unused variable warnings.
|
|
114
|
+
|
|
115
|
+
## 0.1.1
|
|
116
|
+
|
|
117
|
+
### Patch Changes
|
|
118
|
+
|
|
119
|
+
- 042e877: Fix GitHub release formatting to support Major/Minor/Patch changes
|
|
120
|
+
|
|
121
|
+
The release formatting script now correctly handles all changeset types (Major, Minor, Patch) instead of only Patch changes. This ensures that:
|
|
122
|
+
- Section headers are removed from release notes
|
|
123
|
+
- PR detection works for all release types
|
|
124
|
+
- NPM badges are added correctly
|
|
125
|
+
|
|
126
|
+
## 0.1.0
|
|
127
|
+
|
|
128
|
+
### Minor Changes
|
|
129
|
+
|
|
130
|
+
- 65d76dc: Initial template setup with complete AI-driven development pipeline
|
|
131
|
+
|
|
132
|
+
Features:
|
|
133
|
+
- Multi-runtime support for Node.js, Bun, and Deno
|
|
134
|
+
- Universal testing with test-anywhere framework
|
|
135
|
+
- Automated release workflow with changesets
|
|
136
|
+
- GitHub Actions CI/CD pipeline with 9 test combinations
|
|
137
|
+
- Code quality tools: ESLint + Prettier with Husky pre-commit hooks
|
|
138
|
+
- Package manager agnostic design
|
|
139
|
+
|
|
140
|
+
All notable changes to this project will be documented in this file.
|
|
141
|
+
|
|
142
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
143
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
package/LICENSE
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
This is free and unencumbered software released into the public domain.
|
|
2
|
+
|
|
3
|
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
|
4
|
+
distribute this software, either in source code form or as a compiled
|
|
5
|
+
binary, for any purpose, commercial or non-commercial, and by any
|
|
6
|
+
means.
|
|
7
|
+
|
|
8
|
+
In jurisdictions that recognize copyright laws, the author or authors
|
|
9
|
+
of this software dedicate any and all copyright interest in the
|
|
10
|
+
software to the public domain. We make this dedication for the benefit
|
|
11
|
+
of the public at large and to the detriment of our heirs and
|
|
12
|
+
successors. We intend this dedication to be an overt act of
|
|
13
|
+
relinquishment in perpetuity of all present and future rights to this
|
|
14
|
+
software under copyright law.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
|
20
|
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
|
21
|
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
23
|
+
|
|
24
|
+
For more information, please refer to <https://unlicense.org>
|