发布

  • fix(release): ensure multilines in breaking changes are rendered by changelog renderer (#33070)

    frostbyte_neo 发布于 2025-10-15 17:21:00 +00:00

    Current Behavior

    When rendering changelogs for releases, breaking changes with multi-line
    explanations
    are not formatted correctly:

    1. Only the first line of a breaking change explanation is captured and
      rendered
    2. PR references (like #33014) are missing from breaking change
      entries, making it
      difficult to trace back to the original PR
    3. Multi-paragraph breaking changes lose their formatting and structure

    For example, a breaking change with this format:
    BREAKING CHANGE: The --legacy-peer-deps behavior is no longer forced.
    If you need it, configure your package manager to enforce it.

    Would only render the first line, and without the PR reference.

    Expected Behavior

    The changelog renderer should:

    1. Capture and render all lines of a breaking change explanation, not
      just the first
      line
    2. Include PR/commit references in the breaking change section (e.g.,
      ([#33014](url)))
    3. Properly indent multi-line and multi-paragraph breaking changes for
      better
      readability
    4. Maintain consistent formatting between the feature/fix entry and its
      corresponding
      breaking change entry

    Example of correct output:

    ### ⚠️  Breaking Changes
    
    - **misc:** The `--legacy-peer-deps` behavior is no longer forced.
    ([#33014](url))
    
      If you need it, configure your package manager to enforce it.
    

    (cherry picked from commit 762685ce88)

    下载附件