Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: prettier/prettier
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.14.1
Choose a base ref
...
head repository: prettier/prettier
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.15.0
Choose a head ref
  • 17 commits
  • 132 files changed
  • 8 contributors

Commits on Jan 31, 2017

  1. Configuration menu
    Copy the full SHA
    57c8c99 View commit details
    Browse the repository at this point in the history
  2. Fix closing call expression commented out (#530)

    * [Failing test] Comments in call expression
    
    ```js
    foo(
     // Hi
    )
    ```
    
    prints
    
    ```js
    foo
    // Hi();
    ```
    
    * add one more failing case
    
    * Don't group last args that has comments attached
    
    * Update snapshot
    amasad authored and vjeux committed Jan 31, 2017
    Configuration menu
    Copy the full SHA
    045a351 View commit details
    Browse the repository at this point in the history
  3. Update bracketSpacing comment to say it's about {} (#529)

    Before e13bb7d `bracketSpacing` used to be about both `[]` and `{}` but now it's only about `{}`.
    amasad authored and vjeux committed Jan 31, 2017
    Configuration menu
    Copy the full SHA
    3155acb View commit details
    Browse the repository at this point in the history
  4. Add 0.14.1 to CHANGELOG (#525)

    hawkrives authored and vjeux committed Jan 31, 2017
    Configuration menu
    Copy the full SHA
    ea59718 View commit details
    Browse the repository at this point in the history
  5. Print \x and \u escapes in strings and regexes lowercase (#522)

    * Print \x and \u escapes in strings and regexes lowercase
    
    Theoretically, we would want to do this for escapes int identifiers as
    well. However, neither flow nor babylon preserves escapes in
    identifiers. For example, `\u0061.\u{0061}` cannot be distinguished from
    `a.a`. Nobody uses such escapes in real code anyway. It could also be
    considered a feature that such escapes are converted to real unicode
    characters.
    
    * Update snapshots
    
    * Normalize escapes in template literals
    
    * Update snapshots
    lydell authored and vjeux committed Jan 31, 2017
    Configuration menu
    Copy the full SHA
    7148184 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f5291e2 View commit details
    Browse the repository at this point in the history
  7. Preserve next line with trailing comment (#535)

    It turns that our hasNextLine logic needs to be tuned to skip all the trailing comments. The code is not pretty but it does the job. It looks like it fixes a bunch of things in the test cases :)
    
    I made sure that nested inline comments are NOT valid JavaScript
    
    ```js
    /* /* a */ */
    Uncaught SyntaxError: Unexpected token *
    ```
    
    so it is okay to do a dumb search for */ when you are in a comment
    vjeux authored and jlongster committed Jan 31, 2017
    Configuration menu
    Copy the full SHA
    8bc3c61 View commit details
    Browse the repository at this point in the history
  8. Break nested calls (#517)

    If there's a break inside of a call, we want to force it in the group, otherwise it may get the indentation wrong. See the real-world use case in #513
    
    Fixes #513
    vjeux authored and jlongster committed Jan 31, 2017
    Configuration menu
    Copy the full SHA
    d3fa519 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    410e75d View commit details
    Browse the repository at this point in the history
  10. Reimplement MemberExpression printing (#469)

    There are currently three issues related to suboptimal rendering of MemberExpression chains. The previous implementation was trying to flatten only a single group at the same time, but it didn't work well because we didn't have the full context to be able to make decisions.
    
    In this implementation, I'm going through the entire chain at the same time and group it into logical units and make decisions based on this. It solves all the problems I can think of and if we need to tweak it in the future, it should be easy.
    
    Fixes #268
    Fixes #212
    Fixes #21
    vjeux authored Jan 31, 2017
    Configuration menu
    Copy the full SHA
    d0bc299 View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2017

  1. Remove spurious test.js

    vjeux committed Feb 1, 2017
    Configuration menu
    Copy the full SHA
    7587b5a View commit details
    Browse the repository at this point in the history
  2. Fix small typo on Jetbrains section (#552)

    Lucas Bento authored and vjeux committed Feb 1, 2017
    Configuration menu
    Copy the full SHA
    6c7837b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    be8f13d View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2017

  1. Make comments between if & else to look good (#544)

    While trying to figure out how to handle both MemberExpression comments and IfStatement comments, I ended up doing this one as well... Sorry @yamafaktory :(
    
    The logic is a bit annoying but works.
    
    Fixes #487
    vjeux authored Feb 2, 2017
    Configuration menu
    Copy the full SHA
    e56fd38 View commit details
    Browse the repository at this point in the history
  2. Whitelist UnaryExpression for parentless objects (#545)

    It seems like unary are unlikely to need parenthesis
    
    Fixes #542
    vjeux authored Feb 2, 2017
    Configuration menu
    Copy the full SHA
    b6c9e42 View commit details
    Browse the repository at this point in the history
  3. Make comments inside of MemberExpression look good (#556)

    This is using the same technique as #544 and will conflict with it when we try to merge both :)
    
    Fixes #200
    vjeux authored Feb 2, 2017
    Configuration menu
    Copy the full SHA
    5042168 View commit details
    Browse the repository at this point in the history
  4. 0.15.0

    vjeux committed Feb 2, 2017
    Configuration menu
    Copy the full SHA
    b040be2 View commit details
    Browse the repository at this point in the history
Loading