Fix package metadata and import paths in code-tree-graph - #37
Merged
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the code-tree-graph package configuration and fixes import path issues to improve package distribution and maintainability.
Key Changes
repositoryandhomepagefields to package.json pointing to the GitHub repositorytypesfirst, following best practices for TypeScript package exports@types/node,@types/react,@types/react-dom) and React packages as dev dependenciesfumadocs-coreto use a pattern that matches the package and all its subpath entries (e.g.,fumadocs-core/link)type-table.tsxfrom../../ui/collapsibleto../ui/collapsibleto match the actual directory structureNotable 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