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): build step + improve DX #1336

Merged
merged 4 commits into from
Apr 1, 2024
Merged

Conversation

SutuSebastian
Copy link
Collaborator

@SutuSebastian SutuSebastian commented Apr 1, 2024

Changes

  • fixed dev command in packages/ui
  • move postinstall script top level
  • move *.d.ts files into types folder
  • generate source map files
  • remove "type": "module" from package.json in cccda3e commit
  • update packages to latest
  • switch to bun v1.1.0

Issues

#1326, #1327, #1329

Summary by CodeRabbit

  • Bug Fixes

    • Patched create-flowbite-react to enhance the clean-package flow.
    • Improved the build step, exported types, and developer experience for flowbite-react.
  • Chores

    • Updated bun-version in GitHub Actions setup for better performance.
    • Expanded .gitignore to exclude *.backup files.
    • Upgraded various dependencies in apps/storybook and web packages for enhanced functionality and security.
    • Added a postinstall script and updated dependencies in the main package.json.
    • Optimized and updated build scripts and dependencies across several packages for improved build efficiency and maintenance.
  • Documentation

    • No visible changes to end-users.
  • New Features

    • No new end-user features mentioned.
  • Refactor

    • Enhanced configuration for clean-package in multiple packages for streamlined development processes.
  • Style

    • No visible style changes to end-users.
  • Tests

    • No test-related changes mentioned.
  • Revert

    • No reverts mentioned.

@SutuSebastian SutuSebastian added 🐛 bug Something isn't working 🚀 enhancement New feature or request confirmed This bug was confirmed labels Apr 1, 2024
@SutuSebastian SutuSebastian self-assigned this Apr 1, 2024
Copy link

changeset-bot bot commented Apr 1, 2024

🦋 Changeset detected

Latest commit: d5a49c9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
create-flowbite-react Patch
flowbite-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

coderabbitai bot commented Apr 1, 2024

Walkthrough

The recent updates encompass a series of enhancements and bug fixes across various components, focusing on improving the build process, developer experience, and updating dependencies. Notably, patches have been applied to create-flowbite-react and flowbite-react, alongside significant updates to the setup configuration and ignored files. Dependency versions in the Storybook and web app have been bumped up, and the build scripts and configurations in the UI package have been optimized for efficiency.

Changes

File(s) Change Summary
.changeset/fuzzy-ravens-type.md
.changeset/old-flies-shop.md
Patches for create-flowbite-react and flowbite-react to improve the build process and developer experience.
.github/actions/setup/action.yml Updated bun-version from 1.0.31 to 1.1.0.
.gitignore Added *.backup to ignored files.
apps/.../storybook/package.json
apps/.../web/package.json
Bumped versions of various dependencies like Storybook, TailwindCSS, TypeScript, etc.
package.json Added scripts and updated dependencies including clean-package and bun version.
packages/cli/package.json
packages/ui/package.json
Optimized build scripts, updated clean-package version, and modified configurations.
packages/ui/tsconfig.build.json Enabled source maps and updated the exclude directory in compiler options.

🐇💬

In the realm of code, where changes abound,
A rabbit hopped in, with updates profound.
"To improve, to fix, to make things light,
My paws have worked through the day and night.
Let’s celebrate, for our code now gleams,
Flowing like a river, or so it seems."
🌟📦🛠

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

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 testing code 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 testing code 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 testing code.
    • @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

vercel bot commented Apr 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 1, 2024 6:20pm
flowbite-react-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 1, 2024 6:20pm

Copy link
Contributor

@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.

Actionable comments posted: 2

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between cccda3e and 79b666b.
Files ignored due to path filters (1)
  • bun.lockb is excluded by !bun.lockb
Files selected for processing (10)
  • .changeset/fuzzy-ravens-type.md (1 hunks)
  • .changeset/old-flies-shop.md (1 hunks)
  • .github/actions/setup/action.yml (1 hunks)
  • .gitignore (1 hunks)
  • apps/storybook/package.json (1 hunks)
  • apps/web/package.json (1 hunks)
  • package.json (2 hunks)
  • packages/cli/package.json (2 hunks)
  • packages/ui/package.json (2 hunks)
  • packages/ui/tsconfig.build.json (1 hunks)
Additional Context Used
Additional comments not posted (15)
.gitignore (1)

6-6: The addition of *.backup to the .gitignore file is a good practice to keep the repository clean from unnecessary files.

packages/ui/tsconfig.build.json (2)

5-5: Enabling source maps is a positive change for debugging purposes.


9-9: Ensure that changing the exclude directory from dist to lib aligns with the overall project structure and build configuration.

Verification successful

