Skip to content

Fix package metadata and import paths in code-tree-graph - #37

Merged
github-actions[bot] merged 1 commit into
masterfrom
claude/npm-publish-failure-04u5wm
Jul 20, 2026
Merged

Fix package metadata and import paths in code-tree-graph#37
github-actions[bot] merged 1 commit into
masterfrom
claude/npm-publish-failure-04u5wm

Conversation

@vtempest

Copy link
Copy Markdown
Collaborator

Summary

This PR updates the code-tree-graph package configuration and fixes import path issues to improve package distribution and maintainability.

Key Changes

  • Package metadata: Added repository and homepage fields to package.json pointing to the GitHub repository
  • Export configuration: Reordered the exports field to list types first, following best practices for TypeScript package exports
  • Dev dependencies: Added missing type definitions (@types/node, @types/react, @types/react-dom) and React packages as dev dependencies
  • Vite configuration: Updated the external dependencies regex for fumadocs-core to use a pattern that matches the package and all its subpath entries (e.g., fumadocs-core/link)
  • Import path fix: Corrected relative import path in type-table.tsx from ../../ui/collapsible to ../ui/collapsible to match the actual directory structure

Notable Details

The fumadocs-core external dependency change from a string to a regex pattern (/^fumadocs-core(\/.*)?$/) ensures that both the main package and any subpath imports are properly externalized during the build process, preventing bundling issues.

https://claude.ai/code/session_01KNjvnNcghG78Fuqczaxppi

The npm-publish workflow failed for code-tree-graph with two root causes,
and the package had never actually shipped its dist (published 0.1.8
contained only README + package.json).

Fixes:
- vite.config: externalize fumadocs-core subpaths (e.g. fumadocs-core/link)
  via regex; the exact-string external only matched the bare package, so
  the type-table.tsx import 'fumadocs-core/link' failed to resolve at build.
- type-table.tsx: correct the collapsible import path from '../../ui/...'
  (package root, no ui dir) to '../ui/collapsible' to match sibling files.
- package.json: add repository/homepage fields so npm provenance can match
  the source repo (E422: repository.url was ""); reorder exports so the
  types condition resolves first.
- package.json: add @types/react, @types/react-dom, @types/node, react and
  react-dom devDependencies so the dts rollup can follow React/node symbols.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KNjvnNcghG78Fuqczaxppi
@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app-demo Building Building Preview, Comment Jul 20, 2026 11:41pm
appdemo-dev-tools Error Error Jul 20, 2026 11:41pm
appdemo-dev-tools-9bf9 Error Error Jul 20, 2026 11:41pm
appdemo-dev-tools-9bhw Error Error Jul 20, 2026 11:41pm
appdemo-dev-tools-a54o Error Error Jul 20, 2026 11:41pm
appdemo-dev-tools-hxgy Error Error Jul 20, 2026 11:41pm
appdemo-dev-tools-qz8y Error Error Jul 20, 2026 11:41pm
cccp-deployment Building Building Preview, Comment Jul 20, 2026 11:41pm

@github-actions
github-actions Bot merged commit b035044 into master Jul 20, 2026
3 of 13 checks passed
@vtempest
vtempest deleted the claude/npm-publish-failure-04u5wm branch July 26, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants