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

BA-2192: mobile features into packages #198

Merged
merged 4 commits into from
Feb 11, 2025

Conversation

anicioalexandre
Copy link
Collaborator

@anicioalexandre anicioalexandre commented Jan 28, 2025

  • components package update - v 1.0.0

    • Rearrange each module code into folders, common for multi-platform code, native for native code and web for web code.
    • Transpile and bundle the package code using babel, tsup and tsc.
    • Migrate native profile components from the template into this package.
  • design-system package update - v 1.0.0

    • Rearrange the code inside components, hooks, layouts, providers, styles and utils into folders, common for multi-platform code, native for native code and web for web code.
    • Transpile and bundle the package code using tsup and tsc.
    • Migrate native design-sytem components from the template into this package.
  • config package update - v 2.1.11

    • Add .eslintrc-with-restricted-paths eslint file to be able to restric imports from certain folders.

Summary by CodeRabbit

  • New Features

    • Authentication package updated to v4.1.4, enhancing stability and compatibility.
    • Components package released at v1.0.0 with a restructured multi-platform module setup and optimized build workflows.
  • Documentation

    • Expanded documentation now includes detailed build process insights to assist developers.
    • Updated README with changes in component naming and command structure for running Storybook.
  • Chores

    • Added new entries to .gitignore to improve file management during development.
    • Updated ESLint configuration to enhance code quality checks.

Copy link

changeset-bot bot commented Jan 28, 2025

⚠️ No Changeset found

Latest commit: 4dc7aa0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

coderabbitai bot commented Jan 28, 2025

Walkthrough

This pull request implements several updates across the codebase. A new script file is introduced to copy TypeScript declaration files using asynchronous file operations and recursive directory traversal. The authentication package sees its version bumped and dependency versions updated explicitly, while the components package undergoes configuration changes including ESLint adjustments, modifications to .gitignore entries, updated import paths in Storybook mocks and decorators, and comprehensive changelog and documentation updates detailing a reorganization of the package structure and build process.

Changes

File(s) Change Summary
.scripts/copy-dts.js New script to copy .d.ts files from a source folder to a destination. Implements async functions for directory traversal (walk) and file copying with error handling.
packages/authentication/CHANGELOG.md,
packages/authentication/package.json
Version updated from 4.1.3 to 4.1.4; dependency, peerDependency, and devDependency versions are replaced with explicit version numbers.
packages/components/.eslintrc.js,
packages/components/.gitignore,
packages/components/.../mocks/navigation.tsx,
packages/components/.../mocks/theme.ts,
packages/components/.../decorators/withProviders.tsx
ESLint configuration now points to a restricted paths config; .gitignore updated with new entries for generated and temporary directories; import paths in Storybook mocks and decorators are modified to reflect a restructured design system.
packages/components/CHANGELOG.md,
packages/components/README.md
Major version bumped to 1.0.0; changelog documents reorganization into common/native/web folders along with an updated build process description in the README.

Sequence Diagram(s)

sequenceDiagram
    participant Main as copyDTS()
    participant Walker as walk() Generator
    participant FS as File System
    participant Log as Logger

    Main->>Walker: Start directory traversal in 'tmp-dts'
    Walker-->>Main: Yield file path (if .d.ts)
    Main->>FS: Create target directory (recursive)
    Main->>FS: Copy file to destination ('dist')
    FS-->>Main: Confirm file copied
    Main->>Log: Log success message
    Main-->>Walker: Iterate over remaining files (handle errors if any)
Loading

Suggested reviewers

  • Ronan-Fernandes
  • deboracosilveira

Poem

I'm a bunny in the code,
Hopping through files with a joyful mode,
Copying .d.ts with swift delight,
Dependencies set to version right,
With each commit I bound and cheer,
Celebrating progress hopping near!

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/components/.eslintrc.js

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Cannot read config file: /packages/components/.eslintrc.js
Error: Cannot find module '@baseapp-frontend/config/.eslintrc-with-restricted-paths.js'
Require stack:

  • /packages/components/.eslintrc.js
  • /node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/cli-engine/cli-engine.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/eslint/eslint.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/eslint/index.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/cli.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/bin/eslint.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Module._load (node:internal/modules/cjs/loader:1074:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1339:12)
    at require (node:internal/modules/helpers:135:16)
    at Object. (/packages/components/.eslintrc.js:1:18)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
    at Module.load (node:internal/modules/cjs/loader:1317:32)
