Skip to content

chore(config): add ai commit msg config and related files - #69

Merged
stephansama merged 6 commits into
mainfrom
stephansama/ste-180-create-eslint-package
May 10, 2026
Merged

stephansama merged 6 commits into
mainfrom
stephansama/ste-180-create-eslint-package

Conversation

@stephansama

Copy link
Copy Markdown
Owner

Checklist

  • Latest changes from main have been merged
  • Conflicts have been resolved
  • The branch is pointing to main
  • ESLint hasn't reported any issues.
  • All unit tests pass
  • Any new actions have an accompanying test and example workflows

@vercel

vercel Bot commented May 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
actions Ready Ready Preview, Comment May 10, 2026 5:05am

@coderabbitai

coderabbitai Bot commented May 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Rate limit exceeded

@stephansama has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 39 minutes and 35 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a96b6c5a-36d6-4a90-bcbb-70b0c06217b1

📥 Commits

Reviewing files that changed from the base of the PR and between ed5eaa5 and 6194d35.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (14)
  • do-not-track-polyfill/action.yml
  • do-not-track-polyfill/package.json
  • generate-md-action-inputs/action.yml
  • generate-md-action-inputs/package.json
  • generate-md-action-inputs/src/index.ts
  • multi-deployments/action.yml
  • multi-deployments/package.json
  • multi-deployments/src/index.test.ts
  • multi-deployments/src/index.ts
  • package.json
  • pnpm-workspace.yaml
  • turbo/generators/config.ts
  • turbo/generators/template/action.yml
  • turbo/generators/template/action.yml.hbs
📝 Walkthrough

Walkthrough

This PR comprehensively migrates the monorepo's build infrastructure and tooling. It establishes a centralized dependency catalog via pnpm workspaces, restructures TypeScript configuration with project references, replaces Husky with Lefthook for git hooks, migrates ESLint to async configuration, consolidates code style settings, converts packages to ES modules, standardizes Node version configuration across CI workflows, and refactors code in multiple packages with improved test coverage and variable naming.

Changes

Monorepo Tooling & Infrastructure Overhaul

Layer / File(s) Summary
Dependency Catalog & Version Centralization
pnpm-workspace.yaml, package.json, .config/www/package.json, do-not-track-polyfill/package.json, generate-md-action-inputs/package.json
pnpm-workspace.yaml defines centralized catalog block for all tool and library versions; all workspace packages updated to reference catalog: instead of pinned semver ranges.
TypeScript Configuration Migration
tsconfig.base.json, tsconfig.json, tsconfig.root.json, .config/www/tsconfig.json, do-not-track-polyfill/tsconfig.json, generate-md-action-inputs/tsconfig.json, multi-deployments/tsconfig.json
New tsconfig.base.json extends recommended config with JSON module resolution and bundler setup; root tsconfig.json converts to project references; each workspace package gains composite-enabled tsconfig.json.
ESLint & Code Style Configuration
eslint.config.ts, .prettierrc, package.json, .config/.nanostagedrc.mjs, .config/www/.vitepress/theme/index.ts
eslint.config.ts switches to async await config({...}) pattern using @stephansama/eslint-config preset; Prettier settings consolidated into package.json; .prettierrc removed; .nanostagedrc.mjs type annotation corrected from lint-staged to nano-staged.
Git Hooks Migration to Lefthook
.config/.aicommitmsgrc.json, .config/lefthook.yaml, .husky/commit-msg, .husky/pre-commit
New .config/lefthook.yaml defines three hook stages: prepare-commit-msg (ai-commit-msg), commit-msg (commitlint), pre-commit (auto-readme, nano-staged); Husky hooks emptied; .config/.aicommitmsgrc.json added for commit message generation config with ollama provider.
Node Version Standardization
.github/workflows/coverage.yml, .github/workflows/examples/example-multi-deployments.yml, .github/workflows/release.yml, .github/workflows/test-*.yml, turbo/generators/template/workflow-test.yml.hbs
All GitHub Actions workflows and Turbo workflow template updated to use .node-version instead of .nvmrc for Node runtime configuration.
Package ES Module Migration
do-not-track-polyfill/package.json, multi-deployments/package.json
Packages now declare "type": "module" for ES module support; import statements updated to namespace imports.
Do-Not-Track Polyfill Refactoring
do-not-track-polyfill/src/index.ts, do-not-track-polyfill/src/index.test.ts, do-not-track-polyfill/src/environment.d.ts, .github/scripts/verify-do-not-track.js
Namespace import for @dotenvx/dotenvx; flatMap refactoring in environment variable export logic; environment type references updated; test suite renamed telemetry baseline to defaultEnvironments with enhanced assertion patterns; verification script uses clearer environment loop variable.
Generate MD Action Inputs Refactoring
generate-md-action-inputs/src/index.ts, generate-md-action-inputs/src/index.test.ts
Introduces actionsRegex pattern, refactors loadInputs parameter default handling via nullish coalescing, condenses run() with ternary expression, restructures test mocks with consistent variable naming (opts→options, writeCb→writeCallback).
Multi-Deployments Refactoring
multi-deployments/src/index.ts, multi-deployments/src/index.test.ts
Module entrypoint now awaits run() promise; loadInputs parses environments as Record<string, string> with typed Object.entries; test assertions updated to async resolves pattern; loop callback index used for environment_url lookup.
VitePress Site Setup & Configuration
.config/www/package.json, .config/www/setup.sh, .config/www/tsconfig.json, .config/www/.vitepress/config.ts
.config/www/setup.sh removed; setup pipeline replaced with pnpm task orchestration (setup script runs all setup:* tasks sequentially); new .config/www/tsconfig.json limits compilation; VitePress config uses template literals and refines markdown renderer parameter naming.
Configuration Reordering & Polish
package.json, turbo/generators/config.ts, vitest.config.ts
Script formatting adjusted in root package.json; Turbo action generator configuration reordered (description/prompts moved after actions array); Vitest test configuration reporters and outputFile reordered.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • stephansama/actions#68: Modifies VitePress site configuration and workspace website package setup, sharing common changes to .config/www/.vitepress/config.ts and .config/www/package.json alongside build pipeline adjustments.

