Skip to content

Conversation

@florian-lefebvre
Copy link
Member

@florian-lefebvre florian-lefebvre commented Oct 23, 2025

Changes

  • Refactors the astro info CLI command
  • Also updates how astro info is retrieved in dev for the dev toolbar
  • It turns out this command is pretty complex and required many abstractions to be able to test things independently
  • Half of the added lines must be related to tests

Testing

  • Tested manually on ubuntu
  • Unit tests added
  • PR preview (confirmation from Armand)

Docs

@florian-lefebvre florian-lefebvre self-assigned this Oct 23, 2025
@changeset-bot
Copy link

changeset-bot bot commented Oct 23, 2025

🦋 Changeset detected

Latest commit: 9dc1805

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Oct 23, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 23, 2025

CodSpeed Performance Report

Merging #14609 will not alter performance

Comparing refactor/cli-info (9dc1805) with main (8cf3f05)1

Summary

✅ 6 untouched

Footnotes

  1. No successful run was found on main (ad3265d) during the generation of this report, so 8cf3f05 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@github-actions github-actions bot added the pkg: integration Related to any renderer integration (scope) label Oct 31, 2025
@florian-lefebvre florian-lefebvre added the pr preview Apply this label to a PR to generate a preview release label Nov 18, 2025
@github-actions github-actions bot removed the pr preview Apply this label to a PR to generate a preview release label Nov 18, 2025
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 18, 2025

npm i https://pkg.pr.new/astro@14609

commit: ee5332a

@ArmandPhilippot
Copy link
Member

Everything seems to work fine on my side (EndeavourOS with XFCE), nice job! Did you want us to test specific scenarios? I only checked using a minimal project.

@florian-lefebvre
Copy link
Member Author

No it's fine thanks!

@florian-lefebvre florian-lefebvre marked this pull request as ready for review November 18, 2025 13:17
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Left some comments that I think should be addressed:

  • error handling
  • docs

@@ -0,0 +1 @@
export type DebugInfo = Array<[string, string | Array<string>]>;
Copy link
Member

Choose a reason for hiding this comment

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

Should this go to info/definitions.ts?

Copy link
Member Author

@florian-lefebvre florian-lefebvre Nov 18, 2025

Choose a reason for hiding this comment

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

I don't think so. Currently the structure I've been following is:

  • domain/filename.ts: a specific data entity
  • definitions.ts: infrastructure definitions
  • infra/filename.ts: infrastructure implementation
  • core/filename.ts: one function holding some core logic

Copy link
Member

@ematipico ematipico Nov 19, 2025

Choose a reason for hiding this comment

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

This isn't documented anywhere:

  • PR
  • Contribution guidelines
  • comments

You raised a similar PR for fonts now, and I would expect the same infrastructure. Should address this comment first?

i.e. you explained to me the folder structure, but I still don't understand why debug-info.ts must be here... honestly, it's all foggy. Maybe let's raise a PR that explains this folder/business logic structure.

Not a blocker, but something you should consider

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, I'll make a follow up PR with guidelines


export function createNpmPackageManager({ commandExecutor }: Options): PackageManager {
return {
getName() {
Copy link
Member

Choose a reason for hiding this comment

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

nit (to apply to all interfaces)

Suggested change
getName() {
get name() {

Copy link
Member Author

Choose a reason for hiding this comment

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

Noted! I will do this in a follow up PR to all relevant code. I don't want to do it in this PR to avoid making the diff bigger

@florian-lefebvre
Copy link
Member Author

@ematipico thanks for the reviews! I addressed everything, PTAL

@florian-lefebvre florian-lefebvre merged commit d774306 into main Nov 19, 2025
25 checks passed
@florian-lefebvre florian-lefebvre deleted the refactor/cli-info branch November 19, 2025 10:29
@astrobot-houston astrobot-houston mentioned this pull request Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants