From f8533a3b701b85195cd318ac292fb8ee97bc8fab Mon Sep 17 00:00:00 2001 From: JeremyDev87 Date: Sun, 5 Apr 2026 00:38:30 +0900 Subject: [PATCH] fix(plugin): finish namespaced slash-command migration in distributable package (#1335) Add namespace-manifest.json to package.json files array so it ships in the npm tarball. Add packaging verification tests to build.spec.ts. --- packages/claude-code-plugin/package.json | 1 + packages/claude-code-plugin/scripts/build.spec.ts | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/packages/claude-code-plugin/package.json b/packages/claude-code-plugin/package.json index 7104594c..80f2bea9 100644 --- a/packages/claude-code-plugin/package.json +++ b/packages/claude-code-plugin/package.json @@ -29,6 +29,7 @@ ".claude-plugin", ".mcp.json", "README.md", + "namespace-manifest.json", "scripts/postinstall.js", "hooks/", "commands/" diff --git a/packages/claude-code-plugin/scripts/build.spec.ts b/packages/claude-code-plugin/scripts/build.spec.ts index 38954c43..d29b6c92 100644 --- a/packages/claude-code-plugin/scripts/build.spec.ts +++ b/packages/claude-code-plugin/scripts/build.spec.ts @@ -254,4 +254,18 @@ describe('packaging integration', () => { expect(content).toContain('/codingbuddy:act'); expect(content).toContain('/codingbuddy:buddy'); }); + + it('package.json files array includes namespace-manifest.json', () => { + const pkgPath = path.join(pluginRoot, 'package.json'); + const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')); + expect(pkg.files).toContain('namespace-manifest.json'); + }); + + it('namespace-manifest.json is present after build', () => { + const manifestPath = path.join(pluginRoot, 'namespace-manifest.json'); + expect(fs.existsSync(manifestPath)).toBe(true); + const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8')); + expect(manifest.pluginName).toBe(PLUGIN_NAMESPACE); + expect(manifest.commands.length).toBeGreaterThanOrEqual(6); + }); });