-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
detect package manager and improve types #3847
Conversation
🦋 Changeset detectedLatest commit: 47042e0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
@@ -150,6 +137,15 @@ export class AstroTelemetry { | |||
context.anonymousId = `CI.${meta.ciName || 'UNKNOWN'}`; | |||
} | |||
|
|||
if (this.debug.enabled) { |
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.
Moved this down here so that it would output all data collected, not just the specific event payload.
3111a64
to
e4599c9
Compare
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.
Non-blocking comment on which-pm
, but this should give our telemetry a nice packadvantage 👍
@@ -34,11 +34,13 @@ | |||
"git-up": "^4.0.5", | |||
"is-docker": "^3.0.0", | |||
"is-wsl": "^2.2.0", | |||
"node-fetch": "^3.2.5" | |||
"node-fetch": "^3.2.5", | |||
"which-pm-runs": "^1.1.0" |
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.
Callout that we have a which-pm helper in create-astro
already! Pulled from Vite's create-vite
package, and looks roughly the same as the which-pm-runs
source code. Happy to pull in this package though given how small it is 🤷 Your call on which we'd prefer
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 think you mean preferred-pm
, which I'd be happy to use but has an async-only API and this needs to be quick and sync. That's also more complex since it looks at your file system, reads up directory trees for different lockfiles, etc.
I actually wonder if create-astro
should be moved to which-pm-runs
, since actually don't want that data when running create-astro.
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.
Actually wait, it looks like it's used in add
, and not create-astro
. That actually needs to rely on your file system and not just which pm you used to run command with, so we can keep as is.
create-astro
is using a custom solution, which could probably be replaced with this to save us some maintainance.
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.
LGTM!
e4599c9
to
47042e0
Compare
Changes
Testing
Docs