-
-
Notifications
You must be signed in to change notification settings - Fork 3k
refactor(cli): info #14609
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
refactor(cli): info #14609
Conversation
🦋 Changeset detectedLatest 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 |
CodSpeed Performance ReportMerging #14609 will not alter performanceComparing Summary
Footnotes |
commit: |
|
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. |
|
No it's fine thanks! |
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.
Left some comments that I think should be addressed:
- error handling
- docs
| @@ -0,0 +1 @@ | |||
| export type DebugInfo = Array<[string, string | Array<string>]>; | |||
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.
Should this go to info/definitions.ts?
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.
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
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 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
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.
Good point, I'll make a follow up PR with guidelines
packages/astro/src/cli/info/infra/process-package-manager-user-agent-provider.ts
Show resolved
Hide resolved
|
|
||
| export function createNpmPackageManager({ commandExecutor }: Options): PackageManager { | ||
| return { | ||
| getName() { |
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.
nit (to apply to all interfaces)
| getName() { | |
| get name() { |
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.
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
|
@ematipico thanks for the reviews! I addressed everything, PTAL |
Changes
astro infoCLI commandastro infois retrieved in dev for the dev toolbarTesting
Docs