mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 13:31:19 +08:00
Merge pull request #18285 from storybookjs/fix/framework-version-telemetry
Core: Use correct framework version in telemetry
This commit is contained in:
commit
8d3a7b6149
@ -6,6 +6,7 @@ import { PackageJson } from '../types';
|
||||
interface StorybookInfo {
|
||||
framework: string;
|
||||
version: string;
|
||||
frameworkPackage: string;
|
||||
configDir?: string;
|
||||
mainConfig?: string;
|
||||
previewConfig?: string;
|
||||
@ -57,7 +58,7 @@ const getFrameworkInfo = (packageJson: PackageJson) => {
|
||||
);
|
||||
}
|
||||
|
||||
return { framework, version };
|
||||
return { framework, version, frameworkPackage: pkg };
|
||||
};
|
||||
|
||||
const validConfigExtensions = ['ts', 'js', 'tsx', 'jsx', 'mjs', 'cjs'];
|
||||
|
@ -187,9 +187,13 @@ export const computeStorybookMetadata = async ({
|
||||
const hasStorybookEslint = !!allDependencies['eslint-plugin-storybook'];
|
||||
|
||||
const storybookInfo = getStorybookInfo(packageJson);
|
||||
|
||||
const storybookVersion =
|
||||
storybookPackages[storybookInfo.frameworkPackage]?.version || storybookInfo.version;
|
||||
|
||||
return {
|
||||
...metadata,
|
||||
storybookVersion: storybookInfo.version,
|
||||
storybookVersion,
|
||||
language,
|
||||
storybookPackages,
|
||||
framework: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user