Poem

🐰 A rabbit hops through .config and finds,
Lefthook gates where Husky once stood guard,
The catalog brings versions unified,
TypeScript references compose TypeScript shards,
ESLint awaits, with async grace,
ESM modules take their rightful place! 🚀

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description matches the template structure with a complete checklist, but lacks any substantive explanation of the changes beyond the checklist items. Add details about what was changed and why (e.g., summary of new configs, migration from husky to lefthook, catalog-based dependencies, TypeScript project references).
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding AI commit message configuration and related configuration files across the project.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch stephansama/ste-180-create-eslint-package

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@socket-security

socket-security Bot commented May 10, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​stephansama/​ai-commit-msg@​1.0.6731008592100
Added@​stephansama/​types-github-action-env@​1.0.3731008290100
Added@​stephansama/​eslint-config@​0.2.07410010091100
Updatedeslint@​9.32.0 ⏵ 10.3.089 +110010095100
Addedlefthook@​2.1.69210010093100

View full report

@codecov

codecov Bot commented May 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the repository into a monorepo structure, implementing pnpm catalogs for centralized dependency management and transitioning packages to ES modules. It also replaces Husky with Lefthook, adopts a shared ESLint configuration, and reorganizes TypeScript settings using project references. Several issues were identified, including runtime ReferenceErrors in ESM entry points due to legacy require/module checks, a logic bug in the capitalize utility, and multiple versioning typos in the workspace catalog and AI configuration.

Comment thread generate-md-action-inputs/src/index.ts Outdated
Comment thread multi-deployments/src/index.ts Outdated
"$schema": "../node_modules/@stephansama/ai-commit-msg/config/schema.json",
"provider": "ollama",
"prompt": "Generate a Conventional Commit message based on the diff below. Rules: Follow the Conventional Commits specification (type(scope): subject). Allowed types: feat, fix, chore, docs, refactor, perf, test, build, ci. Subject must be all lowercase. The entire commit message must not exceed 100 characters. Do not include a body. Do not include a footer. Do not include explanations. Output only the commit message. Diff: {{diff}}",
"model": "qwen3:8b"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The model qwen3:8b is specified, but Qwen 3 has not been released yet (Qwen 2.5 is the current stable version). This is likely a typo for qwen2.5:8b or similar.


const readmes = await updateLocalActionReadmes(inputs);
export function capitalize(word: string) {
return word.length > 1 ? word.at(0)?.toUpperCase() + word.slice(1) : word;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The capitalize function fails to capitalize single-character strings because of the word.length > 1 condition. For example, capitalize("a") will return "a" instead of "A".

return word.length > 0 ? word.at(0)?.toUpperCase() + word.slice(1) : word;

max,
);
const headingLevel = Array.from({ length }, () => "#").join("");
const headingLevel = Array.from({ length: length }).fill("#").join("");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using String.prototype.repeat is more idiomatic and efficient than creating an array and joining it for this purpose.

const headingLevel = "#".repeat(length);

