From 5d69b8021bd33b94899ecf603a18db5ba9b8eac8 Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Thu, 20 Jun 2024 15:52:34 +0200 Subject: [PATCH] Telemetry: Detect Node version --- 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) => {