You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: report errors and warnings as nostics diagnostics - #838
Review was skipped as selected files did not have any reviewable changes.
Files ignored due to path filters: 1
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 7c02ef60-2ac2-44c2-86b7-f4e81215a035
Commits
Reviewing files that changed from the base of the PR and between 78527c8 and 7f2af0d.
Files ignored due to path filters: 1
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The change adds structured error and warning diagnostics with codes, formatting, source locations, fixes, and documentation links. Build, package, tsdown, CLI, and legacy configuration paths now use diagnostics in place of many inline messages. The CLI reports recognised diagnostics and exits with status 1. Tests now check diagnostic codes, warning behaviour, and terminal formatting. The contributor guide and upgrade guide describe diagnostic codes and links.
Diagnostics now go through a process-wide logger. When one tsdown run has several builder configs, a warning from one config can follow another config's warning policy and change pass or fail behaviour. Single-config builds are unaffected, so this is a bounded follow-up.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title says the PR refactors error and warning reporting to use nostics diagnostics. The changeset does this: it adds src/diagnostics.ts, replaces Error and logger.warn calls with errors.* and warn…
Description check
The description states that the PR uses nostics to print useful diagnostics instead of plain logging. This matches the changeset, which adds nostics to package.json and replaces plain logging with dia…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title says the PR refactors error and warning reporting to use nostics diagnostics. The changeset does this: it adds src/diagnostics.ts, replaces Error and logger.warn calls with errors.* and warnings.* diagnostic factories across build, commands, legacy and tsdown code, and adds the nostics dependency in package.json. The title names the main change.
Full details: Description check
Explanation
The description states that the PR uses nostics to print useful diagnostics instead of plain logging. This matches the changeset, which adds nostics to package.json and replaces plain logging with diagnostic reporting. The description is brief and omits the linked issue, but it is related to the changes, so the lenient check passes.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Fix failing CI checks
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 4b3cd677-250e-49ea-b2be-397273e3ab95
Commits
Reviewing files that changed from the base of the PR and between bb00724 and 78527c8.
Files ignored due to path filters: 1
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing: 25
CONTRIBUTING.md
docs/upgrade-v2.md
package.json
src/build/build.ts
src/build/guide.ts
src/build/loader.ts
src/build/module-declarations.ts
src/build/options.ts
src/build/package.ts
src/cli.ts
src/commands/_shared.ts
src/commands/build.ts
src/commands/config-file.ts
src/diagnostics.ts
src/legacy/build-config.ts
src/legacy/package-paths.ts
src/tsdown/build.ts
src/tsdown/plugin.ts
src/tsdown/setup.ts
test/builder.spec.ts
test/cli.spec.ts
test/legacy.spec.ts
test/pack-env.ts
test/unit.spec.ts
test/utils.ts
Files with no reviewable changes: 1
src/build/guide.ts
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked issue
📚 Description
this uses nostics for printing useful diagnostics instead of plain logging