Skip to content
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

fix(ui-plugins): adding missing dependencies #376

Merged
merged 2 commits into from
Mar 6, 2024

Conversation

aversini
Copy link
Collaborator

@aversini aversini commented Mar 6, 2024

Summary by CodeRabbit

  • New Features
    • Introduced a test:watch script for continuous test monitoring.
    • Added support for @tailwindcss/typography, culori, and tailwindcss in the latest versions.
    • Enhanced tailwindPlugin to dynamically generate content paths for better flexibility and maintainability.
  • Bug Fixes
    • Fixed a bug where tailwindContentPath could return duplicate entries.
  • Tests
    • Added a new test suite for validating tailwindPlugin functionality, ensuring correct path generation.
  • Refactor
    • Simplified the configuration in vitest.config.ts by removing unnecessary parameters.
    • Streamlined environment variable checks and path generation in tailwindPlugin.
  • Chores
    • Updated test scripts to utilize vitest for running tests.

Copy link

coderabbitai bot commented Mar 6, 2024

Walkthrough

The update enhances the UI plugins package by incorporating new testing capabilities with vitest, refining the tailwindPlugin functionality for improved environment distinction and path generation, and updating dependencies like tailwindcss, @tailwindcss/typography, and culori. Additionally, the vitest configuration has been simplified, and the package's dependency management in pnpm-lock.yaml has been adjusted to align with these changes.

Changes

File(s) Summary
packages/ui-plugins/package.json - Added test:watch script for test watch mode
- Updated test script to use vitest run
- Added new dependencies: @tailwindcss/typography 0.5.10, culori 4.0.1, tailwindcss 3.4.1
packages/ui-plugins/src/plugins/__tests__/tailwindPlugin.test.ts Introduced tests for tailwindContentPath function to validate return values.
packages/ui-plugins/src/plugins/tailwindPlugin.ts - Enhanced environment checks
- Streamlined tailwindContentPath generation
- Refactored path logic
packages/ui-plugins/vitest.config.ts Simplified vitest configuration by removing unnecessary parameter.
pnpm-lock.yaml Updated dependency management, removed dev: true flag for culori.

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 3f0439d and 59d640b.
Files selected for processing (5)
  • packages/ui-plugins/package.json (1 hunks)
  • packages/ui-plugins/src/plugins/tests/tailwindPlugin.test.ts (1 hunks)
  • packages/ui-plugins/src/plugins/tailwindPlugin.ts (2 hunks)
  • packages/ui-plugins/vitest.config.ts (1 hunks)
  • pnpm-lock.yaml (2 hunks)
Additional comments: 8
packages/ui-plugins/src/plugins/__tests__/tailwindPlugin.test.ts (1)
  • 5-9: The test case provided checks if the tailwindContentPath array contains specific strings. While this is a good start, consider adding more comprehensive tests to cover different scenarios and edge cases, such as when the environment variables change (isProd and isDev), to ensure the tailwindContentPath function behaves as expected under various conditions.
packages/ui-plugins/vitest.config.ts (1)
  • 7-7: The modification to directly use viteConfig in the defineConfig function simplifies the configuration. Ensure that all references and usages of configEnv within the test setup and configurations have been updated or removed accordingly to avoid any potential issues or confusion.
packages/ui-plugins/package.json (2)
  • 31-33: The addition of the test:watch script and the update to the test script to use vitest align with the objective to enhance the testing framework. Ensure that the project's documentation and developer guides are updated to reflect these changes and guide contributors on how to use these new scripts effectively.
  • 34-37: Adding @tailwindcss/typography, culori, and tailwindcss as dependencies is crucial for addressing the missing dependencies issue. Verify that these versions are compatible with the rest of the project's dependencies and that there are no version conflicts that could lead to build or runtime errors.
packages/ui-plugins/src/plugins/tailwindPlugin.ts (2)
  • 13-14: The introduction of isProd and isDev constants based on process.env.NODE_ENV is a good practice for clearly distinguishing between production and development environments. Ensure that these constants are used consistently throughout the project to maintain this clarity.
  • 16-24: The refactoring of the tailwindContentPath generation logic to use packagesList and distLocation improves maintainability and readability. However, ensure that the path generation logic correctly handles different operating systems' path separators to avoid potential issues with path resolution.
pnpm-lock.yaml (2)
  • 166-176: The addition of specific versions for @tailwindcss/typography, culori, and tailwindcss under packages/ui-plugins is a good practice for ensuring consistent builds. However, it's important to verify the compatibility of these versions with each other and with the rest of the project's dependencies to avoid potential conflicts.
  • 163-179: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [2-2]

The removal of the dev: true flag for the /[email protected] package indicates it's now considered a production dependency. Please ensure this change is intentional and based on culori's usage within the project. If culori is used in the production build or runtime, this change is justified. Otherwise, it might inadvertently increase the production bundle size or introduce unnecessary dependencies in production.

Copy link

github-actions bot commented Mar 6, 2024

Bundle Size (components)

Status File Size (Gzip) Limits
style.css 7.17 KB 8 KB
index.js 14.43 KB (-1 B -0.01%) 20 KB
vendor.js 65.07 KB 67 KB

Overall bundle size: 86.67 KB (-1 B 0.00%)
Overall status: ✅

Bundle Size (system)

Status File Size (Gzip) Limits
style.css 7.5 KB 8 KB
index.js 1.74 KB 3 KB
vendor.js 44.49 KB 46 KB

Overall bundle size: 53.72 KB
Overall status: ✅

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between 59d640b and 0e540fb.
Files selected for processing (2)
  • packages/ui-plugins/package.json (1 hunks)
  • packages/ui-plugins/src/plugins/tailwindPlugin.ts (2 hunks)
Files skipped from review as they are similar to previous changes (2)
  • packages/ui-plugins/package.json
  • packages/ui-plugins/src/plugins/tailwindPlugin.ts

@aversini aversini merged commit 859220c into main Mar 6, 2024
5 checks passed
@aversini aversini deleted the fix(ui-plugins)-adding-missing-dependencies branch March 6, 2024 20:41
@aversini aversini mentioned this pull request Mar 6, 2024
aversini added a commit that referenced this pull request Mar 7, 2024
🤖 I have created a release *beep* *boop*
---


<details><summary>ui-plugins: 1.1.1</summary>

##
[1.1.1](ui-plugins-v1.1.0...ui-plugins-v1.1.1)
(2024-03-06)


### Bug Fixes

* **ui-plugins:** adding missing dependencies
([#376](#376))
([859220c](859220c))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

1 participant