export async function getActionsPaths(gitRoot: string) {
const { stdout } = await sh`
cd ${gitRoot}
find . -type f -name 'action.y*ml'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The find command should explicitly exclude node_modules to avoid unnecessary processing and potential errors if action files exist within dependencies in a monorepo setup.

find . -type f -name 'action.y*ml' -not -path '*/node_modules/*'

Comment thread pnpm-workspace.yaml
"@stephansama/types-github-action-env": 1.0.3
"@tsconfig/recommended": 1.0.10
"@turbo/gen": 2.5.5
"@types/node": 24.1.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The version 24.1.0 for @types/node appears to be a typo, as Node.js 24 has not been released yet. This should likely be 22.x or 20.x.

Comment thread pnpm-workspace.yaml
"@types/node": 24.1.0
"@vitest/coverage-v8": 3.2.4
"@vitest/ui": 3.2.4
eslint: 10.3.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

ESLint version 10.3.0 is specified, but the current major version is 9. Version 10 is not yet available.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.config/www/.vitepress/theme/index.ts (1)

1-8: 🧹 Nitpick | 🔵 Trivial | 💤 Low value

Consider refactoring instead of disabling linting rules.

The ESLint disable comment suppresses perfectionist/sort-imports and unicorn/prefer-export-from. Rather than disabling these rules, consider refactoring to comply:

♻️ Refactor to comply with linting rules
-/* eslint-disable perfectionist/sort-imports, unicorn/prefer-export-from */
-
-import DefaultTheme from "vitepress/theme";
-
-import "@catppuccin/vitepress/theme/mocha/red.css";
-
-import "./extend.css";
-
-export default DefaultTheme;
+import "@catppuccin/vitepress/theme/mocha/red.css";
+import "./extend.css";
+
+export { default } from "vitepress/theme";
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.config/www/.vitepress/theme/index.ts around lines 1 - 8, Remove the top
ESLint disable, reorder and refactor imports to satisfy
perfectionist/sort-imports and unicorn/prefer-export-from: keep the side-effect
CSS imports (import "@catppuccin/vitepress/theme/mocha/red.css"; import
"./extend.css";) and replace the DefaultTheme default import + export (the
import DefaultTheme from "vitepress/theme"; and export default DefaultTheme;)
with a single re-export using export { default } from "vitepress/theme"; so you
only have side-effect imports plus the export-from form.
.config/www/.vitepress/config.ts (1)

3-3: ⚠️ Potential issue | 🔴 Critical | 🏗️ Heavy lift

Add TypeDoc output configuration to match the expected import path.

The TypeDoc configuration in .config/www/typedoc.json is missing the "out" directory setting. TypeDoc defaults to generating files in an out/ directory, but config.ts (line 3) imports from ../api/typedoc-sidebar.json. This path mismatch causes VitePress to fail with "Could not resolve" error during build.

Add "out": "api" to .config/www/typedoc.json to ensure TypeDoc generates the sidebar file in the location where it's imported. The setup task runs TypeDoc correctly during prebuild, but without this configuration, the output goes to the wrong directory.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.config/www/.vitepress/config.ts at line 3, The TypeDoc output directory is
incorrect for the import used in config.ts (the import of typedocSidebar in the
VitePress config); open the TypeDoc config file (typedoc.json) and add the
output setting "out": "api" so TypeDoc writes its files into the api/ folder
that config.ts expects (ensure the config key is a top-level "out": "api" entry
so the generated typedoc-sidebar.json lands at ../api/typedoc-sidebar.json).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.config/.aicommitmsgrc.json:
- Line 4: The long string assigned to the JSON key "prompt" should be moved out
of the config and into a dedicated plaintext prompt file (e.g.,
commit_prompt.txt) to improve maintainability; replace the inline value for
"prompt" with a short reference token (e.g., "file:commit_prompt.txt") or update
the config loader to read the external prompt file when the "prompt" key points
to a filename, and ensure the loader falls back to the inline value if a file is
not found.

In @.config/.nanostagedrc.mjs:
- Line 4: Update the JSDoc comment URL that currently points to the lint-staged
docs so it references the nano-staged documentation instead; locate the JSDoc
block (the comment containing "@see
https://www.npmjs.com/package/lint-staged#configuration") and change the URL to
the nano-staged docs URL (replace the lint-staged link with the equivalent
nano-staged documentation link) so the type annotation and referenced docs
match.
- Line 5: The JSDoc line using `@type` {import('nano-staged').Configuration}
references a non-existent export from nano-staged; either remove that `@type`
annotation entirely or define a local typedef named Configuration and then
change the `@type` to {Configuration} so IDEs get correct types; look for the
existing `@type` annotation line and the use of Configuration in .nanostagedrc.mjs
and implement one of these two fixes.

In @.config/lefthook.yaml:
- Around line 1-13: The Lefthook config uses external tools (ai-commit-msg in
prepare-commit-msg, pnpm dlx commitlint in commit-msg, and auto-readme and
nano-staged in pre-commit) but the repo lacks documentation on installing these;
update the README or a new CONTRIBUTING.md to list each required tool
(ai-commit-msg, commitlint, auto-readme, nano-staged), the expected installation
method/command (e.g., npm/pnpm install or pnpm dlx usage), required global vs
dev dependency guidance, any minimum versions, and how to enable/run Lefthook
hooks (referencing prepare-commit-msg, commit-msg, pre-commit and the job names
"Update README" and "Lint staged") so new contributors can set up the
environment reproducibly.
- Line 12: Update the nano-staged invocation in the lefthook run command: locate
the line containing "nano-staged -c ./.nanostagedrc.mjs -v" and change the -c
argument to point to the actual config file location by replacing
"./.nanostagedrc.mjs" with ".config/.nanostagedrc.mjs" so the command becomes
"nano-staged -c .config/.nanostagedrc.mjs -v".

In `@do-not-track-polyfill/tsconfig.json`:
- Line 6: Remove the relative path "./src/environment.d.ts" from the
tsconfig.json compilerOptions.types array and leave only package-style type
names (e.g., "@stephansama/types-github-action-env" or "node"); TypeScript will
pick up src/environment.d.ts via the existing "include": ["src"], so update the
"types" entry in tsconfig.json to exclude environment.d.ts and keep only proper
type package identifiers.

In `@eslint.config.ts`:
- Line 3: The import of package.json in eslint.config.ts is not using the
Node.js 24 JSON import attribute; update the import statement for pkg (the
variable imported from "./package.json") to include the import attribute by
using the "with { type: \"json\" }" form so the JSON module is loaded compatibly
with Node.js 24.

In `@generate-md-action-inputs/package.json`:
- Line 4: The package.json "main" field currently points to the TypeScript
source ("./src/index.ts") which will break at runtime; update the "main" to
point to the compiled output produced by your tsup build (e.g., "dist/index.js"
or the actual file emitted by the tsup config), and optionally add an "exports"
map for Node ESM/CJS resolution; verify the build script in package.json (the
tsup invocation) to confirm the exact output filename/format and use that path
in "main" (and "types" if needed) so consumers load the compiled JS.

In `@multi-deployments/package.json`:
- Line 3: The runtime check using require.main === module is incompatible with
"type":"module"; replace it by either removing the check and calling run()
unconditionally in multi-deployments/src/index.ts or use an ES-module-safe entry
detection like comparing import.meta.url to process.argv[1] (e.g., if
(import.meta.url === `file://${process.argv[1]}`) await run(); — update the line
containing the require.main === module check and the run() invocation
accordingly. Also update the test import in index.test.ts to use the explicit
.js extension for the module import (change the existing import path to include
".js") so it is valid under ES modules.

In `@multi-deployments/src/index.test.ts`:
- Around line 68-70: The test is passing a function to expect() when using the
.resolves matcher; replace the function wrapper with the Promise returned by
module.run() so Vitest receives a Promise — e.g. change expect(async () => await
module.run()).resolves... to await
expect(module.run()).resolves.not.toThrowError(); ensuring you call module.run()
(the Promise) directly and await the outer expect.

In `@multi-deployments/src/index.ts`:
- Line 35: The variable name environments_ is unclear; rename it to a
descriptive identifier such as environmentNames or envNames. Locate the
declaration of environments_ and replace it with the chosen name (e.g.,
environmentNames), update all usages in this module (and any exported references
or downstream imports) to the new name, and run a quick project-wide
search/replace to ensure no lingering references to environments_ remain;
preserve the original value assignment from environments when renaming.

In `@pnpm-workspace.yaml`:
- Around line 5-43: The catalog entries use mixed version ranges causing
inconsistent dependency resolution; standardize versions by pinning critical
packages to exact versions and using carets for non-critical ones: update the
catalog map entries for `@dotenvx/dotenvx`, `@eslint/config-inspector`, lefthook,
typedoc, and vitepress to exact versions (remove the leading ^) while leaving
less-critical entries as caret ranges as desired, and ensure the pattern is
documented in the pnpm-workspace.yaml top-level comment for future contributors.

In `@tsconfig.base.json`:
- Line 8: The tsconfig base's "types" array currently restricts automatic
inclusion of `@types/`* which breaks packages using Node APIs; update the "types"
property in tsconfig.base.json to include "@types/node" (or alternatively set
"skipLibCheck": true) so child packages like generate-md-action-inputs no longer
miss node type defs, and ensure other packages (e.g., do-not-track-polyfill) can
drop their local override once the base config includes "@types/node".

---

Outside diff comments:
In @.config/www/.vitepress/config.ts:
- Line 3: The TypeDoc output directory is incorrect for the import used in
config.ts (the import of typedocSidebar in the VitePress config); open the
TypeDoc config file (typedoc.json) and add the output setting "out": "api" so
TypeDoc writes its files into the api/ folder that config.ts expects (ensure the
config key is a top-level "out": "api" entry so the generated
typedoc-sidebar.json lands at ../api/typedoc-sidebar.json).

In @.config/www/.vitepress/theme/index.ts:
- Around line 1-8: Remove the top ESLint disable, reorder and refactor imports
to satisfy perfectionist/sort-imports and unicorn/prefer-export-from: keep the
side-effect CSS imports (import "@catppuccin/vitepress/theme/mocha/red.css";
import "./extend.css";) and replace the DefaultTheme default import + export
(the import DefaultTheme from "vitepress/theme"; and export default
DefaultTheme;) with a single re-export using export { default } from
"vitepress/theme"; so you only have side-effect imports plus the export-from
form.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6653e702-46b6-4852-8ba5-8055a4ecbe05

📥 Commits

Reviewing files that changed from the base of the PR and between c26c681 and ed5eaa5.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (41)
  • .config/.aicommitmsgrc.json
  • .config/.nanostagedrc.mjs
  • .config/lefthook.yaml
  • .config/www/.vitepress/config.ts
  • .config/www/.vitepress/theme/index.ts
  • .config/www/package.json
  • .config/www/setup.sh
  • .config/www/tsconfig.json
  • .github/scripts/verify-do-not-track.js
  • .github/workflows/coverage.yml
  • .github/workflows/examples/example-multi-deployments.yml
  • .github/workflows/release.yml
  • .github/workflows/test-do-not-track-polyfill-false.yml
  • .github/workflows/test-do-not-track-polyfill-true.yml
  • .github/workflows/test-multi-deployments.yml
  • .husky/commit-msg
  • .husky/pre-commit
  • .node-version
  • .prettierrc
  • do-not-track-polyfill/package.json
  • do-not-track-polyfill/src/environment.d.ts
  • do-not-track-polyfill/src/index.test.ts
  • do-not-track-polyfill/src/index.ts
  • do-not-track-polyfill/tsconfig.json
  • eslint.config.ts
  • generate-md-action-inputs/package.json
  • generate-md-action-inputs/src/index.test.ts
  • generate-md-action-inputs/src/index.ts
  • generate-md-action-inputs/tsconfig.json
  • multi-deployments/package.json
  • multi-deployments/src/index.test.ts
  • multi-deployments/src/index.ts
  • multi-deployments/tsconfig.json
  • package.json
  • pnpm-workspace.yaml
  • tsconfig.base.json
  • tsconfig.json
  • tsconfig.root.json
  • turbo/generators/config.ts
  • turbo/generators/template/workflow-test.yml.hbs
  • vitest.config.ts
💤 Files with no reviewable changes (5)
  • do-not-track-polyfill/src/environment.d.ts
  • .husky/commit-msg
  • .config/www/setup.sh
  • .husky/pre-commit
  • .prettierrc

{
"$schema": "../node_modules/@stephansama/ai-commit-msg/config/schema.json",
"provider": "ollama",
"prompt": "Generate a Conventional Commit message based on the diff below. Rules: Follow the Conventional Commits specification (type(scope): subject). Allowed types: feat, fix, chore, docs, refactor, perf, test, build, ci. Subject must be all lowercase. The entire commit message must not exceed 100 characters. Do not include a body. Do not include a footer. Do not include explanations. Output only the commit message. Diff: {{diff}}",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | 💤 Low value

Consider externalizing the prompt to a separate file for maintainability.

The prompt is quite long (>300 characters) and embedded directly in the JSON configuration. Externalizing it to a .prompt or .txt file would improve readability and make it easier to maintain and version control the prompt separately.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.config/.aicommitmsgrc.json at line 4, The long string assigned to the JSON
key "prompt" should be moved out of the config and into a dedicated plaintext
prompt file (e.g., commit_prompt.txt) to improve maintainability; replace the
inline value for "prompt" with a short reference token (e.g.,
"file:commit_prompt.txt") or update the config loader to read the external
prompt file when the "prompt" key points to a filename, and ensure the loader
falls back to the inline value if a file is not found.

Comment thread .config/.nanostagedrc.mjs
@@ -2,7 +2,7 @@ const jsLike = "{js,cjs,mjs,jsx,ts,mts,cts,tsx,astro,svelte,vue}";

/**
* @see https://www.npmjs.com/package/lint-staged#configuration

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Update the documentation URL to match the corrected type.

The JSDoc comment references lint-staged documentation, but the type annotation now correctly references nano-staged. Update the URL to point to nano-staged documentation for consistency.

📝 Proposed fix
 /**
- * `@see` https://www.npmjs.com/package/lint-staged#configuration
+ * `@see` https://www.npmjs.com/package/nano-staged#configuration
  * `@type` {import('nano-staged').Configuration}
  */
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* @see https://www.npmjs.com/package/lint-staged#configuration
/**
* `@see` https://www.npmjs.com/package/nano-staged#configuration
* `@type` {import('nano-staged').Configuration}
*/
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.config/.nanostagedrc.mjs at line 4, Update the JSDoc comment URL that
currently points to the lint-staged docs so it references the nano-staged
documentation instead; locate the JSDoc block (the comment containing "@see
https://www.npmjs.com/package/lint-staged#configuration") and change the URL to
the nano-staged docs URL (replace the lint-staged link with the equivalent
nano-staged documentation link) so the type annotation and referenced docs
match.

Comment thread .config/.nanostagedrc.mjs
/**
* @see https://www.npmjs.com/package/lint-staged#configuration
* @type {import('lint-staged').Configuration}
* @type {import('nano-staged').Configuration}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify that nano-staged exports a Configuration type

# Check if nano-staged has TypeScript definitions
fd --type f "index.d.ts" node_modules/nano-staged --exec cat {} \; | head -50

# Also check package.json for types field
fd --type f "package.json" node_modules/nano-staged --max-depth 1 --exec cat {} \; | jq '.types, .typings, .exports'

Repository: stephansama/actions

Length of output: 287


🏁 Script executed:

cat -n .config/.nanostagedrc.mjs

Repository: stephansama/actions

Length of output: 571


🏁 Script executed:

# Check if package.json exists and look for nano-staged dependency
if [ -f package.json ]; then
  jq '.dependencies, .devDependencies' package.json | grep -A 5 -B 5 "nano-staged"
fi

Repository: stephansama/actions

Length of output: 418


🌐 Web query:

nano-staged Configuration type TypeScript exports

💡 Result:

nano-staged supports configuration in multiple formats, including JSON, JavaScript (CommonJS with module.exports, ESM with export default), and detects the module type based on package.json "type" field for.js files. For TypeScript projects, use.nano-staged.js (ESM if "type": "module") or.nano-staged.mjs for ESM exports, or.nano-staged.cjs for CommonJS. Examples: For ESM (.nano-staged.mjs or.nano-staged.js with "type": "module"): export default { '.{js,ts}': 'eslint --fix', '': 'prettier --write' } For CommonJS (.nano-staged.cjs or.nano-staged.js without "type": "module"): module.exports = { '.{js,ts}': 'eslint --fix', '': 'prettier --write' } Config can also be a function: export default (api) => [...commands], where api provides filenames and type (staged/unstaged/diff).[1][2] No official TypeScript type definitions (.d.ts) found in sources or package; config is plain JS/JSON objects.[3][1][2][4]

Citations:


Remove the unsupported @type annotation or define a local Configuration type.

The nano-staged package does not export a Configuration type. No TypeScript type definitions exist in the package, so the JSDoc @type {import('nano-staged').Configuration} annotation references a non-existent type. Either remove the type annotation or define a local type that matches your configuration structure for proper IDE type support.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.config/.nanostagedrc.mjs at line 5, The JSDoc line using `@type`
{import('nano-staged').Configuration} references a non-existent export from
nano-staged; either remove that `@type` annotation entirely or define a local
typedef named Configuration and then change the `@type` to {Configuration} so IDEs
get correct types; look for the existing `@type` annotation line and the use of
Configuration in .nanostagedrc.mjs and implement one of these two fixes.

Comment thread .config/lefthook.yaml
Comment on lines +1 to +13
prepare-commit-msg:
jobs:
- run: ai-commit-msg -o {1}
commit-msg:
jobs:
- run: pnpm dlx commitlint --config .config/.commitlintrc.ts --edit {1}
pre-commit:
parallel: false
jobs:
- run: auto-readme -vg
name: Update README
- run: nano-staged -c ./.nanostagedrc.mjs -v
name: Lint staged

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Document the required tool dependencies for this Lefthook configuration.

The configuration relies on several external tools (ai-commit-msg, auto-readme, nano-staged, commitlint) that must be installed. Consider documenting these dependencies in the project's README or a setup guide to help new contributors set up their environment.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.config/lefthook.yaml around lines 1 - 13, The Lefthook config uses external
tools (ai-commit-msg in prepare-commit-msg, pnpm dlx commitlint in commit-msg,
and auto-readme and nano-staged in pre-commit) but the repo lacks documentation
on installing these; update the README or a new CONTRIBUTING.md to list each
required tool (ai-commit-msg, commitlint, auto-readme, nano-staged), the
expected installation method/command (e.g., npm/pnpm install or pnpm dlx usage),
required global vs dev dependency guidance, any minimum versions, and how to
enable/run Lefthook hooks (referencing prepare-commit-msg, commit-msg,
pre-commit and the job names "Update README" and "Lint staged") so new
contributors can set up the environment reproducibly.

Comment thread .config/lefthook.yaml
jobs:
- run: auto-readme -vg
name: Update README
- run: nano-staged -c ./.nanostagedrc.mjs -v

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Locate the .nanostagedrc.mjs file

# Search for .nanostagedrc.mjs in the repository
fd -t f ".nanostagedrc.mjs" --no-ignore

# List files in .config directory
fd -t f . .config --max-depth 1 | grep -i nano

Repository: stephansama/actions

Length of output: 45


🏁 Script executed:

#!/bin/bash
# List all files in .config directory
echo "=== Files in .config directory ==="
fd -t f . .config 2>/dev/null || echo "No .config directory"

echo ""
echo "=== Search for nanostagedrc references ==="
rg "nanostagedrc|nano-staged" --type-list | head -5
rg "nanostagedrc|nano-staged" -i 2>/dev/null | head -20

echo ""
echo "=== Check if .config directory exists ==="
ls -la .config 2>/dev/null || echo ".config directory not found"

Repository: stephansama/actions

Length of output: 1527


Fix the path to .nanostagedrc.mjs in the nano-staged command.

The configuration references ./.nanostagedrc.mjs, but the actual file is at .config/.nanostagedrc.mjs. Update line 12 to use the correct path .config/.nanostagedrc.mjs.

Current command
    - run: nano-staged -c ./.nanostagedrc.mjs -v
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.config/lefthook.yaml at line 12, Update the nano-staged invocation in the
lefthook run command: locate the line containing "nano-staged -c
./.nanostagedrc.mjs -v" and change the -c argument to point to the actual config
file location by replacing "./.nanostagedrc.mjs" with
".config/.nanostagedrc.mjs" so the command becomes "nano-staged -c
.config/.nanostagedrc.mjs -v".

Comment thread multi-deployments/package.json
Comment thread multi-deployments/src/index.test.ts Outdated
}

export function parseEnvironments(environments: [string, string][]) {
const environments_ = environments

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | 💤 Low value

Consider renaming environments_ to improve clarity.

The trailing underscore (environments_) is unconventional and typically used to avoid shadowing or reserved keywords. Since there's no naming conflict here, consider a more descriptive name like environmentNames or envNames.

♻️ Suggested refactor
-	const environments_ = environments
+	const environmentNames = environments
 		.map(([environment]) => environment)
 		.filter(Boolean);
 	const urls = environments.map(([, url]) => url).filter(Boolean);
 
-	if (environments_.length !== urls.length) {
+	if (environmentNames.length !== urls.length) {
 		throw new Error("the length of environments do not match the urls");
 	}
 
-	return { envs: environments_, urls };
+	return { envs: environmentNames, urls };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const environments_ = environments
const environmentNames = environments
.map(([environment]) => environment)
.filter(Boolean);
const urls = environments.map(([, url]) => url).filter(Boolean);
if (environmentNames.length !== urls.length) {
throw new Error("the length of environments do not match the urls");
}
return { envs: environmentNames, urls };
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@multi-deployments/src/index.ts` at line 35, The variable name environments_
is unclear; rename it to a descriptive identifier such as environmentNames or
envNames. Locate the declaration of environments_ and replace it with the chosen
name (e.g., environmentNames), update all usages in this module (and any
exported references or downstream imports) to the new name, and run a quick
project-wide search/replace to ensure no lingering references to environments_
remain; preserve the original value assignment from environments when renaming.

Comment thread pnpm-workspace.yaml
Comment on lines +5 to +43
catalog:
"@actions/core": 1.11.1
"@actions/github": 6.0.1
"@catppuccin/vitepress": ^0.1.2
"@commitlint/cli": 19.8.1
"@commitlint/config-conventional": 19.8.1
"@commitlint/types": 19.8.1
"@dotenvx/dotenvx": ^1.48.4
"@eslint/config-inspector": ^1.3.0
"@eslint/markdown": 7.1.0
"@stephansama/ai-commit-msg": ^1.0.6
"@stephansama/auto-readme": 0.1.0
"@stephansama/eslint-config": 0.2.0
"@stephansama/types-github-action-env": 1.0.3
"@tsconfig/recommended": 1.0.10
"@turbo/gen": 2.5.5
"@types/node": 24.1.0
"@vitest/coverage-v8": 3.2.4
"@vitest/ui": 3.2.4
eslint: 10.3.0
lefthook: ^2.1.6
markdown-table: ^3.0.4
nano-staged: 1.0.2
node-modules-inspector: ^1.2.0
prettier: 3.6.2
prettier-plugin-jsdoc: 1.3.3
prettier-plugin-organize-imports: 4.2.0
prettier-plugin-packagejson: 3.0.0
tsup: 8.5.0
turbo: 2.5.5
typedoc: ^0.28.10
typedoc-plugin-markdown: ^4.8.1
typedoc-vitepress-theme: ^1.1.2
typescript: 5.8.3
vitepress: ^1.6.4
vitest: 3.2.4
wrangler: 4.27.0
yaml: ^2.8.0
zx: ^8.7.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Inconsistent version pinning strategy in catalog.

The catalog uses a mix of exact versions (e.g., 1.11.1), caret ranges (e.g., ^1.48.4), and tilde ranges (e.g., ~1.0.2). This inconsistency can lead to unpredictable updates and potential breaking changes. Consider standardizing on one approach:

  • Exact versions for critical dependencies (TypeScript, ESLint, build tools) to ensure consistency across the monorepo
  • Caret ranges for less critical or frequently updated dependencies where minor updates are desired

Current critical dependencies with caret ranges that should be considered for exact pinning:

  • @dotenvx/dotenvx: ^1.48.4
  • @eslint/config-inspector: ^1.3.0
  • lefthook: ^2.1.6
  • typedoc: ^0.28.10
  • vitepress: ^1.6.4
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pnpm-workspace.yaml` around lines 5 - 43, The catalog entries use mixed
version ranges causing inconsistent dependency resolution; standardize versions
by pinning critical packages to exact versions and using carets for non-critical
ones: update the catalog map entries for `@dotenvx/dotenvx`,
`@eslint/config-inspector`, lefthook, typedoc, and vitepress to exact versions
(remove the leading ^) while leaving less-critical entries as caret ranges as
desired, and ensure the pattern is documented in the pnpm-workspace.yaml
top-level comment for future contributors.

Comment thread tsconfig.base.json
"module": "preserve",
"target": "esnext",
"moduleResolution": "bundler",
"types": ["@stephansama/types-github-action-env"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check if packages use `@types/`* dependencies that might not be auto-included

echo "=== `@types/`* packages in devDependencies ==="
fd -t f "package.json" -x sh -c 'if [ -f {} ]; then echo "--- {} ---"; jq -r ".devDependencies | keys[]? | select(startswith(\"@types/\"))" {} 2>/dev/null; fi'

echo -e "\n=== Packages extending tsconfig.base.json with custom types ==="
fd -t f "tsconfig.json" -x sh -c 'if rg -q "tsconfig.base.json" {}; then echo "--- {} ---"; jq -r ".compilerOptions.types // empty" {} 2>/dev/null; fi'

Repository: stephansama/actions

Length of output: 647


🏁 Script executed:

cat -n tsconfig.base.json

Repository: stephansama/actions

Length of output: 401


🏁 Script executed:

# Check if packages extending tsconfig.base.json have `@types` in their own package.json
fd -t f "package.json" -x sh -c 'if grep -q "tsconfig.base" "$(dirname {})/tsconfig.json" 2>/dev/null; then echo "--- {} ---"; jq -r ".devDependencies | keys[]? | select(startswith(\"@types/\"))" {} 2>/dev/null; fi' | head -50

Repository: stephansama/actions

Length of output: 198


🏁 Script executed:

# Check if any packages have types array in their tsconfig that extends base
fd -t f "tsconfig.json" -x sh -c 'if rg -q "tsconfig.base.json" {}; then echo "File: {}"; jq -r ".compilerOptions" {} 2>/dev/null | head -20; fi'

Repository: stephansama/actions

Length of output: 358


🏁 Script executed:

# Check what packages that inherit base config actually import
echo "=== generate-md-action-inputs source ===" 
find ./generate-md-action-inputs/src -type f \( -name "*.ts" -o -name "*.js" \) -exec head -30 {} \; 2>/dev/null | grep -E "^import|^require" | head -20

echo -e "\n=== multi-deployments source ===" 
find ./multi-deployments/src -type f \( -name "*.ts" -o -name "*.js" \) -exec head -30 {} \; 2>/dev/null | grep -E "^import|^require" | head -20

Repository: stephansama/actions

Length of output: 717


🏁 Script executed:

# Check if there are any actual files in these packages
ls -la ./generate-md-action-inputs/src 2>/dev/null || echo "No src dir"
ls -la ./multi-deployments/src 2>/dev/null || echo "No src dir"

Repository: stephansama/actions

Length of output: 532


Add @types/node to the types array or use skipLibCheck to prevent missing type definitions.

The restrictive "types": ["@stephansama/types-github-action-env"] configuration prevents automatic inclusion of @types/* packages. Packages like generate-md-action-inputs use Node.js APIs (node:path, node:fs) that require type definitions from @types/node. Without explicitly adding it to the types array, child packages inheriting this config will lack these types. The do-not-track-polyfill package already works around this by overriding with an explicit types array—apply the same pattern to other packages or add @types/node to the base config's types array.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tsconfig.base.json` at line 8, The tsconfig base's "types" array currently
restricts automatic inclusion of `@types/`* which breaks packages using Node APIs;
update the "types" property in tsconfig.base.json to include "@types/node" (or
alternatively set "skipLibCheck": true) so child packages like
generate-md-action-inputs no longer miss node type defs, and ensure other
packages (e.g., do-not-track-polyfill) can drop their local override once the
base config includes "@types/node".

This branch was successfully deployed

3 active deployments
[preview] - test 2 — 6194d354 Deployed May 10, 2026 by github-actions[bot]
[preview] - test 1 — 6194d354 Deployed May 10, 2026 by github-actions[bot]
Preview — 6194d354 Deployed May 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant