docs(rspeedy): document config default values#2448
docs(rspeedy): document config default values#2448colinaaa merged 4 commits intolynx-family:mainfrom
Conversation
🦋 Changeset detectedLatest commit: e11f89c The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types 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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis PR adds explicit JSDoc Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/rspeedy/core/src/config/output/filename.ts (1)
67-75:⚠️ Potential issue | 🟡 Minor
templateplaceholder docs are missing[platform].
@defaultValueuses'[name].[platform].bundle', but the supported-placeholder list does not include[platform]. Please add it (or adjust the default string).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/rspeedy/core/src/config/output/filename.ts` around lines 67 - 75, The documentation for the output filename template is inconsistent: the `@defaultValue` lists '[name].[platform].bundle' but the supported-placeholder list only mentions [name] and [contenthash]; update the docs for the template option (in filename.ts) to include the [platform] placeholder in the supported list — or alternatively change the `@defaultValue` to remove [platform] if that placeholder isn't supported — and ensure the README/comment block for the template field explicitly documents [platform] alongside [name] and [contenthash].
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/rspeedy/core/src/config/output/dist-path.ts`:
- Around line 18-21: Update the JSDoc for the deprecated intermediate option in
dist-path.ts so it clearly states that the `@defaultValue` '.rspeedy' is
historical only and has no runtime effect; locate the comment block that
documents the intermediate option (symbol name "intermediate") and append a
short sentence like "This is legacy/historical and is never read at runtime, so
it has no effect on Rspeedy's behavior." to the existing description.
In `@packages/rspeedy/core/src/config/performance/build-cache.ts`:
- Line 46: Update the JSDoc on the performance.buildCache option so the
`@defaultValue` contains only the base array (['package.json', 'tsconfig.json' or
source.tsconfigPath, '.env', '.env.*', 'tailwindcss.config.*']) and remove the
CLI-specific sentence; then add a `@remarks` block (or extend existing `@remarks`)
that documents the CLI augmentation — i.e., that when using the Rspeedy CLI with
performance.buildCache enabled the loaded lynx.config.* file is also added.
Target the JSDoc surrounding the performance.buildCache symbol in build-cache.ts
and ensure the `@defaultValue` and `@remarks` reflect this split.
---
Outside diff comments:
In `@packages/rspeedy/core/src/config/output/filename.ts`:
- Around line 67-75: The documentation for the output filename template is
inconsistent: the `@defaultValue` lists '[name].[platform].bundle' but the
supported-placeholder list only mentions [name] and [contenthash]; update the
docs for the template option (in filename.ts) to include the [platform]
placeholder in the supported list — or alternatively change the `@defaultValue` to
remove [platform] if that placeholder isn't supported — and ensure the
README/comment block for the template field explicitly documents [platform]
alongside [name] and [contenthash].
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: da8e5fc0-3a7b-42f4-ae36-aa96bb0af157
📒 Files selected for processing (25)
.github/rspeedy-config-docs.instructions.mdpackages/rspeedy/core/etc/rspeedy.api.mdpackages/rspeedy/core/src/config/defineConfig.tspackages/rspeedy/core/src/config/dev/client.tspackages/rspeedy/core/src/config/dev/index.tspackages/rspeedy/core/src/config/index.tspackages/rspeedy/core/src/config/loadConfig.tspackages/rspeedy/core/src/config/output/css-modules.tspackages/rspeedy/core/src/config/output/dist-path.tspackages/rspeedy/core/src/config/output/filename.tspackages/rspeedy/core/src/config/output/index.tspackages/rspeedy/core/src/config/output/minify.tspackages/rspeedy/core/src/config/output/source-map.tspackages/rspeedy/core/src/config/performance/build-cache.tspackages/rspeedy/core/src/config/performance/chunk-split.tspackages/rspeedy/core/src/config/performance/index.tspackages/rspeedy/core/src/config/resolve/index.tspackages/rspeedy/core/src/config/server/index.tspackages/rspeedy/core/src/config/source/decorators.tspackages/rspeedy/core/src/config/source/entry.tspackages/rspeedy/core/src/config/source/index.tspackages/rspeedy/core/src/config/source/transformImport.tspackages/rspeedy/core/src/config/tools/css-extract.tspackages/rspeedy/core/src/config/tools/css-loader.tspackages/rspeedy/core/src/config/tools/index.ts
💤 Files with no reviewable changes (1)
- packages/rspeedy/core/etc/rspeedy.api.md
| * This option is never read and will be removed in the future version. | ||
| * | ||
| * @remarks | ||
| * | ||
| * Default value: | ||
| * | ||
| * - `'.rspeedy'` | ||
| * @defaultValue `'.rspeedy'` | ||
| */ |
There was a problem hiding this comment.
Clarify runtime effect for deprecated intermediate default.
Since the option is “never read,” presenting @defaultValue '.rspeedy' alone can imply active behavior. Please append a short clarification that this is legacy/historical and has no runtime effect in Rspeedy.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/rspeedy/core/src/config/output/dist-path.ts` around lines 18 - 21,
Update the JSDoc for the deprecated intermediate option in dist-path.ts so it
clearly states that the `@defaultValue` '.rspeedy' is historical only and has no
runtime effect; locate the comment block that documents the intermediate option
(symbol name "intermediate") and append a short sentence like "This is
legacy/historical and is never read at runtime, so it has no effect on Rspeedy's
behavior." to the existing description.
| * | ||
| * When using Rspeedy CLI, it will also automatically add | ||
| * `lynx.config.js` to the build dependencies. | ||
| * @defaultValue `['package.json', 'tsconfig.json' (or source.tsconfigPath), '.env', '.env.*', 'tailwindcss.config.*']`; when using the Rspeedy CLI with `performance.buildCache` enabled, the loaded `lynx.config.*` file is also added. |
There was a problem hiding this comment.
Split direct default from CLI-injected behavior.
This @defaultValue currently includes tool-injected behavior (“when using the Rspeedy CLI…”). Keep the base list in @defaultValue, and move the CLI augmentation to @remarks for clearer semantics.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@packages/rspeedy/core/src/config/performance/build-cache.ts` at line 46,
Update the JSDoc on the performance.buildCache option so the `@defaultValue`
contains only the base array (['package.json', 'tsconfig.json' or
source.tsconfigPath, '.env', '.env.*', 'tailwindcss.config.*']) and remove the
CLI-specific sentence; then add a `@remarks` block (or extend existing `@remarks`)
that documents the CLI augmentation — i.e., that when using the Rspeedy CLI with
performance.buildCache enabled the loaded lynx.config.* file is also added.
Target the JSDoc surrounding the performance.buildCache symbol in build-cache.ts
and ensure the `@defaultValue` and `@remarks` reflect this split.
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Merging this PR will not alter performance
Comparing Footnotes
|
React External#322 Bundle Size — 590.13KiB (0%).e11f89c(current) vs 74b2b48 main#318(baseline) Bundle metrics
|
| Current #322 |
Baseline #318 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
3 |
3 |
|
17 |
17 |
|
5 |
5 |
|
8.59% |
8.59% |
|
0 |
0 |
|
0 |
0 |
Bundle analysis report Branch colinaaa:docs/rspeedy-default-va... Project dashboard
Generated by RelativeCI Documentation Report issue
React Example#7204 Bundle Size — 236.82KiB (0%).e11f89c(current) vs 74b2b48 main#7200(baseline) Bundle metrics
|
| Current #7204 |
Baseline #7200 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
4 |
4 |
|
179 |
179 |
|
70 |
70 |
|
46.1% |
46.1% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #7204 |
Baseline #7200 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
91.06KiB |
91.06KiB |
Bundle analysis report Branch colinaaa:docs/rspeedy-default-va... Project dashboard
Generated by RelativeCI Documentation Report issue
Web Explorer#8778 Bundle Size — 743.45KiB (0%).e11f89c(current) vs 74b2b48 main#8774(baseline) Bundle metrics
Bundle size by type
|
| Current #8778 |
Baseline #8774 |
|
|---|---|---|
398.15KiB |
398.15KiB |
|
343.13KiB |
343.13KiB |
|
2.16KiB |
2.16KiB |
Bundle analysis report Branch colinaaa:docs/rspeedy-default-va... Project dashboard
Generated by RelativeCI Documentation Report issue
React MTF Example#337 Bundle Size — 206.11KiB (0%).e11f89c(current) vs 74b2b48 main#333(baseline) Bundle metrics
|
| Current #337 |
Baseline #333 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
3 |
3 |
|
173 |
173 |
|
67 |
67 |
|
45.76% |
45.76% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #337 |
Baseline #333 |
|
|---|---|---|
111.23KiB |
111.23KiB |
|
94.88KiB |
94.88KiB |
Bundle analysis report Branch colinaaa:docs/rspeedy-default-va... Project dashboard
Generated by RelativeCI Documentation Report issue
Summary
@defaultValueannotations acrosspackages/rspeedy/core/src/config/**and migrate default-related@remarksinto the generated API reference.github/rspeedy-config-docs.instructions.mdto keep future config docs aligned with this patternVerification
pnpm installpnpm build --clean && pnpm buildpnpm turbo api-extractor --filter=@lynx-js/rspeedy -- --localcd website && npm run docswebsite/docs/en/api/rspeedy.config.mode.md,website/docs/en/api/rspeedy.output.inlinescripts.md, andwebsite/docs/en/api/rspeedy.configparams.command.mdinclude## Default ValueSummary by CodeRabbit