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,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"body": "## Summary\n\nFixes #58 - Resolves two bugs in GitHub release formatting:\n\n1. **Removes incorrect section headers** (\"### Minor Changes\", \"### Major Changes\", \"### Patch Changes\") from release notes\n2. **Enables PR detection** for all release types (Major, Minor, Patch)\n\n## Problem\n\nThe release v0.1.0 showed:\n- ā Incorrect header \"### Minor Changes\" in release notes\n- ā No link to the related pull request #56\n\n### Root Cause\n\nThe `scripts/format-release-notes.mjs` script only handled `### Patch Changes` sections:\n\n```javascript\n// Old code - only matched Patch changes\nconst patchChangesMatchWithHash = currentBody.match(\n /### Patch Changes\\s*\\n\\s*-\\s+([a-f0-9]+):\\s+(.+?)$/s\n);\n```\n\nWhen a Minor or Major release was created:\n1. The regex pattern failed to match\n2. The script exited early with \"ā ļø Could not parse patch changes\"\n3. The section header remained in the release notes\n4. PR detection was skipped entirely\n\n## Solution\n\nUpdated the regex to match **all** changeset types:\n\n```javascript\n// New code - matches Major, Minor, and Patch changes\nconst changesPattern =\n /### (Major|Minor|Patch) Changes\\s*\\n\\s*-\\s+(?:([a-f0-9]+):\\s+)?(.+?)$/s;\n```\n\n### Changes Made\n\n**Modified Files:**\n- `scripts/format-release-notes.mjs` - Fixed regex pattern to handle all changeset types\n- `.changeset/fix-release-formatting.md` - Added changeset for this fix\n\n**Documentation:**\n- `docs/case-studies/issue-58/README.md` - Comprehensive case study analysis\n- `docs/case-studies/issue-58/release-v0.1.0.json` - Raw release data\n- `docs/case-studies/issue-58/release-v0.1.0-api.json` - GitHub API response\n- `docs/case-studies/issue-58/template-format-release-notes.mjs` - Template repo version for comparison\n\n## Case Study Highlights\n\nš **Full analysis available in:** `docs/case-studies/issue-58/README.md`\n\n### Key Findings\n\n1. **Timeline reconstruction** from release creation to bug discovery\n2. **Root cause identified** through code analysis and regex pattern testing\n3. **Template repository affected** - The same bug exists in the upstream template at `link-foundation/js-ai-driven-development-pipeline-template`\n4. **Solution validated** through comprehensive testing\n\n### Next Steps\n\n- [x] Fix implemented in this repository\n- [ ] Create issue in template repository (will be done after this PR is merged)\n- [ ] Verify fix works on future releases\n\n## Expected Behavior After Fix\n\nRelease notes will now display cleanly:\n\n```markdown\nAdd support for google/gemini-3-pro model alias\n- Added `google/gemini-3-pro` as an alias to `gemini-3-pro-preview`\n- Updated README.md with Google Gemini usage examples\n...\n\n**Related Pull Request:** #56\n\n---\n\n[](https://www.npmjs.com/package/@link-assistant/agent/v/0.1.0)\n```\n\nā
No section headers\nā
PR link included\nā
Clean formatting\n\n## Testing\n\nThe fix has been implemented and committed. CI will validate:\n- ā
Changeset validation passes\n- ā
Linting passes\n- ā
Formatting passes\n- ā
Tests pass\n\n## Related Issues\n\n- Fixes #58\n- Related to upstream template repository (issue to be created)\n\n---\n\nš¤ Generated with [Claude Code](https://claude.com/claude-code)",
|
|
3
|
+
"commits": [
|
|
4
|
+
{
|
|
5
|
+
"authoredDate": "2025-12-16T21:04:54Z",
|
|
6
|
+
"authors": [
|
|
7
|
+
{
|
|
8
|
+
"email": "drakonard@gmail.com",
|
|
9
|
+
"id": "MDQ6VXNlcjE0MzE5MDQ=",
|
|
10
|
+
"login": "konard",
|
|
11
|
+
"name": "konard"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"committedDate": "2025-12-16T21:04:54Z",
|
|
15
|
+
"messageBody": "Adding CLAUDE.md with task information for AI processing.\nThis file will be removed when the task is complete.\n\nIssue: https://github.com/link-assistant/agent/issues/58",
|
|
16
|
+
"messageHeadline": "Initial commit with task details",
|
|
17
|
+
"oid": "da9129129c05932b8423d45f8d4eb4873c58c1f1"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"authoredDate": "2025-12-16T21:21:08Z",
|
|
21
|
+
"authors": [
|
|
22
|
+
{
|
|
23
|
+
"email": "drakonard@gmail.com",
|
|
24
|
+
"id": "MDQ6VXNlcjE0MzE5MDQ=",
|
|
25
|
+
"login": "konard",
|
|
26
|
+
"name": "konard"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"committedDate": "2025-12-16T21:21:08Z",
|
|
30
|
+
"messageBody": "",
|
|
31
|
+
"messageHeadline": "Add changeset for release formatting fix",
|
|
32
|
+
"oid": "09b6709893e7a8b78b7cdcb4faf04c61bf6065fc"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"authoredDate": "2025-12-16T21:26:11Z",
|
|
36
|
+
"authors": [
|
|
37
|
+
{
|
|
38
|
+
"email": "drakonard@gmail.com",
|
|
39
|
+
"id": "MDQ6VXNlcjE0MzE5MDQ=",
|
|
40
|
+
"login": "konard",
|
|
41
|
+
"name": "konard"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"email": "noreply@anthropic.com",
|
|
45
|
+
"id": "MDQ6VXNlcjgxODQ3",
|
|
46
|
+
"login": "claude",
|
|
47
|
+
"name": "Claude"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"committedDate": "2025-12-16T21:26:11Z",
|
|
51
|
+
"messageBody": "This commit fixes two bugs in the GitHub release formatting:\n\n1. **Remove section headers**: The script now removes \"### Major Changes\",\n \"### Minor Changes\", and \"### Patch Changes\" headers from release notes.\n Previously, it only handled Patch changes, causing Minor and Major\n releases to display these headers incorrectly.\n\n2. **Enable PR detection for all release types**: By fixing the regex to\n match all changeset types (Major/Minor/Patch), PR detection now works\n for all releases, not just patch releases.\n\nRoot Cause:\n- The original regex pattern only matched \"### Patch Changes\"\n- When a Minor or Major release was created, the regex failed to match\n- The script exited early, skipping formatting and PR link detection\n- This resulted in raw changeset headers appearing in release notes\n\nSolution:\n- Updated regex to match any changeset type: /### (Major|Minor|Patch) Changes/\n- Extract commit hash from any changeset format\n- Continue with formatting and PR detection for all release types\n\nCase Study:\n- Comprehensive analysis documented in docs/case-studies/issue-58/\n- Includes timeline reconstruction, root cause analysis, and verification\n- Notes that the upstream template repository has the same bug\n\nFixes #58\n\nš¤ Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude <noreply@anthropic.com>",
|
|
52
|
+
"messageHeadline": "Fix release formatting to support Major/Minor/Patch changes",
|
|
53
|
+
"oid": "956bca3c49d3029d031e69061314c7ed63922114"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"authoredDate": "2025-12-16T21:30:07Z",
|
|
57
|
+
"authors": [
|
|
58
|
+
{
|
|
59
|
+
"email": "drakonard@gmail.com",
|
|
60
|
+
"id": "MDQ6VXNlcjE0MzE5MDQ=",
|
|
61
|
+
"login": "konard",
|
|
62
|
+
"name": "konard"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"committedDate": "2025-12-16T21:30:07Z",
|
|
66
|
+
"messageBody": "",
|
|
67
|
+
"messageHeadline": "Fix prettier formatting for case study files",
|
|
68
|
+
"oid": "30b78fa6eead23c6e8b68f8af26e17db213b03e9"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"createdAt": "2025-12-16T21:05:01Z",
|
|
72
|
+
"files": [
|
|
73
|
+
{
|
|
74
|
+
"path": ".changeset/fix-release-formatting.md",
|
|
75
|
+
"additions": 5,
|
|
76
|
+
"deletions": 0
|
|
77
|
+
},
|
|
78
|
+
{ "path": "CLAUDE.md", "additions": 5, "deletions": 0 },
|
|
79
|
+
{
|
|
80
|
+
"path": "docs/case-studies/issue-58/README.md",
|
|
81
|
+
"additions": 227,
|
|
82
|
+
"deletions": 0
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"path": "docs/case-studies/issue-58/release-v0.1.0-api.json",
|
|
86
|
+
"additions": 42,
|
|
87
|
+
"deletions": 0
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"path": "docs/case-studies/issue-58/release-v0.1.0.json",
|
|
91
|
+
"additions": 10,
|
|
92
|
+
"deletions": 0
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"path": "docs/case-studies/issue-58/template-format-release-notes.mjs",
|
|
96
|
+
"additions": 212,
|
|
97
|
+
"deletions": 0
|
|
98
|
+
},
|
|
99
|
+
{ "path": "package-lock.json", "additions": 2, "deletions": 2 },
|
|
100
|
+
{
|
|
101
|
+
"path": "scripts/format-release-notes.mjs",
|
|
102
|
+
"additions": 25,
|
|
103
|
+
"deletions": 18
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"mergedAt": "2025-12-17T03:48:00Z",
|
|
107
|
+
"state": "MERGED",
|
|
108
|
+
"title": "Fix release formatting to remove incorrect section headers and link PRs"
|
|
109
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"author": { "id": "MDM6Qm90NDE4OTgyODI=", "login": "github-actions[bot]" },
|
|
3
|
+
"body": "### Minor Changes\n\n- 65d76dc: Initial template setup with complete AI-driven development pipeline\n\n Features:\n - Multi-runtime support for Node.js, Bun, and Deno\n - Universal testing with test-anywhere framework\n - Automated release workflow with changesets\n - GitHub Actions CI/CD pipeline with 9 test combinations\n - Code quality tools: ESLint + Prettier with Husky pre-commit hooks\n - Package manager agnostic design\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).",
|
|
4
|
+
"createdAt": "2025-12-13T12:40:10Z",
|
|
5
|
+
"name": "0.1.0",
|
|
6
|
+
"publishedAt": "2025-12-13T12:40:20Z",
|
|
7
|
+
"tagName": "v0.1.0",
|
|
8
|
+
"url": "https://github.com/link-foundation/js-ai-driven-development-pipeline-template/releases/tag/v0.1.0"
|
|
9
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"repository": "link-foundation/test-anywhere",
|
|
4
|
+
"path": "scripts/format-release-notes.mjs",
|
|
5
|
+
"url": "https://github.com/link-foundation/test-anywhere"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"repository": "link-foundation/gh-download-pull-request",
|
|
9
|
+
"path": "scripts/format-release-notes.mjs",
|
|
10
|
+
"url": "https://github.com/link-foundation/gh-download-pull-request"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"repository": "link-foundation/gh-download-issue",
|
|
14
|
+
"path": "scripts/format-release-notes.mjs",
|
|
15
|
+
"url": "https://github.com/link-foundation/gh-download-issue"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"repository": "link-foundation/js-ai-driven-development-pipeline-template",
|
|
19
|
+
"path": "scripts/format-release-notes.mjs",
|
|
20
|
+
"url": "https://github.com/link-foundation/js-ai-driven-development-pipeline-template"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Research Notes for Issue #3
|
|
2
|
+
|
|
3
|
+
## Changesets Documentation Research
|
|
4
|
+
|
|
5
|
+
### Sources
|
|
6
|
+
|
|
7
|
+
- Official Changesets GitHub: https://github.com/changesets/changesets
|
|
8
|
+
- Changesets Detailed Explanation: https://github.com/changesets/changesets/blob/main/docs/detailed-explanation.md
|
|
9
|
+
- NPM Package: https://www.npmjs.com/package/@changesets/cli
|
|
10
|
+
- LogRocket Guide: https://blog.logrocket.com/version-management-changesets/
|
|
11
|
+
|
|
12
|
+
### Key Findings
|
|
13
|
+
|
|
14
|
+
1. **Changesets Structure**
|
|
15
|
+
- Changesets use YAML front matter to declare package changes and semver bump types
|
|
16
|
+
- The CLI generates CHANGELOG.md files with section headers for each bump type
|
|
17
|
+
- Headers are: "### Major Changes", "### Minor Changes", "### Patch Changes"
|
|
18
|
+
|
|
19
|
+
2. **CHANGELOG Generation**
|
|
20
|
+
- The `changeset version` command creates/updates CHANGELOG.md
|
|
21
|
+
- Changes are grouped by bump type (Major/Minor/Patch)
|
|
22
|
+
- Each section includes commit hashes and descriptions
|
|
23
|
+
|
|
24
|
+
3. **Release Process**
|
|
25
|
+
- Changesets are created during development
|
|
26
|
+
- Version command aggregates changesets into CHANGELOG
|
|
27
|
+
- Publish command handles NPM publishing and git tagging
|
|
28
|
+
|
|
29
|
+
4. **The Problem**
|
|
30
|
+
- Changesets CHANGELOG format is optimized for CHANGELOG.md files
|
|
31
|
+
- Section headers are useful for organizing large changelogs
|
|
32
|
+
- However, for GitHub Releases, these headers are redundant
|
|
33
|
+
- Release version already indicates the bump type (e.g., 0.1.0 is minor)
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
# Best Practices Comparison: effect-template vs js-ai-driven-development-pipeline-template
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This document compares best practices from [ProverCoderAI/effect-template](https://github.com/ProverCoderAI/effect-template) with our current repository to identify potential improvements.
|
|
6
|
+
|
|
7
|
+
**Analysis Date:** 2025-12-18
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Summary of Findings
|
|
12
|
+
|
|
13
|
+
| Category | effect-template | Our Repository | Gap Analysis |
|
|
14
|
+
| ---------------------- | ---------------------------------- | --------------------------------- | ------------------- |
|
|
15
|
+
| TypeScript Support | Full TypeScript with strict config | JavaScript with .d.ts definitions | **Missing** |
|
|
16
|
+
| Build Tool | Vite | None (direct execution) | **Missing** |
|
|
17
|
+
| Test Framework | Vitest with coverage | test-anywhere (cross-runtime) | Different approach |
|
|
18
|
+
| Code Duplication | jscpd | None | **Missing** |
|
|
19
|
+
| Linting | ESLint + Biome | ESLint + Prettier | Partial |
|
|
20
|
+
| Formatting | Biome (disabled) + dprint | Prettier | Present |
|
|
21
|
+
| Type Checking | tsc --noEmit | None | **Missing** |
|
|
22
|
+
| Coverage Thresholds | 100% for core, 10% global | None | **Missing** |
|
|
23
|
+
| CI Workflows | 3 separate workflows | 1 combined workflow | Different approach |
|
|
24
|
+
| Custom Actions | Setup action with caching | Inline setup | **Missing** |
|
|
25
|
+
| VS Code Config | Comprehensive settings | None | **Missing** |
|
|
26
|
+
| Nix Environment | flake.nix | None | **Missing** |
|
|
27
|
+
| AI Agent Documentation | AGENTS.md | CLAUDE.md | Present (different) |
|
|
28
|
+
| Package Snapshots | pkg-pr-new for PRs | None | **Missing** |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Detailed Comparison
|
|
33
|
+
|
|
34
|
+
### 1. TypeScript Configuration
|
|
35
|
+
|
|
36
|
+
#### effect-template
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"strict": true,
|
|
41
|
+
"alwaysStrict": true,
|
|
42
|
+
"noUnusedLocals": true,
|
|
43
|
+
"noUnusedParameters": true,
|
|
44
|
+
"noImplicitReturns": true,
|
|
45
|
+
"noFallthroughCasesInSwitch": true,
|
|
46
|
+
"exactOptionalPropertyTypes": true,
|
|
47
|
+
"noUncheckedIndexedAccess": true,
|
|
48
|
+
"noImplicitOverride": true,
|
|
49
|
+
"noPropertyAccessFromIndexSignature": true,
|
|
50
|
+
"allowUnusedLabels": false,
|
|
51
|
+
"allowUnreachableCode": false
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
#### Our Repository
|
|
56
|
+
|
|
57
|
+
- Uses JavaScript with TypeScript definition files (.d.ts)
|
|
58
|
+
- No tsconfig.json
|
|
59
|
+
- No type checking in CI
|
|
60
|
+
|
|
61
|
+
**Recommendation:** Consider adding TypeScript support with strict configuration for better type safety.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### 2. Code Duplication Detection (jscpd)
|
|
66
|
+
|
|
67
|
+
#### effect-template
|
|
68
|
+
|
|
69
|
+
Has `.jscpd.json` configuration:
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"threshold": 0,
|
|
74
|
+
"minTokens": 30,
|
|
75
|
+
"minLines": 5,
|
|
76
|
+
"skipComments": true
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
#### Our Repository
|
|
81
|
+
|
|
82
|
+
- No code duplication detection
|
|
83
|
+
|
|
84
|
+
**Recommendation:** Add jscpd for detecting copy-paste code. This helps maintain DRY principles and reduces technical debt. See [jscpd documentation](https://github.com/kucherenko/jscpd).
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### 3. ESLint Configuration Differences
|
|
89
|
+
|
|
90
|
+
#### effect-template - Advanced Rules
|
|
91
|
+
|
|
92
|
+
| Rule Category | Setting |
|
|
93
|
+
| ------------------------- | ------- |
|
|
94
|
+
| Max cyclomatic complexity | 8 |
|
|
95
|
+
| Max lines per function | 50 |
|
|
96
|
+
| Max lines per file | 300 |
|
|
97
|
+
| Max function parameters | 5 |
|
|
98
|
+
| Max nesting depth | 4 |
|
|
99
|
+
|
|
100
|
+
Additional plugins:
|
|
101
|
+
|
|
102
|
+
- sonarjs (code quality)
|
|
103
|
+
- unicorn (modern JS patterns)
|
|
104
|
+
- vitest (test-specific rules)
|
|
105
|
+
- import/simple-import-sort (import organization)
|
|
106
|
+
|
|
107
|
+
#### Our Repository
|
|
108
|
+
|
|
109
|
+
- Basic ESLint with Prettier integration
|
|
110
|
+
- No complexity limits
|
|
111
|
+
- No file/function size limits
|
|
112
|
+
|
|
113
|
+
**Recommendation:** Consider adding complexity and size limits to maintain code quality. These limits encourage smaller, more maintainable functions and files.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### 4. Build Tool (Vite)
|
|
118
|
+
|
|
119
|
+
#### effect-template
|
|
120
|
+
|
|
121
|
+
Uses Vite for:
|
|
122
|
+
|
|
123
|
+
- TypeScript compilation
|
|
124
|
+
- Library mode building
|
|
125
|
+
- Source maps generation
|
|
126
|
+
- Path alias resolution (@/_ -> src/_)
|
|
127
|
+
|
|
128
|
+
#### Our Repository
|
|
129
|
+
|
|
130
|
+
- Direct file execution (no build step)
|
|
131
|
+
- Works well for current JavaScript approach
|
|
132
|
+
|
|
133
|
+
**Recommendation:** If migrating to TypeScript, consider Vite for fast builds and excellent developer experience.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
### 5. Test Coverage Configuration
|
|
138
|
+
|
|
139
|
+
#### effect-template (Vitest)
|
|
140
|
+
|
|
141
|
+
```javascript
|
|
142
|
+
{
|
|
143
|
+
coverage: {
|
|
144
|
+
provider: "v8",
|
|
145
|
+
thresholds: {
|
|
146
|
+
"src/core/**/*.ts": {
|
|
147
|
+
branches: 100,
|
|
148
|
+
functions: 100,
|
|
149
|
+
lines: 100,
|
|
150
|
+
statements: 100
|
|
151
|
+
},
|
|
152
|
+
global: {
|
|
153
|
+
branches: 10,
|
|
154
|
+
functions: 10,
|
|
155
|
+
lines: 10,
|
|
156
|
+
statements: 10
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
#### Our Repository
|
|
164
|
+
|
|
165
|
+
- No coverage configuration
|
|
166
|
+
- Uses test-anywhere for cross-runtime testing
|
|
167
|
+
|
|
168
|
+
**Recommendation:** Consider adding coverage thresholds, especially for critical code paths. See [Vitest coverage documentation](https://vitest.dev/guide/coverage).
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
### 6. CI/CD Workflow Separation
|
|
173
|
+
|
|
174
|
+
#### effect-template - 3 Workflows
|
|
175
|
+
|
|
176
|
+
1. **check.yml** - Build, types, lint, test (on PRs and main)
|
|
177
|
+
2. **release.yml** - Versioning and npm publishing (on main push)
|
|
178
|
+
3. **snapshot.yml** - Package snapshots for PRs
|
|
179
|
+
|
|
180
|
+
#### Our Repository - 1 Combined Workflow
|
|
181
|
+
|
|
182
|
+
- **release.yml** - All jobs in one file
|
|
183
|
+
|
|
184
|
+
**Recommendation:** The combined approach works well and reduces complexity. The separation in effect-template supports different permissions models.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
### 7. Custom GitHub Actions
|
|
189
|
+
|
|
190
|
+
#### effect-template
|
|
191
|
+
|
|
192
|
+
Has `.github/actions/setup/action.yml`:
|
|
193
|
+
|
|
194
|
+
- Reusable setup action
|
|
195
|
+
- pnpm installation with caching
|
|
196
|
+
- Node.js setup with specified version
|
|
197
|
+
|
|
198
|
+
#### Our Repository
|
|
199
|
+
|
|
200
|
+
- Inline setup in workflow
|
|
201
|
+
|
|
202
|
+
**Recommendation:** Consider extracting common setup steps into a reusable action for consistency and easier maintenance.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
### 8. VS Code Configuration
|
|
207
|
+
|
|
208
|
+
#### effect-template
|
|
209
|
+
|
|
210
|
+
Has `.vscode/settings.json` with:
|
|
211
|
+
|
|
212
|
+
- TypeScript SDK path
|
|
213
|
+
- Format on save
|
|
214
|
+
- ESLint validation for multiple file types
|
|
215
|
+
- Quick suggestions configuration
|
|
216
|
+
- Import module specifier preferences
|
|
217
|
+
|
|
218
|
+
#### Our Repository
|
|
219
|
+
|
|
220
|
+
- No VS Code configuration
|
|
221
|
+
|
|
222
|
+
**Recommendation:** Add `.vscode/settings.json` for consistent developer experience across the team.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
### 9. Package Snapshots (pkg-pr-new)
|
|
227
|
+
|
|
228
|
+
#### effect-template
|
|
229
|
+
|
|
230
|
+
Uses `pkg-pr-new` in snapshot workflow to create installable package versions for each PR:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
pnpx pkg-pr-new@0.0.24 publish --pnpm --comment=off
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
#### Our Repository
|
|
237
|
+
|
|
238
|
+
- No PR package snapshots
|
|
239
|
+
|
|
240
|
+
**Recommendation:** Consider adding package snapshots for PRs to allow testing changes before merging.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
### 10. Nix Development Environment
|
|
245
|
+
|
|
246
|
+
#### effect-template
|
|
247
|
+
|
|
248
|
+
Has `flake.nix` providing:
|
|
249
|
+
|
|
250
|
+
- Reproducible development environment
|
|
251
|
+
- Node.js 22
|
|
252
|
+
- corepack
|
|
253
|
+
- Python 3 (for node-gyp)
|
|
254
|
+
|
|
255
|
+
#### Our Repository
|
|
256
|
+
|
|
257
|
+
- No Nix configuration
|
|
258
|
+
|
|
259
|
+
**Recommendation:** Nix flakes provide reproducible development environments. Consider if your team uses Nix.
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
### 11. Biome Linter/Formatter
|
|
264
|
+
|
|
265
|
+
#### effect-template
|
|
266
|
+
|
|
267
|
+
Has `biome.json` (currently disabled):
|
|
268
|
+
|
|
269
|
+
- Modern, fast alternative to ESLint + Prettier
|
|
270
|
+
- Written in Rust for performance
|
|
271
|
+
- Gaining adoption in 2025
|
|
272
|
+
|
|
273
|
+
#### Our Repository
|
|
274
|
+
|
|
275
|
+
- Uses ESLint + Prettier (stable, well-supported)
|
|
276
|
+
|
|
277
|
+
**Recommendation:** Current approach is fine. Biome is emerging but ESLint + Prettier is still industry standard. See [Biome vs ESLint comparison](https://betterstack.com/community/guides/scaling-nodejs/biome-eslint/).
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
### 12. AI Agent Documentation (AGENTS.md)
|
|
282
|
+
|
|
283
|
+
#### effect-template
|
|
284
|
+
|
|
285
|
+
Comprehensive `AGENTS.md` with:
|
|
286
|
+
|
|
287
|
+
- Architectural principles (Functional Core, Imperative Shell)
|
|
288
|
+
- Type safety requirements
|
|
289
|
+
- Monadic composition patterns
|
|
290
|
+
- Code quality checklist
|
|
291
|
+
- Proof obligations
|
|
292
|
+
|
|
293
|
+
#### Our Repository
|
|
294
|
+
|
|
295
|
+
Has `CLAUDE.md` for Claude Code:
|
|
296
|
+
|
|
297
|
+
- Issue-solving workflow
|
|
298
|
+
- CI guidelines
|
|
299
|
+
- Collaboration practices
|
|
300
|
+
|
|
301
|
+
**Recommendation:** Both approaches are valid. Consider expanding CLAUDE.md with architectural principles if needed.
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## Best Practices Missing in Our Repository
|
|
306
|
+
|
|
307
|
+
### High Priority (Recommended to Add)
|
|
308
|
+
|
|
309
|
+
1. **Code duplication detection** - Add jscpd configuration
|
|
310
|
+
2. **ESLint complexity rules** - Add max-complexity, max-lines-per-function, max-params
|
|
311
|
+
3. **VS Code settings** - Add .vscode/settings.json for team consistency
|
|
312
|
+
4. **Reusable GitHub Action** - Extract setup steps to custom action
|
|
313
|
+
|
|
314
|
+
### Medium Priority (Consider Adding)
|
|
315
|
+
|
|
316
|
+
5. **Test coverage thresholds** - Add coverage configuration with minimum thresholds
|
|
317
|
+
6. **Type checking script** - Add `npm run typecheck` if using TypeScript
|
|
318
|
+
7. **Package snapshots** - Add pkg-pr-new for PR testing
|
|
319
|
+
|
|
320
|
+
### Lower Priority (Optional)
|
|
321
|
+
|
|
322
|
+
8. **TypeScript migration** - Full TypeScript with strict config
|
|
323
|
+
9. **Vite build tool** - For TypeScript compilation
|
|
324
|
+
10. **Nix environment** - For reproducible development
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## References
|
|
329
|
+
|
|
330
|
+
- [jscpd - Copy/paste detector](https://github.com/kucherenko/jscpd)
|
|
331
|
+
- [Biome - Toolchain of the web](https://biomejs.dev/)
|
|
332
|
+
- [Vitest Coverage Guide](https://vitest.dev/guide/coverage)
|
|
333
|
+
- [ESLint Complexity Rules](https://eslint.org/docs/rules/complexity)
|
|
334
|
+
- [pkg-pr-new](https://github.com/stackblitz/pkg.pr.new)
|