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

The upgrade path of dprint-plugin-prettier from 0.26.6 to 0.27.0 requires both dprint 0.39.1 and 0.40.0 #56

Closed
kachick opened this issue Jul 31, 2023 · 3 comments

Comments

@kachick
Copy link
Sponsor

kachick commented Jul 31, 2023

In dprint 0.39.1 and config with prettier-0.26.6, dprint config update updates the config, but dprint check and dprint fmt fails after updated

[dprint-plugin-prettier]
Shutting down due to error: failed to fill whole buffer
Error resolving plugin https://plugins.dprint.dev/prettier-0.27.0.json: Failed plugin schema verification. This may indicate you are using an old version of the dprint CLI or plugin and should upgrade.: The plugin schema version was 5, but expected 4.

In dprint 0.40.0 and config with prettier-0.26.6, dprint config update failed with handling old plugins messages

[dprint-plugin-prettier]
Shutting down due to error: Error reading message from stdin.
Shutting down due to error: Error reading message from stdin.
Error resolving plugin https://plugins.dprint.dev/prettier-0.26.6.json: Failed plugin schema verification. This may indicate you are using an old version of the dprint CLI or plugin and should upgrade.: The plugin schema version was 4, but expected 5.

In this case, I should first update the config with dprint 0.39.1 and then immediately upgrade dprint to 0.40.0. Is this an intended migration flow?

kachick added a commit to mobu-of-the-world/mobu that referenced this issue Jul 31, 2023
renovate bot pushed a commit to mobu-of-the-world/mobu that referenced this issue Jul 31, 2023
kachick added a commit to kachick/action-update-dprint-plugins that referenced this issue Jul 31, 2023
@kachick
Copy link
Sponsor Author

kachick commented Jul 31, 2023

I'll replace manually for these versions. 🙇‍♂️

@kachick kachick closed this as completed Jul 31, 2023
@dsherret
Copy link
Member

dsherret commented Jul 31, 2023

Yes, sorry you need to manually update the urls in the configuration file as it was too much work to make a smooth upgrade path (and dprint is still 0.x).

See here for details: dprint/dprint#726 (comment)

kachick added a commit to mise-plugins/asdf-cargo-make that referenced this issue Jul 31, 2023
@kachick
Copy link
Sponsor Author

kachick commented Jul 31, 2023

Sure! Thank you for sharing it with me, dprint project helps me a lot 🙏

kachick added a commit to kachick/anylang-template that referenced this issue Aug 5, 2023
```bash
rtx exec dprint@0.39.1 -- dprint config update --yes
rtx exec dprint@0.40.0 -- dprint check
```

dprint/dprint-plugin-prettier#56
kachick added a commit to kachick/dotfiles that referenced this issue Aug 6, 2023
kachick added a commit to kachick/nixpkgs-url that referenced this issue Aug 6, 2023
```bash
rtx exec dprint@0.39.1 -- dprint config update --yes
rtx exec dprint@0.40.0 -- dprint check
```

dprint/dprint-plugin-prettier#56
kachick added a commit to mobu-of-the-world/emobu that referenced this issue Aug 6, 2023
```bash
rtx exec dprint@0.39.1 -- dprint config update --yes
rtx exec dprint@0.40.0 -- dprint check
```

dprint/dprint-plugin-prettier#56
kachick added a commit to kachick/dotfiles that referenced this issue Aug 6, 2023
```bash
rtx exec dprint@0.39.1 -- dprint config update --yes
rtx exec dprint@0.40.0 -- dprint check
```

dprint/dprint-plugin-prettier#56
kachick added a commit to kachick/renovate-config-dprint that referenced this issue Aug 8, 2023
`rtx exec dprint@0.39.1 -- dprint config update --yes && rtx exec dprint@0.40.0 -- dprint check`

dprint/dprint-plugin-prettier#56
kachick added a commit to kachick/elm-dependency-submission that referenced this issue Oct 5, 2023
`rtx exec dprint@0.39.1 -- dprint config update --yes && rtx exec dprint@0.40.2 -- dprint fmt`

dprint/dprint-plugin-prettier#56

And removed outdated includes specifier
kachick added a commit to kachick/elm-dependency-submission that referenced this issue Oct 5, 2023
…gs (#527)

* Prefer Nix flake and bump nixpkgs

* Bump dprint.json with old dprint

`rtx exec dprint@0.39.1 -- dprint config update --yes && rtx exec dprint@0.40.2 -- dprint fmt`

dprint/dprint-plugin-prettier#56

And removed outdated includes specifier

* Add workaround for TypeScript errors

* Remove unused deno for now (I will add in another PR

* `npm run package`

* Allow LGPL action

* Cloning submodule will done by checkout action

https://stackoverflow.com/a/70882149/1212807
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants