Skip to content

chore: deprecate output.legalComments#8254

Merged
IWANABETHATGUY merged 1 commit intographite-base/8254from
02-09-chore_deprecated_output.legalcomments_
Feb 10, 2026
Merged

chore: deprecate output.legalComments#8254
IWANABETHATGUY merged 1 commit intographite-base/8254from
02-09-chore_deprecated_output.legalcomments_

Conversation

@IWANABETHATGUY
Copy link
Member

No description provided.

Copy link
Member Author

IWANABETHATGUY commented Feb 9, 2026


How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@IWANABETHATGUY IWANABETHATGUY changed the title chore: deprecated output.legalComments" chore: deprecate output.legalComments Feb 9, 2026
@IWANABETHATGUY IWANABETHATGUY changed the base branch from 02-07-feat_5849 to graphite-base/8254 February 9, 2026 08:58
@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review February 10, 2026 04:46
@IWANABETHATGUY IWANABETHATGUY requested a review from hyf0 February 10, 2026 04:46
Copy link
Member

@hyf0 hyf0 left a comment

Choose a reason for hiding this comment

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

Ensure if both are set, new one should take precdent. If each of it is set, it should work also but with a deprecation warning.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR deprecates the output.legalComments option in favor of the newer output.comments.legal configuration, aligning the public JS/TS API with the newer comment-control model.

Changes:

  • Emit a runtime deprecation warning when output.legalComments is used.
  • Update OutputOptions JSDoc to mark legalComments as deprecated and point users to comments.legal.
  • Mark NormalizedOutputOptions.legalComments as deprecated in its JSDoc.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/rolldown/src/utils/bindingify-output-options.ts Adds a warning when deprecated legalComments is present.
packages/rolldown/src/options/output-options.ts Updates legalComments documentation to reflect deprecation and migration path.
packages/rolldown/src/options/normalized-output-options.ts Marks normalized legalComments as deprecated in docs.

Comment on lines +603 to 606
* Control legal comments in the output.
*
* - `none`: no comments
* - `inline`: preserve comments that contain `@license`, `@preserve` or starts with `//!` `/*!`
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

The JSDoc for legalComments now says it controls legal comments, but the bullet none: no comments reads like it disables all comments. Consider rewording to something like “no legal comments”, and clarify the inline bullet (e.g., “starts with //! or /*!”) to avoid ambiguity.

Suggested change
* Control legal comments in the output.
*
* - `none`: no comments
* - `inline`: preserve comments that contain `@license`, `@preserve` or starts with `//!` `/*!`
* Control which legal comments are preserved in the output.
*
* - `none`: no legal comments
* - `inline`: preserve legal comments that contain `@license` or `@preserve`, or that start with `//!` or `/*!`

Copilot uses AI. Check for mistakes.
@IWANABETHATGUY IWANABETHATGUY merged commit f715d8b into graphite-base/8254 Feb 10, 2026
37 checks passed
@IWANABETHATGUY IWANABETHATGUY deleted the 02-09-chore_deprecated_output.legalcomments_ branch February 10, 2026 08:44
graphite-app bot pushed a commit that referenced this pull request Feb 25, 2026
Applies #8254, which was accidentally dropped during a merge
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.

3 participants