Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor trailing comment adjustment #10380

Merged
merged 7 commits into from Sep 3, 2019

Commits on Aug 31, 2019

  1. Refactor trailing comment adjustment

    Following up from babel#10369
    
    - Unify the logic for adjusting trailing comments into a separate
      function
    - Use it for all three cases, which fixes a bug for ObjectExpressions
      and CallExpressions
    - Update tests to check for the fixed bug
    Shrey Banga committed Aug 31, 2019
    Copy the full SHA
    cdf6dc9 View commit details
    Browse the repository at this point in the history
  2. Fix tests

    - Only modify trailingComments if necessary
    - Update snapshots of a couple of affected tests
    Shrey Banga committed Aug 31, 2019
    Copy the full SHA
    f67dcbb View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    d50f9d6 View commit details
    Browse the repository at this point in the history
  4. Handle ArrayPattern

    Shrey Banga committed Aug 31, 2019
    Copy the full SHA
    5696c94 View commit details
    Browse the repository at this point in the history
  5. Handle ObjectPattern

    Shrey Banga committed Aug 31, 2019
    Copy the full SHA
    10bea52 View commit details
    Browse the repository at this point in the history
  6. Handle import and export declarations

    These have to be handled a bit differently, because the  node is visited after the  and before the declaration. So we intercept when we are going from the last specifier to the source node.
    Shrey Banga committed Aug 31, 2019
    Copy the full SHA
    7819484 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2019

  1. Remove unnecessary check

    Shrey Banga committed Sep 2, 2019
    Copy the full SHA
    816b1e9 View commit details
    Browse the repository at this point in the history