-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
v3.0.0 #458
v3.0.0 #458
Conversation
@lehni you said you have a project? Could you please checkout the branch and run Please also check TypeScript support for the ![]() |
af78d93
to
16b7425
Compare
And here are the rendered changelogs https://github.com/prettier/plugin-pug/blob/v3/CHANGELOG.md#300 |
@Shinigami92 I'll check tomorrow, thanks. You probably want to still remove all the |
https://github.com/prettier/plugin-pug#usage should add |
package.json
Outdated
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line can be removed.
No, I like the info about when a feature was added (without needing to search the git history) |
Is this info not sufficient enough? |
Missed that. |
Auto-loading worked for me with v2, and it not working anymore def caught me a bit off guard at first when testing v3. |
@Shinigami92 I did a link test now, and I'm getting this error here:
When I look at the import statement, I see that it's missing the file extension: import { logger } from './logger'; Related: https://nodejs.org/api/esm.html#mandatory-file-extensions |
This might be our solution too: vitejs/vite#11552 (comment) |
|
@Shinigami92 I got it running like this: Now trying your version |
@Shinigami92 great news, everything appears to be working for me now! Even VSCode integration and format on save works as before, it's all a breeze now :) I also tested the auto-completion in the ![]() |
@Shinigami92 I approved it now. Not sure if 3b2ce18 wouldn't give you the better dev experience though if there are bugs / error logs |
I personally don't like having
We have enabled source maps, so the files are pointing back to the |
Then merge away, I'd say 🎉 |
Will do when I'm back home 😬 But one last thing, do I need to add the src folder to the exports in package.json? Because I don't the see pug* suggestions the the tooltip in prettier config 🤔 |
@Shinigami92 my bad, the pug attributes are indeed missing! Let's test this, I'm not sure how this work and what needs to be done to support it. Personally I don't use TS and am not all that excited about auto-completion, so I never really notice when it's not there :) |
@Shinigami92 but come to think of it, with So this link here resolves, when clicking through it, i get to the editor for the right file: // @ts-check
/// <reference types="@prettier/plugin-pug/src/prettier" /> ![]() But it does show an error there, and the auto-completion doesn't works for pug keywords, only for the standard prettier ones. The error on the type file: ![]() |
@lehni Could you check a last time if the auto-suggestions now works in the prettierrc?
|
@Shinigami92 I've just tested it, and sadly nothing has changed. I think it's probably easier if I share a test-project for you to replicate this using |
No, thx, I have pnpm, not yarn Okay, I will set me up my own playground and try a bit 🤔 |
@Shinigami92 the two are not mutually exclusive :) You can have yarn and npm and pnpm, all coexist in a friendly way. |
![]() Uhm... does yarn have a bug? |
@lehni I think I will then just make a release and if someone reports a bug with that, I can handle it later on |
I just updated our code-base to the released v3, and it all works, auto-completion included. Thank you @Shinigami92 ! |
@Shinigami92 I'm wondering about this: With CJS support dropped, why does the |
Uhm... you could be right, it doesn't need to be cjs anymore |
I just tested with // @ts-check
/// <reference types="@prettier/plugin-pug/src/prettier" />
/**
* @type {import('prettier').Options}
*/
export default {
plugins: ['@prettier/plugin-pug'],
…
} |
closes #411
closes #456