fix: resolve LICENSE and FOOTER.md from workspace root instead of hardcoded ../../#3
Merged
pyramation merged 2 commits intomainfrom Feb 7, 2026
Merged
Conversation
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
fix: resolve LICENSE and FOOTER.md from workspace root dynamically
Summary
Replaces hardcoded
../../LICENSEand../../FOOTER.mdrelative paths inrunAssetsandcopyReadmeWithFooterwith dynamic workspace root resolution. Packages at any nesting depth within a monorepo now resolve these files correctly, and missing files are skipped gracefully instead of crashing the build.A new
workspace.tsmodule provides two utilities:findWorkspaceRoot(from)— walks up fromfromlooking forpnpm-workspace.yaml,lerna.json, orpackage.jsonwithworkspacesfindRootFile(filename, from)— resolves a file relative to the workspace rootBoth are exported from the package index for downstream use.
runAssetscallsfindWorkspaceRootonce, then resolves bothLICENSEandFOOTER.mdagainst the discovered root via a localresolveRootFilehelper.Review & Testing Checklist for Human
findWorkspaceRootorfindRootFile. The core new logic has zero test coverage. Walk-up termination, marker priority, filesystem boundary, and the access-then-read pattern are all untested. Consider adding aworkspace.test.ts.pnpm-workspace.yaml/lerna.json/workspacesfield),findRootFilereturnsnulland LICENSE is silently skipped. The old../../LICENSEat least had a chance of working for flat repos. Decide if this is acceptable or if a fallback is needed.catch {}blocks inworkspace.tsswallow all errors (not just ENOENT). Permission errors on directories during the walk would be silently ignored.makage buildfrom a package nested 3+ levels deep in a pnpm workspace and verify LICENSE and FOOTER.md are correctly resolved. Also run from a standalone (non-workspace) package to verify the skip behavior is acceptable.Notes
uploads/etag-hashin theconstructivemonorepo was failing withENOENT: no such file or directory, copyfile '../../LICENSE' -> 'dist/LICENSE'because the package isn't exactly 2 levels deep from the workspace root.--footerflag onmakage copystill works but now usesfindRootFileinternally instead of hardcoded../../FOOTER.md.makage build/makage assetsCLI syntax is unchanged.Link to Devin run: https://app.devin.ai/sessions/a93d427c49214dce877d1fedee950c04
Requested by: @pyramation