chore: remove patch references
This commit is contained in:
@@ -365,7 +365,7 @@ clawdbot channels login
|
|||||||
### npm install fails (allow-build-scripts / missing tar or yargs). What now?
|
### npm install fails (allow-build-scripts / missing tar or yargs). What now?
|
||||||
|
|
||||||
If you’re running from source, use the repo’s package manager: **pnpm** (preferred).
|
If you’re running from source, use the repo’s package manager: **pnpm** (preferred).
|
||||||
The repo declares `packageManager: "pnpm@…"`, and pnpm patches are tracked in `pnpm.patchedDependencies`.
|
The repo declares `packageManager: "pnpm@…"`.
|
||||||
|
|
||||||
Typical recovery:
|
Typical recovery:
|
||||||
```bash
|
```bash
|
||||||
@@ -376,8 +376,7 @@ pnpm clawdbot doctor
|
|||||||
clawdbot daemon restart
|
clawdbot daemon restart
|
||||||
```
|
```
|
||||||
|
|
||||||
Why: pnpm is the configured package manager for this repo, and the dependency
|
Why: pnpm is the configured package manager for this repo.
|
||||||
patching workflow relies on it.
|
|
||||||
|
|
||||||
### How do I switch between git installs and npm installs?
|
### How do I switch between git installs and npm installs?
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
summary: "Bun workflow (experimental): installs, patches, and gotchas vs pnpm"
|
summary: "Bun workflow (experimental): installs and gotchas vs pnpm"
|
||||||
read_when:
|
read_when:
|
||||||
- You want the fastest local dev loop (bun + watch)
|
- You want the fastest local dev loop (bun + watch)
|
||||||
- You hit Bun install/patch/lifecycle script issues
|
- You hit Bun install/patch/lifecycle script issues
|
||||||
@@ -8,7 +8,7 @@ read_when:
|
|||||||
# Bun (experimental)
|
# Bun (experimental)
|
||||||
|
|
||||||
Goal: run this repo with **Bun** (optional, not recommended for WhatsApp/Telegram)
|
Goal: run this repo with **Bun** (optional, not recommended for WhatsApp/Telegram)
|
||||||
without losing pnpm patch behavior.
|
without diverging from pnpm workflows.
|
||||||
|
|
||||||
⚠️ **Not recommended for Gateway runtime** (WhatsApp/Telegram bugs). Use Node for production.
|
⚠️ **Not recommended for Gateway runtime** (WhatsApp/Telegram bugs). Use Node for production.
|
||||||
|
|
||||||
@@ -39,20 +39,6 @@ bun run build
|
|||||||
bun run vitest run
|
bun run vitest run
|
||||||
```
|
```
|
||||||
|
|
||||||
## pnpm patchedDependencies under Bun
|
|
||||||
|
|
||||||
pnpm supports `package.json#pnpm.patchedDependencies` and records it in `pnpm-lock.yaml`.
|
|
||||||
Bun (and npm/yarn) do not support pnpm patches, so we apply them in `postinstall` when pnpm is **not** the installer:
|
|
||||||
|
|
||||||
- [`scripts/postinstall.js`](https://github.com/clawdbot/clawdbot/blob/main/scripts/postinstall.js) detects the package manager via `npm_config_user_agent` and applies every entry from `package.json#pnpm.patchedDependencies` into `node_modules/...` using a built-in JS patcher (no `git`/system `patch` dependency).
|
|
||||||
- Under pnpm, this fallback is skipped because pnpm already applies `patchedDependencies` itself.
|
|
||||||
|
|
||||||
To add a new patch that works in both pnpm + Bun:
|
|
||||||
|
|
||||||
1. Add an entry to `package.json#pnpm.patchedDependencies`
|
|
||||||
2. Add the patch file under `patches/`
|
|
||||||
3. Run `pnpm install` (updates `pnpm-lock.yaml` patch hash)
|
|
||||||
|
|
||||||
## Bun lifecycle scripts (blocked by default)
|
## Bun lifecycle scripts (blocked by default)
|
||||||
|
|
||||||
Bun may block dependency lifecycle scripts unless explicitly trusted (`bun pm untrusted` / `bun pm trust`).
|
Bun may block dependency lifecycle scripts unless explicitly trusted (`bun pm untrusted` / `bun pm trust`).
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ WORKDIR /app
|
|||||||
# Cache dependencies unless package metadata changes
|
# Cache dependencies unless package metadata changes
|
||||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
|
||||||
COPY ui/package.json ./ui/package.json
|
COPY ui/package.json ./ui/package.json
|
||||||
COPY patches ./patches
|
|
||||||
COPY scripts ./scripts
|
COPY scripts ./scripts
|
||||||
|
|
||||||
RUN pnpm install --frozen-lockfile
|
RUN pnpm install --frozen-lockfile
|
||||||
|
|||||||
@@ -71,9 +71,3 @@ Help:
|
|||||||
```bash
|
```bash
|
||||||
curl -fsSL https://clawd.bot/install-cli.sh | bash -s -- --help
|
curl -fsSL https://clawd.bot/install-cli.sh | bash -s -- --help
|
||||||
```
|
```
|
||||||
|
|
||||||
## Patches (npm / pnpm / bun)
|
|
||||||
|
|
||||||
Clawdbot’s `postinstall` script includes a builtin JS patcher that can apply `pnpm.patchedDependencies` patches even when the package manager doesn’t support them (notably Bun). pnpm itself already applies `pnpm.patchedDependencies`, so the fallback skips pnpm installs to avoid double-applying.
|
|
||||||
|
|
||||||
See: [Bun notes](/install/bun).
|
|
||||||
|
|||||||
@@ -241,7 +241,6 @@ RUN curl -L https://github.com/steipete/wacli/releases/latest/download/wacli_Lin
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
|
||||||
COPY ui/package.json ./ui/package.json
|
COPY ui/package.json ./ui/package.json
|
||||||
COPY patches ./patches
|
|
||||||
COPY scripts ./scripts
|
COPY scripts ./scripts
|
||||||
|
|
||||||
RUN corepack enable
|
RUN corepack enable
|
||||||
|
|||||||
@@ -47,7 +47,6 @@
|
|||||||
"README-header.png",
|
"README-header.png",
|
||||||
"CHANGELOG.md",
|
"CHANGELOG.md",
|
||||||
"LICENSE",
|
"LICENSE",
|
||||||
"patches/**",
|
|
||||||
"scripts/postinstall.js",
|
"scripts/postinstall.js",
|
||||||
"dist/terminal/**",
|
"dist/terminal/**",
|
||||||
"dist/routing/**",
|
"dist/routing/**",
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ RUN apt-get update \
|
|||||||
|
|
||||||
WORKDIR /repo
|
WORKDIR /repo
|
||||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||||
COPY patches ./patches
|
|
||||||
COPY scripts/postinstall.js ./scripts/postinstall.js
|
COPY scripts/postinstall.js ./scripts/postinstall.js
|
||||||
RUN corepack enable \
|
RUN corepack enable \
|
||||||
&& pnpm install --frozen-lockfile
|
&& pnpm install --frozen-lockfile
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ WORKDIR /app
|
|||||||
ENV NODE_OPTIONS="--disable-warning=ExperimentalWarning"
|
ENV NODE_OPTIONS="--disable-warning=ExperimentalWarning"
|
||||||
|
|
||||||
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.json vitest.config.ts ./
|
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml tsconfig.json vitest.config.ts ./
|
||||||
COPY patches ./patches
|
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
COPY scripts ./scripts
|
COPY scripts ./scripts
|
||||||
COPY docs ./docs
|
COPY docs ./docs
|
||||||
|
|||||||
Reference in New Issue
Block a user