Repository navigation
feat(harness): let glaze:inspect take a module inside an installed package - #118
Merged
Merged
Conversation
…ckage - glaze:inspect resolves a <theme> that is not a file as a package path, as tasty:styles --setup does: the package's exports, then the node_modules folders (#117). - The text header rounds the theme's hue and saturation; --json and the measuring module keep exact values. - @types/node is a dev dependency for the new tests; the library's tsconfig keeps Node types out. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Gr8S7G5oPdr674FRgPScx3
Contributor
📦 Snapshot releasePublished |
Merged
This branch was previously deployed
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
Fixes #117.
glaze:inspectresolves a<theme>that is not a file as a package path, astasty:styles --setupdoes: through the package'sexports, then by walking up thenode_modulesfolders for a file the exports do not list. It looks from the current folder, then fromHARNESSPM_PROJECT_DIR.#exportNamestill works after a package path, and a missing module gets an error that names it and the folder.--jsonand the public measuring module (@tenphi/glaze/harness/measure) keep exact values.Why
@tenphi/cookbookshipsharness/dev.harnesspm/theme.mjs, which exports a Cookbook site's palette as a Glaze theme. Its rule had to tell agentsglaze:inspect node_modules/@tenphi/cookbook/harness/dev.harnesspm/theme.mjs, which is wrong in a monorepo that hoists packages. Now it can sayglaze:inspect @tenphi/cookbook/harness/dev.harnesspm/theme.mjs(tenphi/cookbook#210).Changes
harness/dev.harnesspm/scripts/cli.mjs:resolveModule(), shared and tested.harness/dev.harnesspm/scripts/inspect.mjs: uses it; the usage text mentions package paths; the header rounds.harness/skills/glaze-theme/SKILL.mdandAGENTS.md: say thatglaze:inspecttakes a package path too.src/harness.test.ts: an exported path, a path the exports map does not list, a plain file,#exportName, and a missing module, in a temporary folder with a fake package.@types/nodeis now a dev dependency, for those tests.tsconfig.jsonsets"types": [], so Node types stay out of the library.Checks
pnpm typecheck,pnpm lint,pnpm format:check,pnpm test(880 pass),pnpm build,pnpm exec harnesspm check.Generated by Claude Code