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

fix: silence magic-string warnings and update usage #571

Merged
merged 1 commit into from
Nov 27, 2016

Commits on Nov 27, 2016

  1. fix: silence magic-string warnings and update usage

    magic-string 0.17.0 deprecated insertLeft and insertRight in favor of more
    precise prepend/append names. See this issue for a discussion on that:
    Rich-Harris/magic-string#109
    
    To silence that warning, this commit moves the code to the new API, which was
    pretty easy because there are only a few call sites.
    
    I also cleaned up that part of `NodePatcher`, which didn't make a lot of sense.
    Now, instead of `NodePatcher.insert` calling `NodePatcher.insertRight` calling
    `MagicString.insertLeft` and `NodePatcher.insertLeft` being unused, we just
    have `NodePatcher.insert` calling `MagicString.appendLeft`. At least for now, I
    think it's best to always use the same insert method so that inserts go in
    order.
    
    I also changed insertRight to appendRight in one case because it probably makes
    more sense anyway and the tests pass.
    alangpierce committed Nov 27, 2016
    Configuration menu
    Copy the full SHA
    1ac6a66 View commit details
    Browse the repository at this point in the history