Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@
"format": "oxfmt --write .",
"format:check": "oxfmt --check .",
"build": "pnpm run build:js && pnpm run build:types",
"prepare": "pnpm run build",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Prepare requires pnpm 🐞 Bug ☼ Reliability

The added prepare lifecycle script runs pnpm run build, so any install path that executes
prepare without pnpm on PATH (e.g., installing from a git ref via npm/yarn) will fail before the
package can be used. This is especially risky because the repo’s README documents installation via
npm and the package.json does not declare/enforce a package manager.
Agent Prompt
## Issue description
`prepare` is a package-manager lifecycle hook that can be executed by installers (not just pnpm). Defining it as `pnpm run build` introduces a hard dependency on a global `pnpm` binary, which can break installs when pnpm is unavailable.

## Issue Context
- `prepare` now shells out to pnpm.
- The README shows `npm install ueberdb2`, so npm usage is expected.
- The publish workflow explicitly calls out special handling when a package has a `prepare` script.

## Fix options (pick one)
1) **Remove pnpm dependency from lifecycle scripts (recommended):**
   - Update `build`, `build:js`, and `build:types` scripts to call local binaries directly (from `node_modules/.bin`), e.g. `rolldown -c ...` and `tsc ...`.
   - Set `prepare` to `npm run build` (or simply `run build`-equivalent) once `build` no longer calls pnpm.

2) **Ensure pnpm is always available when `prepare` runs:**
   - Add a `packageManager` field (pin to a chosen pnpm version) and change `prepare` to use Corepack (e.g., `corepack pnpm run build`) so pnpm can be provisioned even if not globally installed.

## Fix Focus Areas
- package.json[135-147]
- package.json[1-6]
- package.json[158-161]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

"build:js": "pnpm exec rolldown -c rolldown.config.mjs",
"build:types": "pnpm exec tsc --emitDeclarationOnly",
"test": "vitest --test-timeout=120000",
Expand Down
Loading