packages/components/.storybook/__mocks__/navigation.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Cannot read config file: /packages/components/.eslintrc.js
Error: Cannot find module '@baseapp-frontend/config/.eslintrc-with-restricted-paths.js'
Require stack:

  • /packages/components/.eslintrc.js
  • /node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/cli-engine/cli-engine.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/eslint/eslint.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/eslint/index.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/cli.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/bin/eslint.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Module._load (node:internal/modules/cjs/loader:1074:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1339:12)
    at require (node:internal/modules/helpers:135:16)
    at Object. (/packages/components/.eslintrc.js:1:18)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
    at Module.load (node:internal/modules/cjs/loader:1317:32)
packages/components/.storybook/__mocks__/theme.ts

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Cannot read config file: /packages/components/.eslintrc.js
Error: Cannot find module '@baseapp-frontend/config/.eslintrc-with-restricted-paths.js'
Require stack:

  • /packages/components/.eslintrc.js
  • /node_modules/.pnpm/@eslint+eslintrc@2.1.4/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/cli-engine/cli-engine.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/eslint/eslint.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/eslint/index.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/lib/cli.js
  • /node_modules/.pnpm/eslint@8.57.1/node_modules/eslint/bin/eslint.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Module._load (node:internal/modules/cjs/loader:1074:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1339:12)
    at require (node:internal/modules/helpers:135:16)
    at Object. (/packages/components/.eslintrc.js:1:18)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
    at Module.load (node:internal/modules/cjs/loader:1317:32)
  • 1 others

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@anicioalexandre anicioalexandre force-pushed the BA-2192-mobile-features-to-packages branch from 359cbd8 to 09d7dca Compare February 7, 2025 18:27
@anicioalexandre anicioalexandre marked this pull request as ready for review February 7, 2025 18:28
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.

Actionable comments posted: 3

♻️ Duplicate comments (1)
packages/components/.storybook/decorators/withProviders.tsx (1)

1-4: ⚠️ Potential issue

Fix module resolution and approve import cleanup.

Good:

  • Removed unused useEffect import
  • Split imports for better organization

