Make the @logicsrc packages publishable - #134
Merged
Merged
Conversation
@logicsrc/opencontext could not be installed from npm. Three defects, each of
which alone breaks a published tarball:
1. opencontext depended on "@logicsrc/validators": "file:../validators". A
file: specifier is unresolvable for anyone installing from the registry, so
`npm install @logicsrc/opencontext` failed outright.
2. validators imported all 50 schemas by relative path across the repository
("../../schemas/schemas/*.json"). That resolves inside the monorepo and
escapes the package once published, so an installed validators could not
load a single schema. Now imported through @logicsrc/schemas package
exports, with a real dependency declared.
3. Three of those schemas — repo, pull-request, openprd-prd — had no entry in
the schemas exports map, so they were unreachable by package specifier.
Added; the map is now sorted so it stays readable as it grows.
validators also gained files/publishConfig/license so it publishes the same way
its siblings do.
Verified the way a stranger would: npm pack all three, install the tarballs
into a clean project outside the monorepo, and run the installed binary —
version, init, validate --strict (which exercises schema loading through the
package exports), and resolve --explain all succeed. Full workspace suite green.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ThreatCrush Security Scan80 finding(s) HIGH/CRITICAL: 9 | MEDIUM: 48 | LOW: 23
…and 30 more. Full results in the Security tab. Snippets are redacted; ThreatCrush never prints matched credential material. |
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.
@logicsrc/opencontextcould not be installed from npm. Found while attempting to publish after #132. (Replaces #133, which carried pre-squash history and so read as conflicted.)Three defects, each of which alone breaks a published tarball:
opencontexthad afile:dependency. It declared"@logicsrc/validators": "file:../validators". Afile:specifier is unresolvable for anyone installing from the registry, sonpm install @logicsrc/opencontextfailed outright.validatorsimported schemas by a path that escapes its own package. All 50 schemas came in via"../../schemas/schemas/*.json"— correct inside the monorepo, outside the tarball once published. An installed@logicsrc/validatorscould not load a single schema. Now imported through@logicsrc/schemaspackage exports, with a real dependency declared.Three schemas had no export entry.
repo,pull-request, andopenprd-prdwere unreachable by package specifier. Added. The exports map is now sorted so it stays readable as it grows.validatorsalso gainedfiles,publishConfig, andlicenseso it publishes the way its siblings do.Verification
Verified the way a stranger would, not just by building:
validate --strictis the important one: it loads every schema through the package exports, which is exactly the path that was broken.Full workspace test suite green.