From 78338211f50957b63c3608d18c2726b8b2c3d880 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Mon, 24 Jun 2024 14:25:36 +0200 Subject: [PATCH] Merge pull request #28299 from storybookjs/yann/add-telemetry-info Telemetry: Detect Node version (cherry picked from commit aee10a90b85d2a586fa369ef620a8f4441e64144) --- code/lib/telemetry/src/storybook-metadata.ts | 4 ++-- code/lib/telemetry/src/telemetry.ts | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/lib/telemetry/src/storybook-metadata.ts b/code/lib/telemetry/src/storybook-metadata.ts index d3367ccbca14..28fa40213926 100644 --- a/code/lib/telemetry/src/storybook-metadata.ts +++ b/code/lib/telemetry/src/storybook-metadata.ts @@ -104,11 +104,11 @@ export const computeStorybookMetadata = async ({ try { const packageManagerType = await detect({ cwd: getProjectRoot() }); - const packageManagerVerson = await getNpmVersion(packageManagerType); + const packageManagerVersion = await getNpmVersion(packageManagerType); metadata.packageManager = { type: packageManagerType, - version: packageManagerVerson, + version: packageManagerVersion, }; // Better be safe than sorry, some codebases/paths might end up breaking with something like "spawn pnpm ENOENT" // so we just set the package manager if the detection is successful diff --git a/code/lib/telemetry/src/telemetry.ts b/code/lib/telemetry/src/telemetry.ts index 15899abbd323..cfd0e7c7e48e 100644 --- a/code/lib/telemetry/src/telemetry.ts +++ b/code/lib/telemetry/src/telemetry.ts @@ -46,6 +46,7 @@ const globalContext = { inCI: Boolean(process.env.CI), isTTY: process.stdout.isTTY, platform: getOperatingSystem(), + nodeVersion: process.versions.node, } as Record; const prepareRequest = async (data: TelemetryData, context: Record, options: any) => {