Skip to content

fix: compatibility with prettier 2.0 - #1359

Merged
czosel merged 1 commit into
prettier:masterfrom
czosel:prettier-2.0
Mar 28, 2020
Merged

fix: compatibility with prettier 2.0#1359
czosel merged 1 commit into
prettier:masterfrom
czosel:prettier-2.0

Conversation

@czosel

@czoselczosel commented Mar 25, 2020

Copy link
Copy Markdown
Collaborator

Prettier 2.0 brought some breaking changes with it (see here). This implements the new API in a backwards-compatible way. CI currently doesn't proof the fact that it still works with 1.x, and since the breaking changes are few and nicely encapsulated, I'd keep CI as is.

Fixes#1352

@czosel
czoselforce-pushed the prettier-2.0 branch 2 times, most recently from 30633c8 to a43dd88CompareMarch 25, 2020 19:21
Comment threadsrc/util.js
node,
lookupIfPrettier2(options, "locEnd")
);
}

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the actual code changes

(probably should've done a separate commit for the formatting changes 🙈)

@alexander-akaitalexander-akait left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid it is breaking change

@czosel

Copy link
Copy Markdown
CollaboratorAuthor

You can try checking out this branch, and after run yarn add prettier@1.19.1 and then yarn test - the only issue you should see are linting errors.

@alexander-akait

Copy link
Copy Markdown
Member

Great, go ahead

@czosel
czosel merged commit 9917045 into prettier:masterMar 28, 2020
@czosel
czosel deleted the prettier-2.0 branch March 28, 2020 17:15
@matzeeable

Copy link
Copy Markdown

@czosel Awesome! When will this be published as new version to https://www.npmjs.com/package/@prettier/plugin-php ? 🙂

@czosel

czosel commented Mar 28, 2020

Copy link
Copy Markdown
CollaboratorAuthor

@matzeeable I hope we can make a release in the next few days, all that's missing are some reviews to open pull requests 🙂

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unable to use plugin with Prettier 2.0 (TypeError: locEnd is not a function)

3 participants

@czosel@alexander-akait@matzeeable