perf(multipublish): update lint paths to use root#263
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: a5a7e6f The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughESLint node config now tolerates missing options via optional chaining and empty-array defaults. multipublish CLI imports the ESM build ChangesRuntime & Tooling Adjustments
README Header Standardization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 48 minutes and 36 seconds.Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces optional chaining for the options parameter in the Node.js ESLint configuration, updates the CLI entry point to import an .mjs file, and expands the linting scope in the multipublish package. Feedback suggests aligning the function signature in node.ts with the new optional implementation and narrowing the linting target in package.json to exclude build artifacts while still covering root-level scripts.
| allowModules: options?.allowModules || [], | ||
| resolvePaths: options?.resolvePaths || [], |
There was a problem hiding this comment.
The use of optional chaining (options?.) suggests that the options parameter is intended to be optional. However, the function signature at line 13 (outside this diff) still defines options as a required parameter. This creates an inconsistency where TypeScript consumers are forced to provide an argument, while the implementation is written to handle its absence. Consider updating the function signature to options: Options = {} or options?: Options to align the types with the implementation.
| "lint": "eslint ./ --pass-on-no-patterns --no-error-on-unmatched-pattern", | ||
| "lint:fix": "eslint ./ --pass-on-no-patterns --no-error-on-unmatched-pattern --fix" |
There was a problem hiding this comment.
Changing the lint target from ./src/ to ./ expands the scope to the entire package directory. This will include generated folders like dist/ and config/ (as seen in the files field and build.mjs), which can lead to performance overhead and potential linting errors on build artifacts. It is recommended to explicitly target source files and root-level scripts to avoid scanning generated code.
| "lint": "eslint ./ --pass-on-no-patterns --no-error-on-unmatched-pattern", | |
| "lint:fix": "eslint ./ --pass-on-no-patterns --no-error-on-unmatched-pattern --fix" | |
| "lint": "eslint src build.mjs cli.mjs --pass-on-no-patterns --no-error-on-unmatched-pattern", | |
| "lint:fix": "eslint src build.mjs cli.mjs --pass-on-no-patterns --no-error-on-unmatched-pattern --fix" |
|
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
core/eslint-config/src/configs/node.ts (1)
13-13: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winType signature doesn't reflect the
options?.defensive guard.
optionsis typed asOptions(required), but the optional chaining onoptions?.allowModules/options?.resolvePathsimplies it can beundefinedat runtime. The TypeScript signature and the implementation are inconsistent — callers could passundefinedfrom JS and the code handles it silently, yet TypeScript would flag that as a type error.Either:
- Make
optionsoptional to align the signature with the implementation intent (preferred — consistent with thepackagejson.tspattern):- Or remove the
options?.guard ifoptionsis always required (riskier — prevents the original bug from being fixed).♻️ Preferred fix: update the function signature
-export function config(options: Options): Config[] { +export function config(options?: Options): Config[] {🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@core/eslint-config/src/configs/node.ts` at line 13, The function config currently types its parameter as required (Options) but uses optional chaining (options?.allowModules / options?.resolvePaths), so update the signature to accept an optional parameter (e.g., change config(options: Options) to config(options?: Options)) to match the implementation; ensure any call sites that relied on a required Options are compatible and update JSDoc/type comments if present for the config function and the Options type to reflect that options may be undefined.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@core/eslint-config/src/configs/node.ts`:
- Line 13: The function config currently types its parameter as required
(Options) but uses optional chaining (options?.allowModules /
options?.resolvePaths), so update the signature to accept an optional parameter
(e.g., change config(options: Options) to config(options?: Options)) to match
the implementation; ensure any call sites that relied on a required Options are
compatible and update JSDoc/type comments if present for the config function and
the Options type to reflect that options may be undefined.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 0ae02b5e-4220-4ea2-b002-bfb818351221
📒 Files selected for processing (3)
core/eslint-config/src/configs/node.tscore/multipublish/cli.mjscore/multipublish/package.json
There was a problem hiding this comment.
Actionable comments posted: 10
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@core/alfred-kaomoji/README.md`:
- Line 3: The README header contains malformed Markdown: remove the backslashes
and the incorrect embedded image/text from the link so the package name links
cleanly; specifically edit the header line that currently includes
"`@stephansama` / \[`#  Alfred Kaomoji
Picker`]\(https://packages.stephansama.info/api/@stephansama/#
 Alfred Kaomoji Picker/)`" and replace it with a proper
Markdown link like "`[`@stephansama`](https://github.com/stephansama) /
[alfred-kaomoji](https://packages.stephansama.info/api/@stephansama/alfred-kaomoji)`"
so brackets and parentheses are not escaped and the link target is just the
package name.
In `@core/auto-readme/README.md`:
- Line 3: The markdown header contains escaped bracket and parenthesis
characters that prevent the link from rendering; update the header in README.md
(the line starting with "# [`@stephansama` / \[`auto-readme`\]...") by removing
the backslashes so the link reads like a normal markdown link (e.g., "#
[`@stephansama`](https://.../auto-readme/)") ensuring the display text
`@stephansama` and the package path `auto-readme` are correctly wrapped in []
and () respectively.
In `@core/catppuccin-rss/README.md`:
- Line 3: The markdown header string "#
[`@stephansama`](https://github.com/stephansama) /
\[`catppuccin-rss`]\(https://packages.stephansama.info/api/@stephansama/catppuccin-rss/)"
contains escaped brackets and parentheses that break link rendering; remove the
backslashes so the second link reads
[`catppuccin-rss`](https://packages.stephansama.info/api/@stephansama/catppuccin-rss/)
(keep the first link to `@stephansama` unchanged) so the header becomes two
proper Markdown links.
In `@core/example/README.md`:
- Line 3: The markdown header contains escaped brackets and an incorrect "# "
prefix in the link; edit the header text (the line starting with "#
[`@stephansama`]") to remove the backslashes so the link renders and remove the
stray "# " from both the package name/URL so the link target is valid (i.e., use
a normal markdown link format
[`@stephansama`](https://packages.stephansama.info/api/@stephansama/create-stephansama-example/)
without escapes).
In `@core/single-file/README.md`:
- Around line 1-5: The README.md currently starts with an HTML <div> which
triggers MD041; add a plain top-level Markdown heading as the very first line
(e.g., "# single-file" or similar project title) to satisfy the rule, then leave
the existing centered banner div and its content unchanged directly below that
new H1 so the visual layout remains the same.
In `@core/svelte-social-share-links/README.md`:
- Line 3: The package header contains escaped brackets and parentheses in the
markdown link (`\[` and `\(`) which prevents the link from rendering; edit the
README header line to remove the backslashes so the link reads
[`@stephansama`](https://github.com/stephansama) /
[`svelte-social-share-links`](https://packages.stephansama.info/api/@stephansama/svelte-social-share-links/)
(i.e., remove the backslashes before [ and ( to restore a proper clickable
link).
In `@monoman.config.ts`:
- Around line 25-40: The contents(text) transformer is non-idempotent because it
blindly assumes oldStephansamaHeader exists; update the contents(text) function
to return early when oldStephansamaHeader is not present (e.g., if
(!text.includes(oldStephansamaHeader)) return text) before performing
replace(oldStephansamaHeader, ...) so you only replace and reformat READMEs that
actually contain the old header, preserving files that have already been
converted by newStephansamaHeader.
- Around line 6-12: The generated README template in the newStephansamaHeader
string triggers markdownlint MD041 because the first rendered line is a heading;
modify the template to inline-disable MD041 by adding an HTML comment to disable
the rule before the heading and restore it after (e.g., insert a "<!--
markdownlint-disable MD041 -->" just before the first heading and a "<!--
markdownlint-restore MD041 -->" after) so the template still renders the same
but suppresses the warning for the generated files.
In `@pnpm-workspace.yaml`:
- Line 64: The workspace entry "mdast-zone" is pinned to a specific commit on a
personal GitHub fork
(github:stephansama/mdast-zone#1c5b08cd97240debeed4c9c6afad49df5877a132), which
risks breakage if the fork/commit changes; update the pnpm-workspace.yaml to
point to a published, versioned release instead (e.g., an npm/JSR package) or
replace the Git commit pin with a maintained tag/semver release, and if
publishing isn't possible open a tracking issue to publish mdast-zone to npm/JSR
and document the temporary fork pin for follow-up.
- Around line 198-203: The three unused catalog entries conflicts_dedent_h1_7_1,
conflicts_commitlint_h19_8_1, and conflicts_@dotenvx/dotenvx_h1_52_0 in
pnpm-workspace.yaml are unused and will be auto-removed; either remove these
three catalog keys from pnpm-workspace.yaml now, or add the corresponding
references (e.g., "catalog:conflicts_dedent_h1_7_1",
"catalog:conflicts_commitlint_h19_8_1",
"catalog:conflicts_@dotenvx/dotenvx_h1_52_0") to the consuming package.json
files so they are actually used; choose one approach and update the
pnpm-workspace.yaml or the relevant package.json files accordingly so the
catalogs are not inadvertently pruned.
🪄 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: 867562e2-6f2c-4d00-8daa-ebd022450a9d
📒 Files selected for processing (27)
core/ai-commit-msg/README.mdcore/alfred-kaomoji/README.mdcore/astro-iconify-svgmap/README.mdcore/auto-readme/README.mdcore/catppuccin-jsonresume-theme/README.mdcore/catppuccin-opml/README.mdcore/catppuccin-rss/README.mdcore/catppuccin-typedoc/README.mdcore/catppuccin-xsl/README.mdcore/eslint-config/README.mdcore/example/README.mdcore/find-makefile-targets/README.mdcore/github-env/README.mdcore/multipublish/README.mdcore/prettier-plugin-handlebars/README.mdcore/single-file/README.mdcore/svelte-social-share-links/README.mdcore/typed-env/README.mdcore/typed-events/README.mdcore/typed-nocodb-api/README.mdcore/typed-templates/README.mdcore/types-github-action-env/README.mdcore/types-lhci/README.mdmonoman.config.tspnpm-workspace.yamlscripts/README.mdturbo/generators/templates/common/README.md
| #  Alfred Kaomoji Picker | ||
| <div align="center"> | ||
|
|
||
| # [`@stephansama`](https://github.com/stephansama) / \[`#  Alfred Kaomoji Picker`]\(https://packages.stephansama.info/api/@stephansama/#  Alfred Kaomoji Picker/) |
There was a problem hiding this comment.
Fix malformed markdown syntax in header link.
The package name link has multiple syntax errors:
- Escaped brackets
\[and\(should not be escaped in markdown - The package name and URL incorrectly include
#  Alfred Kaomoji Pickerinstead of justalfred-kaomoji - This will render as broken/literal text instead of a proper link
🐛 Proposed fix
-# [`@stephansama`](https://github.com/stephansama) / \[`#  Alfred Kaomoji Picker`]\(https://packages.stephansama.info/api/@stephansama/#  Alfred Kaomoji Picker/)
+# [`@stephansama`](https://github.com/stephansama) / [`alfred-kaomoji`](https://packages.stephansama.info/api/@stephansama/alfred-kaomoji/)📝 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.
| # [`@stephansama`](https://github.com/stephansama) / \[`#  Alfred Kaomoji Picker`]\(https://packages.stephansama.info/api/@stephansama/#  Alfred Kaomoji Picker/) | |
| # [`@stephansama`](https://github.com/stephansama) / [`alfred-kaomoji`](https://packages.stephansama.info/api/@stephansama/alfred-kaomoji/) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@core/alfred-kaomoji/README.md` at line 3, The README header contains
malformed Markdown: remove the backslashes and the incorrect embedded image/text
from the link so the package name links cleanly; specifically edit the header
line that currently includes "`@stephansama` / \[`#  Alfred
Kaomoji Picker`]\(https://packages.stephansama.info/api/@stephansama/#
 Alfred Kaomoji Picker/)`" and replace it with a proper
Markdown link like "`[`@stephansama`](https://github.com/stephansama) /
[alfred-kaomoji](https://packages.stephansama.info/api/@stephansama/alfred-kaomoji)`"
so brackets and parentheses are not escaped and the link target is just the
package name.
| # Auto Readme 🪄 | ||
| <div align="center"> | ||
|
|
||
| # [`@stephansama`](https://github.com/stephansama) / \[`auto-readme`]\(https://packages.stephansama.info/api/@stephansama/auto-readme/) |
There was a problem hiding this comment.
Fix malformed markdown link syntax.
The escaped brackets (\[, \(, \), \]) prevent the markdown link from rendering correctly.
🔗 Proposed fix
-# [`@stephansama`](https://github.com/stephansama) / \[`auto-readme`]\(https://packages.stephansama.info/api/@stephansama/auto-readme/)
+# [`@stephansama`](https://github.com/stephansama) / [`auto-readme`](https://packages.stephansama.info/api/@stephansama/auto-readme/)📝 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.
| # [`@stephansama`](https://github.com/stephansama) / \[`auto-readme`]\(https://packages.stephansama.info/api/@stephansama/auto-readme/) | |
| # [`@stephansama`](https://github.com/stephansama) / [`auto-readme`](https://packages.stephansama.info/api/@stephansama/auto-readme/) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@core/auto-readme/README.md` at line 3, The markdown header contains escaped
bracket and parenthesis characters that prevent the link from rendering; update
the header in README.md (the line starting with "# [`@stephansama` /
\[`auto-readme`\]...") by removing the backslashes so the link reads like a
normal markdown link (e.g., "# [`@stephansama`](https://.../auto-readme/)")
ensuring the display text `@stephansama` and the package path `auto-readme` are
correctly wrapped in [] and () respectively.
| # [Catppuccin](https://github.com/catppuccin/catppuccin) x [Pretty-feed-v3](https://github.com/genmon/aboutfeeds/blob/main/tools/pretty-feed-v3.xsl) | ||
| <div align="center"> | ||
|
|
||
| # [`@stephansama`](https://github.com/stephansama) / \[`catppuccin-rss`]\(https://packages.stephansama.info/api/@stephansama/catppuccin-rss/) |
There was a problem hiding this comment.
Fix malformed markdown link syntax.
The escaped brackets (\[, \(, \), \]) prevent the markdown link from rendering correctly.
🔗 Proposed fix
-# [`@stephansama`](https://github.com/stephansama) / \[`catppuccin-rss`]\(https://packages.stephansama.info/api/@stephansama/catppuccin-rss/)
+# [`@stephansama`](https://github.com/stephansama) / [`catppuccin-rss`](https://packages.stephansama.info/api/@stephansama/catppuccin-rss/)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@core/catppuccin-rss/README.md` at line 3, The markdown header string "#
[`@stephansama`](https://github.com/stephansama) /
\[`catppuccin-rss`]\(https://packages.stephansama.info/api/@stephansama/catppuccin-rss/)"
contains escaped brackets and parentheses that break link rendering; remove the
backslashes so the second link reads
[`catppuccin-rss`](https://packages.stephansama.info/api/@stephansama/catppuccin-rss/)
(keep the first link to `@stephansama` unchanged) so the header becomes two
proper Markdown links.
| # create-stephansama-example | ||
| <div align="center"> | ||
|
|
||
| # [`@stephansama`](https://github.com/stephansama) / \[`# create-stephansama-example`]\(https://packages.stephansama.info/api/@stephansama/# create-stephansama-example/) |
There was a problem hiding this comment.
Fix malformed markdown link syntax.
The escaped brackets (\[, \(, \), \]) prevent the markdown link from rendering. Additionally, the package name and URL incorrectly include a # prefix.
🔗 Proposed fix
-# [`@stephansama`](https://github.com/stephansama) / \[`# create-stephansama-example`]\(https://packages.stephansama.info/api/@stephansama/# create-stephansama-example/)
+# [`@stephansama`](https://github.com/stephansama) / [`create-stephansama-example`](https://packages.stephansama.info/api/create-stephansama-example/)📝 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.
| # [`@stephansama`](https://github.com/stephansama) / \[`# create-stephansama-example`]\(https://packages.stephansama.info/api/@stephansama/# create-stephansama-example/) | |
| # [`@stephansama`](https://github.com/stephansama) / [`create-stephansama-example`](https://packages.stephansama.info/api/create-stephansama-example/) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@core/example/README.md` at line 3, The markdown header contains escaped
brackets and an incorrect "# " prefix in the link; edit the header text (the
line starting with "# [`@stephansama`]") to remove the backslashes so the link
renders and remove the stray "# " from both the package name/URL so the link
target is valid (i.e., use a normal markdown link format
[`@stephansama`](https://packages.stephansama.info/api/@stephansama/create-stephansama-example/)
without escapes).
| <div align="center"> | ||
|
|
||
| # [`@stephansama`](https://github.com/stephansama) / [`single-file`](https://packages.stephansama.info/api/@stephansama/single-file/) | ||
|
|
||
| </div> |
There was a problem hiding this comment.
Add a top-level Markdown heading on the first line to satisfy MD041.
markdownlint warns because the file starts with an HTML block instead of an H1. Add a plain H1 at the top, then keep the centered banner below.
Proposed fix
+ # `@stephansama/single-file`
+
<div align="center">
# [`@stephansama`](https://github.com/stephansama) / [`single-file`](https://packages.stephansama.info/api/@stephansama/single-file/)
</div>📝 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.
| <div align="center"> | |
| # [`@stephansama`](https://github.com/stephansama) / [`single-file`](https://packages.stephansama.info/api/@stephansama/single-file/) | |
| </div> | |
| # `@stephansama/single-file` | |
| <div align="center"> | |
| # [`@stephansama`](https://github.com/stephansama) / [`single-file`](https://packages.stephansama.info/api/@stephansama/single-file/) | |
| </div> |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 1-1: First line in a file should be a top-level heading
(MD041, first-line-heading, first-line-h1)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@core/single-file/README.md` around lines 1 - 5, The README.md currently
starts with an HTML <div> which triggers MD041; add a plain top-level Markdown
heading as the very first line (e.g., "# single-file" or similar project title)
to satisfy the rule, then leave the existing centered banner div and its content
unchanged directly below that new H1 so the visual layout remains the same.
| # svelte-social-share-links | ||
| <div align="center"> | ||
|
|
||
| # [`@stephansama`](https://github.com/stephansama) / \[`svelte-social-share-links`]\(https://packages.stephansama.info/api/@stephansama/svelte-social-share-links/) |
There was a problem hiding this comment.
Fix escaped brackets in package link.
The markdown link for the package name contains escaped brackets \[ and \( that should not be escaped, causing the link to render as literal text instead of a clickable link.
🐛 Proposed fix
-# [`@stephansama`](https://github.com/stephansama) / \[`svelte-social-share-links`]\(https://packages.stephansama.info/api/@stephansama/svelte-social-share-links/)
+# [`@stephansama`](https://github.com/stephansama) / [`svelte-social-share-links`](https://packages.stephansama.info/api/@stephansama/svelte-social-share-links/)📝 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.
| # [`@stephansama`](https://github.com/stephansama) / \[`svelte-social-share-links`]\(https://packages.stephansama.info/api/@stephansama/svelte-social-share-links/) | |
| # [`@stephansama`](https://github.com/stephansama) / [`svelte-social-share-links`](https://packages.stephansama.info/api/@stephansama/svelte-social-share-links/) |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@core/svelte-social-share-links/README.md` at line 3, The package header
contains escaped brackets and parentheses in the markdown link (`\[` and `\(`)
which prevents the link from rendering; edit the README header line to remove
the backslashes so the link reads [`@stephansama`](https://github.com/stephansama)
/
[`svelte-social-share-links`](https://packages.stephansama.info/api/@stephansama/svelte-social-share-links/)
(i.e., remove the backslashes before [ and ( to restore a proper clickable
link).
| const newStephansamaHeader = ` | ||
| <div align="center"> | ||
|
|
||
| # [\`@stephansama\`](https://github.com/stephansama) / [\`{{package}}\`](https://packages.stephansama.info/api/@stephansama/{{package}}/) | ||
|
|
||
| </div> | ||
| `.trim(); |
There was a problem hiding this comment.
Template triggers MD041 (first-line-heading) on every generated README.
All generated READMEs start with <div align="center">, causing markdownlint to emit the MD041 warning flagged by the static analysis tool on all seven files in this PR. Adding a disable comment inside the template silences the warning at the source without changing the rendered output.
✏️ Proposed fix: inline markdownlint disable in the template
const newStephansamaHeader = `
+<!-- markdownlint-disable-next-line MD041 -->
<div align="center">📝 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.
| const newStephansamaHeader = ` | |
| <div align="center"> | |
| # [\`@stephansama\`](https://github.com/stephansama) / [\`{{package}}\`](https://packages.stephansama.info/api/@stephansama/{{package}}/) | |
| </div> | |
| `.trim(); | |
| const newStephansamaHeader = ` | |
| <!-- markdownlint-disable-next-line MD041 --> | |
| <div align="center"> | |
| # [\`@stephansama\`](https://github.com/stephansama) / [\`{{package}}\`](https://packages.stephansama.info/api/@stephansama/{{package}}/) | |
| </div> | |
| `.trim(); |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@monoman.config.ts` around lines 6 - 12, The generated README template in the
newStephansamaHeader string triggers markdownlint MD041 because the first
rendered line is a heading; modify the template to inline-disable MD041 by
adding an HTML comment to disable the rule before the heading and restore it
after (e.g., insert a "<!-- markdownlint-disable MD041 -->" just before the
first heading and a "<!-- markdownlint-restore MD041 -->" after) so the template
still renders the same but suppresses the warning for the generated files.
| { | ||
| contents(text) { | ||
| if (!text) return ""; | ||
| return text | ||
| .replace(oldStephansamaHeader, "") | ||
| .split("\n") | ||
| .map((_, index) => { | ||
| if (index > 0) return _; | ||
| return newStephansamaHeader.replaceAll("{{package}}", _); | ||
| }) | ||
| .join("\n"); | ||
| }, | ||
| exclude: ["README.md", "examples/**/README.md"], | ||
| include: ["**/README.md"], | ||
| type: "text", | ||
| }, |
There was a problem hiding this comment.
Non-idempotent transformation will corrupt READMEs on every subsequent monoman run.
After the first run, each README starts with <div align="center">. The regex /# @stephansama\// does not match that new format, so replace() is a no-op. split("\n")[0] then yields "<div align=\"center\">", and newStephansamaHeader.replaceAll("{{package}}", "<div align=\"center\">") prepends a malformed new header — compounding on every subsequent invocation.
🐛 Proposed fix: guard with an early-return when the old header is absent
contents(text) {
if (!text) return "";
+ if (!oldStephansamaHeader.test(text)) return text;
return text
.replace(oldStephansamaHeader, "")
.split("\n")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@monoman.config.ts` around lines 25 - 40, The contents(text) transformer is
non-idempotent because it blindly assumes oldStephansamaHeader exists; update
the contents(text) function to return early when oldStephansamaHeader is not
present (e.g., if (!text.includes(oldStephansamaHeader)) return text) before
performing replace(oldStephansamaHeader, ...) so you only replace and reformat
READMEs that actually contain the old header, preserving files that have already
been converted by newStephansamaHeader.
| mdast: 3.0.0 | ||
| mdast-comment-marker: ^3.0.0 | ||
| mdast-util-from-markdown: ^2.0.2 | ||
| mdast-zone: github:stephansama/mdast-zone#1c5b08cd97240debeed4c9c6afad49df5877a132 |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial | 💤 Low value
mdast-zone is pinned to an unversioned fork commit.
github:stephansama/mdast-zone#1c5b08cd97240debeed4c9c6afad49df5877a132 ties the build to a commit on a personal fork. If the fork is ever deleted or the commit is re-written/force-pushed, pnpm install breaks for all consumers. This centralizes an existing risk from auto-readme/package.json into the catalog (which is an improvement), but the underlying reliance on a fork instead of a published npm release should be noted.
Consider publishing the fork to npm/JSR and updating the reference, or at minimum opening a tracking issue.
Would you like me to open a tracking issue to publish mdast-zone to npm/JSR and migrate away from the fork pin?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pnpm-workspace.yaml` at line 64, The workspace entry "mdast-zone" is pinned
to a specific commit on a personal GitHub fork
(github:stephansama/mdast-zone#1c5b08cd97240debeed4c9c6afad49df5877a132), which
risks breakage if the fork/commit changes; update the pnpm-workspace.yaml to
point to a published, versioned release instead (e.g., an npm/JSR package) or
replace the Git commit pin with a maintained tag/semver release, and if
publishing isn't possible open a tracking issue to publish mdast-zone to npm/JSR
and document the temporary fork pin for follow-up.
| conflicts_dedent_h1_7_1: | ||
| dedent: ^1.7.1 | ||
| conflicts_commitlint_h19_8_1: | ||
| '@commitlint/config-conventional': ^19.8.1 | ||
| conflicts_@dotenvx/dotenvx_h1_52_0: | ||
| '@dotenvx/dotenvx': ^1.52.0 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check for any package.json using the conflicts_* catalog references.
# Expected: No matches if the catalog entries are currently unused.
rg -rn --type=json 'catalog:conflicts_' --include='package.json'Repository: stephansama/packages
Length of output: 506
🏁 Script executed:
#!/bin/bash
# Find all package.json files and search for catalog:conflicts_ references
find . -name 'package.json' -type f | head -20Repository: stephansama/packages
Length of output: 786
🏁 Script executed:
#!/bin/bash
# Search for catalog:conflicts_ in package.json files with correct rg syntax
rg 'catalog:conflicts_' -g '*.json'Repository: stephansama/packages
Length of output: 46
🏁 Script executed:
#!/bin/bash
# Check the pnpm-workspace.yaml file to verify the context around line 205
cat -n pnpm-workspace.yaml | sed -n '195,210p'Repository: stephansama/packages
Length of output: 547
🏁 Script executed:
#!/bin/bash
# Check which packages use dedent directly
rg '"dedent"' -g '*.json' | grep -E 'package.json'Repository: stephansama/packages
Length of output: 175
🏁 Script executed:
#!/bin/bash
# Check which packages use `@commitlint/config-conventional`
rg '@commitlint/config-conventional' -g '*.json' | grep -E 'package.json'Repository: stephansama/packages
Length of output: 220
🏁 Script executed:
#!/bin/bash
# Check which packages use `@dotenvx/dotenvx`
rg '@dotenvx/dotenvx' -g '*.json' | grep -E 'package.json'Repository: stephansama/packages
Length of output: 259
🏁 Script executed:
#!/bin/bash
# Show full dedent context in core/single-file
cat -n core/single-file/package.json | grep -A2 -B2 'dedent'Repository: stephansama/packages
Length of output: 216
🏁 Script executed:
#!/bin/bash
# Show full dedent context in core/multipublish
cat -n core/multipublish/package.json | grep -A2 -B2 'dedent'Repository: stephansama/packages
Length of output: 267
🏁 Script executed:
#!/bin/bash
# Show full `@dotenvx/dotenvx` context in core/typed-env
cat -n core/typed-env/package.json | grep -A2 -B2 '@dotenvx/dotenvx'Repository: stephansama/packages
Length of output: 348
🏁 Script executed:
#!/bin/bash
# Show all catalog entries in pnpm-workspace.yaml to see what's in the default catalog
cat -n pnpm-workspace.yaml | sed -n '1,210p'Repository: stephansama/packages
Length of output: 6678
conflicts_* catalogs are unused and will be auto-removed by cleanupUnusedCatalogs: true.
The three conflict catalog entries (lines 198–203) are not referenced anywhere in the workspace. Verification confirms no package.json files use catalog:conflicts_dedent_h1_7_1, catalog:conflicts_commitlint_h19_8_1, or catalog:conflicts_@dotenvx/dotenvx_h1_52_0. On the next pnpm install, these unused catalogs will be pruned, making this change a no-op.
Either update consuming package.json files to reference these catalogs or defer adding them until the migration is ready.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pnpm-workspace.yaml` around lines 198 - 203, The three unused catalog entries
conflicts_dedent_h1_7_1, conflicts_commitlint_h19_8_1, and
conflicts_@dotenvx/dotenvx_h1_52_0 in pnpm-workspace.yaml are unused and will be
auto-removed; either remove these three catalog keys from pnpm-workspace.yaml
now, or add the corresponding references (e.g.,
"catalog:conflicts_dedent_h1_7_1", "catalog:conflicts_commitlint_h19_8_1",
"catalog:conflicts_@dotenvx/dotenvx_h1_52_0") to the consuming package.json
files so they are actually used; choose one approach and update the
pnpm-workspace.yaml or the relevant package.json files accordingly so the
catalogs are not inadvertently pruned.
Checklist
mainhave been mergedmain