-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
WIP: Rework CLI Init #32717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
WIP: Rework CLI Init #32717
Conversation
…or execution and dependency collection
…ution and framework handling
… and file copying
…their configurations
…and ESLint configuration
…ent, version conflicts, validation, and package counting
…ding, project type detection, and addon dependency management
…date test cases for valid configuration and package manager compatibility. Remove deprecated configDir, frameworkPackage, and frameworkTest checks from the codebase.
…n and CLI integration from process ancestry. Implement tests for handling errors and verifying telemetry behavior based on user settings.
…se, streamlining service exports in the index file.
…d of PackageManagerService. Update tests to reflect changes in dependency handling and installation logic.
…d services. Introduce execute functions for command execution, enhancing maintainability and readability. Update telemetry logging in notify.ts for cleaner output. Add documentation for the new architecture and refactoring details.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
|
View your CI Pipeline Execution ↗ for commit 7775199
☁️ Nx Cloud last updated this comment at |
…cing a helper method for conditional execution. Remove redundant feature object creation tests and simplify feature handling within the service.
…with executePreflightCheck function for improved modularity and readability. Update command exports accordingly.
…arding preferences and streamline user prompts. Update addon configuration to utilize DependencyCollector for managing dependencies during initialization.
…ance error handling and user feedback. Update logger usage for consistency and improve task logging during addon configuration and project detection processes.
…prove clarity and user feedback. Update messages for project detection and addon configuration success/failure, enhancing overall error handling.
…onCommand, UserPreferencesCommand, and baseGenerator. Improve user feedback by updating messages for dependency addition, project type detection, and ESLint configuration. Streamline success messages for better clarity during Storybook setup.
- Introduced logger to the build-storybook and start-storybook builders to provide feedback during the build and start processes. - Added introductory log messages: "Building storybook" and "Starting storybook" to enhance user experience and debugging capabilities.
…onfigurations - Updated tests to check for the addition of '@storybook/addon-vitest' and '@storybook/addon-a11y' when the respective features are enabled. - Modified the AddonService implementation to ensure proper handling of the A11Y feature in addon configurations.
- Replaced string concatenation with `ts-dedent` for improved readability. - Combined multiple log statements into a single dedented message that includes information about anonymous telemetry collection and a URL for opting out.
…orybook command - Changed the `--debug` flag to `--loglevel=debug` in both `.circleci/config.yml` and `.circleci/src/jobs/test-init-features.yml` to enhance logging during the Storybook initialization process.
…nitialization - Added `--skip-install` flag to the `create-storybook` command in both `.circleci/config.yml` and `.circleci/src/jobs/test-init-features.yml` to prevent automatic package installation. - Included an explicit `npm install` command to ensure dependencies are installed after Storybook setup.
cfbaa10 to
e4f9db7
Compare
- Updated the debug logging in both BUNProxy and NPMProxy to include the error message when an issue occurs while finding dependencies metadata using npm. This change improves the visibility of errors for better debugging.
- Added conditional handling in the `spinner` and `taskLog` functions to log messages using the `logger` when not in a TTY environment. - Improved console.log patching for both spinner and task log methods to ensure consistent logging behavior across different environments.
- Replaced the `isTTY` constant with an `isInteractiveTerminal` function to improve the check for interactive terminal environments. - Updated the `spinner` and `taskLog` functions to utilize the new terminal check, ensuring consistent behavior across different execution contexts.
…Storybook initialization - Removed the `npm install` command from both `.circleci/config.yml` and `.circleci/src/jobs/test-init-features.yml` as it is no longer necessary with the `--skip-install` flag in the `create-storybook` command.
- Updated the `installPlaywright` method to use a `yes` option instead of `skipInstall` for better control over installation prompts. - Enhanced user experience by providing a warning message when Playwright installation is skipped, along with instructions for manual installation. - Modified the `AddonConfigurationCommand` to call `installPlaywright` with the new options, ensuring proper handling during addon configuration.
…nctions to pass default value
…iguration handling and remove installType from results
…'info' level, improving performance and reducing unnecessary console output.
…onsistent message formatting; update telemetry call in project scaffolding to await for better async handling.
…educe unnecessary output; introduce conditional logging for spinner and task messages.
Closes #25389
What I did
Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary release
This pull request has been released as version
0.0.0-pr-32717-sha-77751994. Try it out in a new sandbox by runningnpx storybook@0.0.0-pr-32717-sha-77751994 sandboxor in an existing project withnpx storybook@0.0.0-pr-32717-sha-77751994 upgrade.More information
0.0.0-pr-32717-sha-77751994valentin/cli-init-rework777519941761922479)To request a new release of this pull request, mention the
@storybookjs/coreteam.core team members can create a new canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=32717