This is a bounty to fix a package entrypoint issue in a TypeScript monorepo. The `@freelanceflow/db` package needs its `package.json` configured correctly with `main`, `types`, and `exports` fields to be importable within its workspace. A lightweight test is also required to prove the fix.
A starter prompt for Claude Code, what you'll need, and how to reach them.
You are an expert TypeScript developer. The task is to fix a package entrypoint issue for the `@freelanceflow/db` package within the `SecureBananaLabs/bug-bounty` monorepo (specifically issue #2775). Fork the repository. Navigate to `packages/db`. Edit `package.json` to include `main`, `types`, and `exports` fields, ensuring they point to the correct build outputs (e.g., `dist/index.js`, `dist/index.d.ts`). Assume `src/index.ts` is the source file. If a build script is missing to compile `src/index.ts` to `dist/`, create a simple `tsc` command or similar in the `package.json`'s `scripts` section. Finally, add a lightweight test (e.g., a new `test.ts` file that attempts to import `@freelanceflow/db`) to confirm the package is correctly exposed and importable within the monorepo workspace. The build/verify gate is a passing test and a properly configured `package.json` that allows other workspace packages to import `@freelanceflow/db` without errors. Focus solely on the `db` package and its entrypoint. The target environment is Node.js within a TypeScript monorepo.
For developers interested in monorepo best practices and automated build processes, this bounty demonstrates practical skills in package management, which is relevant to users of Forge Kit and MCP Kit.
Bounty (amount on the issue). Parent bounty: #743 ## Bug The `packages/db` workspace contains `src/index.ts`, but `packages/db/package.json` does not declare `main`, `types`, or `exports`. Consumers importing `@freelanceflow/db` from the workspace have no reliable package entrypoint, so Node package resolution looks for a missing root `index.js`. ## Expected - `@freelanceflow/db` exposes a valid JavaScript entrypoint for workspace consumers. - Package metadata includes explicit `main`, `types`, and `exports` fields. - A lightweight test proves the package can be imported through the workspace package name. ## Scope Keep the fix limited to the DB package entrypoint and a focused import test.
Standard for any developer activity.
Standard JavaScript/TypeScript development environment.
Core skill for this task, familiar from existing products.
Understanding how monorepos resolve packages might need a quick review (~1-2 hours).
Learn it: Search getting-started ↗
Comment on the GitHub issue #2775 (https://github.com/SecureBananaLabs/bug-bounty/issues/2775).
“I've reviewed issue #2775 and have a clear approach to resolve the `@freelanceflow/db` package entrypoint. I can implement the necessary `package.json` changes and add a lightweight test to verify the fix. I'll open a draft PR for your review shortly.”
Open the original ↗