Skip to content

fix(isolated-declarations): lost leading comments of export default function/class/interface#10990

Merged
graphite-app[bot] merged 1 commit intomainfrom
05-13-fix_isolated-declarations_lost_leading_comments_of_export_default_function_class_interface
May 13, 2025
Merged

fix(isolated-declarations): lost leading comments of export default function/class/interface#10990
graphite-app[bot] merged 1 commit intomainfrom
05-13-fix_isolated-declarations_lost_leading_comments_of_export_default_function_class_interface

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented May 13, 2025

close: #10989

Copy link
Member Author

Dunqing commented May 13, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added A-isolated-declarations Isolated Declarations C-bug Category - Bug labels May 13, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented May 13, 2025

CodSpeed Instrumentation Performance Report

Merging #10990 will not alter performance

Comparing 05-13-fix_isolated-declarations_lost_leading_comments_of_export_default_function_class_interface (9a4b135) with main (27a21a7)

Summary

✅ 36 untouched benchmarks

@Dunqing Dunqing marked this pull request as ready for review May 13, 2025 01:07
Copilot AI review requested due to automatic review settings May 13, 2025 01:07
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 fixes the issue where leading comments for export default functions, classes, or interfaces were lost.

  • Updated test snapshots to include the expected leading comment.
  • Adjusted the source code in the fixture and module to correctly retain and attach leading comments without affecting functionality.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
crates/oxc_isolated_declarations/tests/snapshots/export-default.snap Snapshot updated with the expected leading comment for the class.
crates/oxc_isolated_declarations/tests/fixtures/export-default.ts Moved the leading comment to precede the class definition and applied minor formatting improvements.
crates/oxc_isolated_declarations/src/module.rs Refactored comment handling logic to preserve comments based on the presence of a variable declaration.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label May 13, 2025
Copy link
Member

Boshen commented May 13, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 05-13-fix_isolated-declarations_lost_leading_comments_of_export_default_function_class_interface branch from 61ec046 to 9a4b135 Compare May 13, 2025 02:44
@graphite-app graphite-app bot merged commit 9a4b135 into main May 13, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 05-13-fix_isolated-declarations_lost_leading_comments_of_export_default_function_class_interface branch May 13, 2025 02:51
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-isolated-declarations Isolated Declarations C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

transformer: JSDoc comment is missing for default export when using isolatedDeclaration

3 participants