Issue:

  • Same module resolution error as in theme.ts for @baseapp-frontend/design-system/* imports
🧹 Nitpick comments (3)
packages/components/CHANGELOG.md (1)

5-10: Detailed "Major Changes" Section – Well Documented
The “Major Changes” section clearly lists the key structural updates (folder reorganization, build toolchain changes, and migration of native components). The bullet points are succinct; however, consider verifying that the descriptions fully capture all critical updates for internal and external users of the package. A minor refinement could be to consistently use active voice (e.g., “Reorganized module code…”).

.scripts/copy-dts.js (1)

9-19: Consider adding error handling in the walk generator.

While the implementation is correct, it could benefit from error handling for directory access issues.

 async function* walk(dir) {
+  try {
     const entries = await readdir(dir, { withFileTypes: true })
     for (const entry of entries) {
       const res = path.resolve(dir, entry.name)
       if (entry.isDirectory()) {
         yield* walk(res)
       } else {
         yield res
       }
     }
+  } catch (error) {
+    console.error(`Error walking directory ${dir}:`, error)
+    throw error
+  }
 }
packages/components/README.md (1)

79-79: Fix grammar in features list.

There's a grammatical error in the sentence.

-generating both ESM and CJS outputs and others features provided by tsup.
+generating both ESM and CJS outputs and other features provided by tsup.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~79-~79: “Other things” (plural) doesn’t require “other” to be in plural.
Context: ...generating both ESM and CJS outputs and others features provided by tsup. In the end, the hybr...

(OTHERS)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8de60b1 and 09d7dca.

⛔ Files ignored due to path filters (79)
  • packages/components/__generated__/ActivityLogsFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ActivityLogsPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ActivityLogsQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/AddProfilePopoverUserQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/AllProfilesListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/AllProfilesListPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ArchiveChatRoomMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/BlockToggleFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/BlockToggleMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ChangeUserRoleMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ChatRoomMessagesListPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ChatRoomParticipantsPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ChatRoomQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ChatRoomsQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentCreateMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentDeleteMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentItemRefetchQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentItemWithQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentItem_comment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentItem_target.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentPinMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentUpdateMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsForTestingQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsListPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsListWithQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsList_comments.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsRefetchQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsSubscription.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsUpdateWithQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsWithQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CreateChatRoomMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/FollowToggleMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/FollowToggleUpdatableFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/GroupDetailsQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/GroupTitleFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/LastMessageFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/MemberItemFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/MembersListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/MessageItemFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/MessageUpdateMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/MessagesListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationItemFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationItemWithQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationUserMenuFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationsListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationsListQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationsMarkAllAsReadMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationsMarkAsReadMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationsPopoverQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/OrganizationCreateMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ProfileComponentFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ProfileItemFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ProfileUpdateMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ProfilesListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ProfilesListQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ReactionButtonMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ReactionButtonWithQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ReactionButton_target.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ReadMessagesMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/RoomFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/RoomTitleFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/RoomsListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/SendMessageMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/TitleFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/UnreadChatMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/UnreadMessagesCountFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/UpdateChatRoomMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/UserMembersListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/UserMembersListPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/UserProfileQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/chatRoomsPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/notificationsListRefetchable.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/profilesListRefetchable.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/useMessageCountUpdateSubscription.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/useMessagesListSubscription.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/useNotificationsSubscription.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/useRoomListSubscription.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/userMembersListPaginationRefetchable.graphql.ts is excluded by !**/__generated__/**
📒 Files selected for processing (10)
  • .scripts/copy-dts.js (1 hunks)
  • packages/authentication/CHANGELOG.md (1 hunks)
  • packages/authentication/package.json (2 hunks)
  • packages/components/.eslintrc.js (1 hunks)
  • packages/components/.gitignore (1 hunks)
  • packages/components/.storybook/__mocks__/navigation.tsx (1 hunks)
  • packages/components/.storybook/__mocks__/theme.ts (1 hunks)
  • packages/components/.storybook/decorators/withProviders.tsx (1 hunks)
  • packages/components/CHANGELOG.md (1 hunks)
  • packages/components/README.md (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • packages/components/.storybook/mocks/navigation.tsx
  • packages/components/.eslintrc.js
  • packages/components/.gitignore
  • packages/authentication/CHANGELOG.md
🧰 Additional context used
🪛 LanguageTool
packages/components/README.md

[uncategorized] ~79-~79: “Other things” (plural) doesn’t require “other” to be in plural.
Context: ...generating both ESM and CJS outputs and others features provided by tsup. In the end, the hybr...

(OTHERS)

🪛 GitHub Actions: Main Workflow
packages/components/.storybook/__mocks__/theme.ts

[error] 1-1: Cannot find module '@baseapp-frontend/design-system/providers/web' or its corresponding type declarations.

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (6)
packages/components/CHANGELOG.md (2)

3-4: Major Version Header is Clear and Concise
The new major version “1.0.0” is prominently declared at the top of the changelog. This aligns well with semantic versioning practices and sets the stage for the major changes described below.


11-18: "Patch Changes" Dependency Updates are Accurate
The “Patch Changes” section for version 1.0.0 lists updated dependency versions in a clear and accessible format. Ensure that these version upgrades have corresponding release notes elsewhere (if applicable) so that users can easily reference details on the improvements or fixes provided. Overall, this segment is well structured.

.scripts/copy-dts.js (1)

1-8: LGTM! Good use of promisify for async operations.

The code correctly promisifies the necessary fs functions for async file operations.

packages/authentication/package.json (2)

26-26: Verify React version compatibility.

React 18.3.1 seems to be a future version that might not be released yet.


17-22: Verify compatibility between dependency versions.

Some dependencies have undergone major version updates. Please verify compatibility:

  • @tanstack/react-query v5.45.1 is a major version update
  • zod v3.24.1 might have breaking changes
packages/components/README.md (1)

31-81: Excellent documentation of the build process!

The build process documentation is thorough and well-structured, clearly explaining:

  • The hybrid pipeline approach
  • Each step in the process
  • Pros and cons
  • Alternatives considered
🧰 Tools
🪛 LanguageTool

[uncategorized] ~79-~79: “Other things” (plural) doesn’t require “other” to be in plural.
Context: ...generating both ESM and CJS outputs and others features provided by tsup. In the end, the hybr...

(OTHERS)

@anicioalexandre anicioalexandre force-pushed the BA-2192-mobile-features-to-packages branch from ee9df0e to 4dc7aa0 Compare February 7, 2025 20:35
Copy link

sonarqubecloud bot commented Feb 7, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
5.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/components/README.md (1)

29-81: Comprehensive Build Process Documentation
The added “Build Process” section thoroughly outlines the hybrid pipeline, detailing each step—from Babel transformations and tsup bundling to TypeScript declaration handling. This explanation is valuable for users to understand the trade-offs and advantages of using multiple tools.

A couple of minor points for refinement:

  • At line 79, the phrase “and others features provided by tsup” should be corrected to “and other features provided by tsup” for grammatical accuracy.
  • It might be beneficial to include links or references to the official documentation of Babel, tsup, and tsc, so that users can dive deeper if needed.

Overall, these additions provide strong context about the build workflow and architectural decisions.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~79-~79: “Other things” (plural) doesn’t require “other” to be in plural.
Context: ...generating both ESM and CJS outputs and others features provided by tsup. In the end, the hybr...

(OTHERS)

packages/authentication/package.json (1)

33-47: DevDependencies Version Precision & Consistency
The devDependencies have been updated to explicit versions—this includes tools such as "@faker-js/faker" (now "^9.0.3"), testing libraries, type definitions, and TypeScript-related packages. This move away from catalog-based versioning improves clarity and build reproducibility.

Note: There is a minor inconsistency where "@faker-js/faker" uses the caret (^) operator while the other dependencies are pinned to an exact version. If the intent is to have a consistent versioning strategy across all devDependencies, consider aligning this notation.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 09d7dca and 4dc7aa0.

⛔ Files ignored due to path filters (79)
  • packages/components/__generated__/ActivityLogsFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ActivityLogsPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ActivityLogsQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/AddProfilePopoverUserQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/AllProfilesListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/AllProfilesListPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ArchiveChatRoomMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/BlockToggleFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/BlockToggleMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ChangeUserRoleMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ChatRoomMessagesListPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ChatRoomParticipantsPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ChatRoomQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ChatRoomsQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentCreateMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentDeleteMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentItemRefetchQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentItemWithQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentItem_comment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentItem_target.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentPinMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentUpdateMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsForTestingQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsListPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsListWithQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsList_comments.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsRefetchQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsSubscription.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsUpdateWithQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CommentsWithQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/CreateChatRoomMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/FollowToggleMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/FollowToggleUpdatableFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/GroupDetailsQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/GroupTitleFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/LastMessageFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/MemberItemFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/MembersListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/MessageItemFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/MessageUpdateMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/MessagesListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationItemFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationItemWithQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationUserMenuFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationsListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationsListQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationsMarkAllAsReadMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationsMarkAsReadMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/NotificationsPopoverQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/OrganizationCreateMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ProfileComponentFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ProfileItemFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ProfileUpdateMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ProfilesListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ProfilesListQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ReactionButtonMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ReactionButtonWithQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ReactionButton_target.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/ReadMessagesMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/RoomFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/RoomTitleFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/RoomsListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/SendMessageMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/TitleFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/UnreadChatMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/UnreadMessagesCountFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/UpdateChatRoomMutation.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/UserMembersListFragment.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/UserMembersListPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/UserProfileQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/chatRoomsPaginationQuery.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/notificationsListRefetchable.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/profilesListRefetchable.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/useMessageCountUpdateSubscription.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/useMessagesListSubscription.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/useNotificationsSubscription.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/useRoomListSubscription.graphql.ts is excluded by !**/__generated__/**
  • packages/components/__generated__/userMembersListPaginationRefetchable.graphql.ts is excluded by !**/__generated__/**
📒 Files selected for processing (10)
  • .scripts/copy-dts.js (1 hunks)
  • packages/authentication/CHANGELOG.md (1 hunks)
  • packages/authentication/package.json (2 hunks)
  • packages/components/.eslintrc.js (1 hunks)
  • packages/components/.gitignore (1 hunks)
  • packages/components/.storybook/__mocks__/navigation.tsx (1 hunks)
  • packages/components/.storybook/__mocks__/theme.ts (1 hunks)
  • packages/components/.storybook/decorators/withProviders.tsx (1 hunks)
  • packages/components/CHANGELOG.md (1 hunks)
  • packages/components/README.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (7)
  • packages/components/.gitignore
  • packages/authentication/CHANGELOG.md
  • .scripts/copy-dts.js
  • packages/components/.eslintrc.js
  • packages/components/.storybook/mocks/navigation.tsx
  • packages/components/.storybook/decorators/withProviders.tsx
  • packages/components/.storybook/mocks/theme.ts
🧰 Additional context used
🪛 LanguageTool
packages/components/README.md

[uncategorized] ~79-~79: “Other things” (plural) doesn’t require “other” to be in plural.
Context: ...generating both ESM and CJS outputs and others features provided by tsup. In the end, the hybr...

(OTHERS)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: Build
  • GitHub Check: Lint
🔇 Additional comments (15)
packages/components/CHANGELOG.md (10)

3-3: Major Version Bump to 1.0.0 is clearly indicated.
This new version header signals a major update with significant structural changes as described in the PR objectives.


5-5: Clear "Major Changes" Section Header.
The header effectively segregates the major changes from other updates, improving the readability and structure of the changelog.


7-7: Reorganization of Module Folders.
The changelog documents the reorganization into common, native, and web folders. This structural change supports multi-platform code separation. Please ensure that related documentation and internal references (if any) are updated accordingly.


8-8: Updated Build Tooling.
Specifying that the package code is now transpiled and bundled using babel, tsup, and tsc clarifies the new build process. It is important to verify that all related configuration files (e.g., babel or tsup configs) reflect these changes.


9-9: Migration of Native Profile Components.
The note on migrating native profile components from the template is crucial for mobile feature integration. Ensure that these components have been thoroughly tested post-migration to confirm full functionality.


13-13: Summary of Dependency Updates.
This bullet point clearly introduces the updated dependencies under the patch changes section. It helps track what has changed for future reference.


14-14: Design-System Dependency Update.
The design system dependency is set to version 1.0.0. Verify that any inter-package integrations using this dependency are compatible with the updates.


15-15: Utils Dependency Update.
The utils package has been updated to version 3.1.3 as indicated. Confirm that this update does not break any utility functions leveraged in the components package.


16-16: Authentication Dependency Update.
The authentication dependency is now at version 4.1.4. It is important to ensure that any authentication flows or integrations in the components package continue to work as expected.


17-17: GraphQL Dependency Update.
The changelog shows that the GraphQL dependency has been bumped to version 1.2.4. Please ensure that any GraphQL queries or mutations used within the package are compatible with this updated version.

packages/components/README.md (2)

21-21: Updated Package Terminology for Clarity
The description now uses “modules” instead of “components” (e.g. “BaseApp modules such as comments, notifications, messages and navigations”) which aligns with the restructuring goals for this package. This clearly differentiates the internal organization from the externally exposed package name.


24-27: Revised Storybook Command Usage
The code block now includes a new comment (“# at root level”) and the command has been updated to “pnpm storybook --filter components”. This update reflects the shift to pnpm and specifying a filter. One point to verify is the consistency between the new terminology (modules) mentioned in the description and the filter key (“components”) used in the command. Please confirm that this discrepancy is intentional based on your package naming conventions.

packages/authentication/package.json (3)

4-4: Version Bump Update
The package version has been updated to "4.1.4", reflecting the intended patch update. Please verify that the CHANGELOG and any related release notes have been updated accordingly.


17-22: Explicit Dependency Versions
The dependency entries for "@hookform/resolvers", "@tanstack/react-query", "jotai", "js-cookie", "react-hook-form", and "zod" have been switched from catalog-based placeholders to explicit versions. This change improves reproducibility and clarity in dependency management. Ensure that these specified versions are fully compatible with the rest of the codebase and pass all integration tests.


26-26: Peer Dependency Update
The React peer dependency has been updated to "18.3.1" from the previous catalog notation. This explicit version specification should help downstream consumers verify compatibility more easily. Please confirm that all dependent projects are compatible with this version.

@anicioalexandre anicioalexandre merged commit 7587505 into master Feb 11, 2025
7 of 9 checks passed
@anicioalexandre anicioalexandre deleted the BA-2192-mobile-features-to-packages branch February 11, 2025 14:09
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.

4 participants