diff --git a/packages/storybook/src/generators/convert-to-inferred/convert-to-inferred.ts b/packages/storybook/src/generators/convert-to-inferred/convert-to-inferred.ts index 11cbc2db215b6e..648137ad887cc5 100644 --- a/packages/storybook/src/generators/convert-to-inferred/convert-to-inferred.ts +++ b/packages/storybook/src/generators/convert-to-inferred/convert-to-inferred.ts @@ -7,12 +7,12 @@ import { } from '@nx/devkit'; import { AggregatedLog } from '@nx/devkit/src/generators/plugin-migrations/aggregate-log-util'; import { - migrateProjectExecutorsToPluginV1, + migrateProjectExecutorsToPlugin, NoTargetsToMigrateError, } from '@nx/devkit/src/generators/plugin-migrations/executor-to-plugin-migrator'; import { buildPostTargetTransformer } from './lib/build-post-target-transformer'; import { servePostTargetTransformer } from './lib/serve-post-target-transformer'; -import { createNodes } from '../../plugins/plugin'; +import { createNodesV2 } from '../../plugins/plugin'; import { storybookVersion } from '../../utils/versions'; interface Schema { @@ -23,11 +23,11 @@ interface Schema { export async function convertToInferred(tree: Tree, options: Schema) { const projectGraph = await createProjectGraphAsync(); const migrationLogs = new AggregatedLog(); - const migratedProjects = await migrateProjectExecutorsToPluginV1( + const migratedProjects = await migrateProjectExecutorsToPlugin( tree, projectGraph, '@nx/storybook/plugin', - createNodes, + createNodesV2, { buildStorybookTargetName: 'build-storybook', serveStorybookTargetName: 'storybook', diff --git a/packages/storybook/src/generators/init/init.ts b/packages/storybook/src/generators/init/init.ts index 452031928ea725..8b201de04d276a 100644 --- a/packages/storybook/src/generators/init/init.ts +++ b/packages/storybook/src/generators/init/init.ts @@ -10,9 +10,9 @@ import { updateJson, updateNxJson, } from '@nx/devkit'; -import { addPluginV1 } from '@nx/devkit/src/utils/add-plugin'; +import { addPlugin } from '@nx/devkit/src/utils/add-plugin'; import { gte } from 'semver'; -import { createNodes } from '../../plugins/plugin'; +import { createNodesV2 } from '../../plugins/plugin'; import { getInstalledStorybookVersion, storybookMajorVersion, @@ -102,11 +102,11 @@ export async function initGeneratorInternal(tree: Tree, schema: Schema) { schema.addPlugin ??= addPluginDefault; if (schema.addPlugin) { - await addPluginV1( + await addPlugin( tree, await createProjectGraphAsync(), '@nx/storybook/plugin', - createNodes, + createNodesV2, { serveStorybookTargetName: [ 'storybook',