From c6ea56234f218943f6617373a4a9bd7abc0c7f07 Mon Sep 17 00:00:00 2001 From: Dazhan Date: Mon, 15 Jun 2026 15:39:46 +0800 Subject: [PATCH] fix: include dist in published package by dropping brace glob in files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `files` field used the `"{dist,src}"` brace-expansion pattern. pnpm 9 (used to publish 1.x) expanded it, but pnpm 10/11 no longer does, so the pattern matched nothing and the published 2.x tarballs shipped only LICENSE/package.json/README.md — no dist or src. The 2.0 rewrite bumped pnpm to 11.3.0, which is what surfaced the latent bug. Split the brace pattern into explicit "dist" and "src" entries, which pack correctly on every pnpm version. Verified `pnpm pack --dry-run` now includes dist/src/** and still excludes dist/test. Co-Authored-By: Claude Opus 4.8 (1M context) --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 241bd01..3db8525 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "./gen/*": "./dist/src/gen/*" }, "files": [ - "{dist,src}", + "dist", + "src", "!dist/test" ], "sideEffects": false,