Skip to content

Conversation

@Fasosnql
Copy link
Collaborator

No description provided.

@nx-cloud
Copy link

nx-cloud bot commented Jul 11, 2025

View your CI Pipeline Execution ↗ for commit 2fae677

Command Status Duration Result
nx affected --target=test ✅ Succeeded 2m 17s View ↗
nx affected --target=build ✅ Succeeded 1m View ↗
nx affected --target=lint ✅ Succeeded 16s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-13 17:08:34 UTC

@Fasosnql Fasosnql requested review from Copilot, kopach and krzotki July 11, 2025 15:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes missing dependencies, refactors generator directory handling, and adds a test for the workspace generator.

  • Use getWorkspaceLayout to derive libsDir for several generators, removing hardcoded paths.
  • Simplify Storybook webpack configuration and handle SCSS loading.
  • Add an integration test for gene-workspace-generator and bump package versions with new devDependencies.

Reviewed Changes

Copilot reviewed 14 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/gene-tools/src/generators/translations-library-generator/index.ts Inject libsDir for dynamic directory in translations library
packages/gene-tools/src/generators/storybook-init/files/main.js__tmpl__ Simplified webpackFinal, updated SCSS rule, removed old loaders
packages/gene-tools/src/generators/storybook-configuration/utilities/add-storybook-targets.ts Updated Storybook target names and dependencies ordering
packages/gene-tools/src/generators/storybook-configuration/snapshots/index.spec.ts.snap Updated snapshots to reflect new Storybook target configurations
packages/gene-tools/src/generators/module-generator/index.ts Added getWorkspaceLayout to compute e2eTestingProvidersPath
packages/gene-tools/src/generators/module-generator/files/module/fileName/pascalCaseFileName.stories.tsx__tmpl__ Updated StorybookProviders import to use computed path
packages/gene-tools/src/generators/library-generator/index.ts Adjusted baseDirectory logic
packages/gene-tools/src/generators/gene-workspace-generator/index.ts Wrapped generator calls in try/catch, added logging
packages/gene-tools/src/generators/gene-workspace-generator/index.spec.ts Added test and debug logs for workspace generator
packages/gene-tools/src/generators/e2e-providers-generator/index.ts Mirror directory refactoring via getWorkspaceLayout
packages/gene-tools/src/generators/assets-library-generator/index.ts Mirror directory refactoring via getWorkspaceLayout
packages/gene-tools/src/executors/storybook/storybook.ts Updated default targets to storybook/build-storybook
package.json Bumped version, added ajv, ajv-keywords, @nx/linter dependencies
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (5)

packages/gene-tools/src/generators/gene-workspace-generator/index.ts:24

  • [nitpick] The catch block logs a generic message for any error in the try, including translation and file generation steps. Consider narrowing the catch to only asset creation or updating the message to reflect which operation failed.
    console.error('Error creating assets library:', error);

packages/gene-tools/src/generators/storybook-init/files/main.js__tmpl__:65

  • The custom webpackFinal override removes rules for handling TypeScript files and SVGs, which will break TSX and asset loading in Storybook. You should reintroduce the ts-loader rule and inline SVG loader after filtering defaults.
  webpackFinal: async (config) => {

packages/gene-tools/src/generators/module-generator/files/module/fileName/pascalCaseFileName.stories.tsx__tmpl__:6

  • Including libsDir in the import path makes the package name incorrect. The library package should be imported by its npm scope and package name (e.g. @scope/e2e-testing-providers), not including the libs folder.
import {StorybookProviders} from '@<%= e2eTestingProvidersPath %>';

packages/gene-tools/src/generators/library-generator/index.ts:19

  • Changing baseDirectory to remove the trailing slash may break path concatenation in downstream templates. The original logic ensured a separator was present.
  const baseDirectory = schema.directory || '';

packages/gene-tools/src/generators/gene-workspace-generator/index.spec.ts:24

  • [nitpick] The test contains console.log statements for debugging, which can clutter CI logs. It’s better to rely on assertions and remove these logs before merging.
    console.log('🔍 Before running generator:');

@Fasosnql Fasosnql force-pushed the fix/create-storybook-workspace-issues branch from 05fa095 to 2fae677 Compare November 13, 2025 17:04
@Fasosnql Fasosnql merged commit 6b5199e into master Nov 13, 2025
29 checks passed
@Fasosnql Fasosnql deleted the fix/create-storybook-workspace-issues branch November 13, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants