Giter Club home page Giter Club logo

Comments (16)

czosel avatar czosel commented on June 16, 2024 6

Prettier 3 support landed in v0.20.0 πŸ₯³

from plugin-php.

czosel avatar czosel commented on June 16, 2024 5

@erropix Ill take a look at #2197 and make a new release next week, currently on vacation 🏝️

from plugin-php.

kumardeepakme avatar kumardeepakme commented on June 16, 2024 4

Kindly fix this ASAP πŸ™

from plugin-php.

thewebsitetherapist avatar thewebsitetherapist commented on June 16, 2024 2

Working with prettier 3 would be amazing

from plugin-php.

rafipiccolo avatar rafipiccolo commented on June 16, 2024 2

with node v20.5.0

i forced install of prettier 3 and this plugin with :
npm install -D prettier@latest
npm install -D --force @prettier/plugin-php

i have type: module in package.json

when running prettier it said
[error] No parser could be inferred for file "src/Controller/ControlController.php"

so i added the following in .prettierrc.js
{
...
plugins: ["@prettier/plugin-php"],
}

and now it says :
[error] src/Controller/ControlController.php: TypeError: Invalid value used as weak map key
[error] at WeakMap.set ()
[error] at getSortedChildNodes (file://node_modules/prettier/index.mjs:17581:19)
[error] at file://node_modules/prettier/index.mjs:17576:52
[error] at Array.flatMap ()
[error] at getSortedChildNodes (file://node_modules/prettier/index.mjs:17575:6)
[error] at decorateComment (file://node_modules/prettier/index.mjs:17588:22)
[error] at decorateComment (file://node_modules/prettier/index.mjs:17599:14)
[error] at file://node_modules/prettier/index.mjs:17655:8
[error] at Array.map ()
[error] at attachComments (file://node_modules/prettier/index.mjs:17654:38)

from plugin-php.

czosel avatar czosel commented on June 16, 2024 1

Basic prettier 3 support landed in #2200 (thanks again @fisker!). Only thing that is blocking a release now are some failing tests in standalone mode (RUN_STANDALONE_TESTS=true yarn test). I can try to investigate further tomorrow, but I'll also ping @loilo πŸ˜‰

from plugin-php.

erropix avatar erropix commented on June 16, 2024 1

Thanks you @czosel πŸ‘

from plugin-php.

erropix avatar erropix commented on June 16, 2024

@czosel, Do you have any information on when this plugin will be supporting prettier@3?

from plugin-php.

erropix avatar erropix commented on June 16, 2024

@czosel thanks for the reply, that's good news πŸ˜„

from plugin-php.

joemaller avatar joemaller commented on June 16, 2024

Prettier's plugin migration guidance: How to migrate my plugin to support Prettier v3?

More from the Prettier v3 changelog:

In order to support async parsers for embedded languages, we had to introduce a breaking change to the plugin API. Namely, the embed method of a printer has now to match a completely new signature, incompatible with previous versions. If you're a plugin author and your plugins don't define embed, you have nothing to worry about, otherwise see the docs for details.

from plugin-php.

czosel avatar czosel commented on June 16, 2024

Thanks for posting the reference @joemaller! AFAIK we’re currently not implementing embed. There might be a few tweaks we should do though - PRs are more than welcome!

from plugin-php.

czosel avatar czosel commented on June 16, 2024

I gave the upgrade a try in #2200, but got stuck in the process. Turns out that several changes are needed to make this plugin compatible with prettier v3. Since I'm short on time, I'd be happy for any help with completing the upgrade.

from plugin-php.

fisker avatar fisker commented on June 16, 2024

Do we have plan to migrate to ESM?

from plugin-php.

czosel avatar czosel commented on June 16, 2024

Definitely! Thanks for all your contributions @fisker, I’ll review and merge them tonight (CET)!

from plugin-php.

loilo avatar loilo commented on June 16, 2024

Updated playground to Prettier 3 and Plugin version v0.20. πŸŽ‰

from plugin-php.

czosel avatar czosel commented on June 16, 2024

Nice, thanks @loilo! πŸ’―

from plugin-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.