Skip to content

Fix/cross package imports#430

Closed
Spyderma9 wants to merge 4 commits intomainfrom
fix/cross-package-imports
Closed

Fix/cross package imports#430
Spyderma9 wants to merge 4 commits intomainfrom
fix/cross-package-imports

Conversation

@Spyderma9
Copy link
Copy Markdown
Contributor

@Spyderma9 Spyderma9 commented Mar 31, 2026

Why

What

Closes: #ISSUE_NUMBER

Test Plan

Checklist

  • Database: No schema changes, OR I have contacted the Development Lead to run db:push before merging
  • Environment Variables: No environment variables changed, OR I have contacted the Development Lead to modify them on Coolify BEFORE merging.

Summary by CodeRabbit

  • Chores
    • Updated internal package exports configuration to properly expose type declarations.
    • Removed unused dependency from the database package.
    • Refactored internal client initialization and module imports for improved maintainability.

@Spyderma9 Spyderma9 requested a review from a team as a code owner March 31, 2026 00:30
@Spyderma9 Spyderma9 closed this Mar 31, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 26f54d7f-8f8d-4340-8b8b-4c41a57c6a40

📥 Commits

Reviewing files that changed from the base of the PR and between 2a698f4 and 102eab1.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml, !pnpm-lock.yaml
📒 Files selected for processing (5)
  • packages/api/package.json
  • packages/db/package.json
  • packages/db/scripts/seed_devdb.ts
  • packages/utils/package.json
  • packages/utils/src/discord.ts

📝 Walkthrough

Walkthrough

This PR updates package exports to properly declare TypeScript type declarations separately from runtime entries, removes an unused dependency, refactors seed_devdb.ts to construct clients locally instead of importing from other packages, and consolidates team configuration to use a single source of truth from @forge/consts.

Changes

Cohort / File(s) Summary
Package Exports
packages/api/package.json, packages/utils/package.json
Updated ./minio/minio-client and ./discord export entries from direct paths to conditional exports with separate types declarations (pointing to .d.ts files) and default runtime paths.
Dependency Cleanup
packages/db/package.json
Removed drizzle-orm@^0.45.1 dependency—verify if this package is no longer used anywhere in the codebase.
Seed Script Refactoring
packages/db/scripts/seed_devdb.ts
Replaced cross-package imports (minioClient, discord helpers) with locally constructed clients; added environment variable validation via requireEnvVar(...); introduced discordApi REST client and logDiscord(...) helper to post embeds directly; fixed typo in failure message (savsave).
Team Configuration
packages/utils/src/discord.ts
Updated sendRecruitingApplication to import TEAM from @forge/consts and use TEAM.TEAMS instead of a locally imported TEAMS array, establishing a single source of truth.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • Resolve cross-package imports #404: Directly addressed by removing fragile cross-package imports in seed_devdb.ts and consolidating team configuration to avoid circular dependencies.

Possibly related PRs

Suggested labels

Major, API, Database, Bug

Suggested reviewers

  • azizu06
  • DVidal1205
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/cross-package-imports

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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