Skip to content

Conversation

@serhalp
Copy link
Member

@serhalp serhalp commented Jun 3, 2025

Summary

  • hook into the vite logger when using the vite plugin
  • fix weird unicode issue
  • use terminal colour lib with a smaller footprint
  • remove an extraneous logger util
  • add a basic message to inform the user that the Netlify Vite plugin loaded
  • when using middleware mode, add a message informing the user that this is loaded and listing enables features
  • add test coverage for logs
  • consistently highlight commands we suggest running with the same style as in Netlify CLI
    • as we do this in more than one package, I moved some stuff to @netlify/dev-utils

Before

Unlinked site

Screenshot 2025-06-03 at 09 41 18

Linked site

You can't even tell if the Netlify plugin is running 😢

Screenshot 2025-06-03 at 09 41 45

After

Unlinked site

Screenshot 2025-06-03 at 09 42 15

Linked site

Screenshot 2025-06-03 at 09 43 51

middleware: false

Screenshot 2025-06-03 at 09 44 23

- hook into the vite logger when using the vite plugin
- fix weird unicode issue
- use terminal colour lib with a smaller footprint
- remove an extraneous logger util
- add a basic message to inform the user that the Netlify Vite plugin loaded
- when using middleware mode, add a message informing the user that this is loaded
  and listing enables features
- add test coverage for logs
@serhalp serhalp force-pushed the serhalp/frb-1839-review-and-polish-logging-behaviour branch from 383dd96 to 05bfa6e Compare June 3, 2025 12:51
@serhalp serhalp force-pushed the serhalp/frb-1839-review-and-polish-logging-behaviour branch from 65fab98 to c77505d Compare June 3, 2025 13:27
@serhalp serhalp marked this pull request as ready for review June 3, 2025 13:44
@serhalp serhalp requested review from a team as code owners June 3, 2025 13:44
},
"dependencies": {
"@netlify/dev": "4.1.0",
"@netlify/dev-utils": "^3.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! I did some of these fixes in #261 as well

await Promise.allSettled(this.#cleanupJobs.map((task) => task()))
}

public getEnabledFeatures(): string[] {
Copy link
Contributor

@mrstork mrstork Jun 3, 2025

Choose a reason for hiding this comment

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

Would you be able to share a screenshot example of this output?

Copy link
Member Author

Choose a reason for hiding this comment

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

🤔 it's all in the PR description already!

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, missed that sorry

mrstork
mrstork previously approved these changes Jun 3, 2025
@serhalp serhalp removed the request for review from a team June 3, 2025 14:26
@serhalp serhalp requested a review from mrstork June 3, 2025 14:28
@serhalp serhalp enabled auto-merge (squash) June 3, 2025 14:43
@serhalp serhalp merged commit de9b46c into main Jun 3, 2025
10 checks passed
@serhalp serhalp deleted the serhalp/frb-1839-review-and-polish-logging-behaviour branch June 3, 2025 14:49
@token-generator-app token-generator-app bot mentioned this pull request Jun 3, 2025
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

Successfully merging this pull request may close these issues.

3 participants