Skip to content
Open
Show file tree
Hide file tree
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
11 changes: 11 additions & 0 deletions addon/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 0.1.12

### Bug fixes

- Fix Docker build failure with pnpm 11 (`ERR_PNPM_IGNORED_BUILDS`, #4): move the
dependency build-script allowlist from the no-longer-read `pnpm` field in
package.json to `allowBuilds` in `pnpm-workspace.yaml`
- Pin pnpm to major version 11 so future pnpm releases can't silently break the build
- Stop hiding pnpm install errors behind `2>/dev/null`; pick frozen vs regular
install based on whether a lockfile is present

## 0.1.11

### Improvements
Expand Down
13 changes: 10 additions & 3 deletions addon/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ ARG BUILD_FROM=ghcr.io/hassio-addons/base:20.0.1
# compile against the same Node.js version and musl libc.
FROM alpine:3.23 AS mcp-builder

# Pin the pnpm major version — pnpm 11 removed support for the "pnpm" field in
# package.json and renamed the build-script allowlist to allowBuilds in
# pnpm-workspace.yaml. An unpinned install broke this build once already (#4).
RUN apk add --no-cache nodejs npm git build-base python3 && \
npm install -g pnpm
npm install -g pnpm@11

WORKDIR /build

Expand All @@ -22,8 +25,12 @@ RUN git clone --depth 1 --branch "${DOCS_REF}" "${DOCS_REPO}" /tmp/repo && \
rm -rf /tmp/repo

# Install MCP server dependencies
COPY mcp-server/package.json mcp-server/pnpm-lock.yaml* ./mcp-server/
RUN cd mcp-server && pnpm install --frozen-lockfile 2>/dev/null || pnpm install
# pnpm-workspace.yaml carries the allowBuilds allowlist and must be present
# before install, or pnpm refuses to run dependency build scripts.
COPY mcp-server/package.json mcp-server/pnpm-workspace.yaml mcp-server/pnpm-lock.yaml* ./mcp-server/
RUN cd mcp-server && \
if [ -f pnpm-lock.yaml ]; then pnpm install --frozen-lockfile; \
else pnpm install; fi

# Copy MCP server source
COPY mcp-server/ ./mcp-server/
Expand Down
2 changes: 1 addition & 1 deletion addon/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Claude Code
version: 0.1.11
version: 0.1.12
slug: claude_code
description: AI coding assistant with full Home Assistant access
startup: services
Expand Down
13 changes: 13 additions & 0 deletions addon/mcp-server/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# pnpm >= 10.26 reads the dependency build-script allowlist from here; the
# "pnpm" field in package.json is no longer read as of pnpm 11.
# With strictDepBuilds (default true), every dependency that wants to run a
# build script must be listed explicitly or install fails with
# ERR_PNPM_IGNORED_BUILDS.
# Only better-sqlite3 needs its native build; the other four worked with their
# scripts skipped under pnpm 10, so keep them disabled.
allowBuilds:
better-sqlite3: true
esbuild: false
onnxruntime-node: false
protobufjs: false
sharp: false