The verification process has confirmed that a lib directory does not exist within packages/ui. This means that changing the exclude directory from dist to lib in the TypeScript build configuration does not impact the inclusion of any TypeScript files within the packages/ui directory, as there are no files within a non-existent lib directory to exclude.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that no important files in 'lib' are unintentionally excluded from the TypeScript build process.
fd '.*\.ts' packages/ui --exec grep -L 'lib/'

Length of output: 15566



Script:

#!/bin/bash
# Check if a 'lib' directory exists within 'packages/ui' and list its contents if it does.
if [ -d "packages/ui/lib" ]; then
    echo "'lib' directory exists within 'packages/ui'. Listing contents:"
    find "packages/ui/lib" -type f \( -name "*.ts" -o -name "*.tsx" \)
else
    echo "'lib' directory does not exist within 'packages/ui'."
fi

Length of output: 155

.github/actions/setup/action.yml (1)

10-10: Updating to Bun version 1.1.0 aligns with the PR's objective of using modern tooling. Ensure compatibility with the project's existing setup and workflows.

apps/storybook/package.json (1)

18-34: Updating dependencies to their latest versions is a good practice. Ensure compatibility and test the Storybook setup thoroughly after these updates.

apps/web/package.json (1)

24-43: Updating dependencies to their latest versions is beneficial for maintaining project health. Ensure compatibility and test the web app setup thoroughly after these updates.

package.json (2)

24-24: Adding a postinstall script to run "bun build:ui" can streamline setup processes. Ensure it integrates well with existing workflows.


37-50: Updating dependencies and switching the packageManager to bun@1.1.0 aligns with the PR's objectives. Verify the impact on existing workflows and compatibility.

packages/cli/package.json (3)

56-56: Updated TypeScript to version 5.4.3.

Please ensure compatibility with the rest of the project's codebase and other dependencies.


65-70: Added a replace configuration in clean-package to restore the postpublish script after publishing.

This is a good practice for managing temporary changes made for the publishing process, ensuring the repository remains clean and necessary scripts are restored post-publish.


52-72: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-70]

The postpack script was removed according to the summary.

Please verify the impact of this removal on the package's build or publish process to ensure it does not introduce any unintended consequences.

packages/ui/package.json (4)

24-24: Changed the path for types in exports to ./lib/types/index.d.ts.

Organizing TypeScript declaration files into a specific folder and updating their paths in the exports field improves project organization and makes it easier for developers to locate type definitions.


42-48: Updated build scripts to optimize the build process and added a new build script build:fast.

These changes indicate a focus on improving the build process's efficiency. Please ensure these scripts are correctly integrated into the project's build pipeline and do not introduce any issues.


61-83: Updated dependency versions to their latest.

Please ensure compatibility with the project's codebase and other dependencies to avoid introducing any compatibility issues.


95-100: Modified the clean-package configuration to include a replace section for restoring the postpublish script after publishing.

This is a good practice for managing temporary changes made for the publishing process, ensuring the repository remains clean and necessary scripts are restored post-publish.

.changeset/fuzzy-ravens-type.md Show resolved Hide resolved
.changeset/old-flies-shop.md Show resolved Hide resolved
Copy link
Contributor

@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.

Actionable comments posted: 0

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 45930ef and d5a49c9.
Files ignored due to path filters (1)
  • bun.lockb is excluded by !bun.lockb
Files selected for processing (10)
  • .changeset/fuzzy-ravens-type.md (1 hunks)
  • .changeset/old-flies-shop.md (1 hunks)
  • .github/actions/setup/action.yml (1 hunks)
  • .gitignore (1 hunks)
  • apps/storybook/package.json (1 hunks)
  • apps/web/package.json (1 hunks)
  • package.json (2 hunks)
  • packages/cli/package.json (2 hunks)
  • packages/ui/package.json (2 hunks)
  • packages/ui/tsconfig.build.json (1 hunks)
Files skipped from review as they are similar to previous changes (8)
  • .github/actions/setup/action.yml
  • .gitignore
  • apps/storybook/package.json
  • apps/web/package.json
  • package.json
  • packages/cli/package.json
  • packages/ui/package.json
  • packages/ui/tsconfig.build.json
Additional Context Used
Additional comments not posted (2)
.changeset/fuzzy-ravens-type.md (1)

5-5: Consider starting the sentence with an uppercase letter for consistency and readability.

- fix `clean-package` flow
+ Fix `clean-package` flow
.changeset/old-flies-shop.md (1)

5-5: Consider starting the sentence with an uppercase letter for consistency and readability.

- fix build step, export types and improve DX
+ Fix build step, export types and improve DX

@SutuSebastian SutuSebastian merged commit b6ebb31 into main Apr 1, 2024
8 checks passed
@SutuSebastian SutuSebastian deleted the refactor/packages/ui/build-step branch April 1, 2024 18:28
@github-actions github-actions bot mentioned this pull request Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working confirmed This bug was confirmed 🚀 enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant