fix(package): ajv/ajv-formats are runtime deps of the dspack-validate bin (0.4.1)#31
Merged
Merged
Conversation
… bin (0.4.1) Clean-install verification of the published 0.4.0 caught the bin crashing with ERR_MODULE_NOT_FOUND: the validator's ajv/ajv-formats imports lived in devDependencies, so every checkout test passed (npm ci installs devDeps) while every end-user install failed. Moved to dependencies; repository/homepage/bugs metadata added; version 0.4.1. Both workflows gain a pack-and-install boundary step that installs the packed tarball into an empty project and runs the bin as an end user would — the guard this defect class needs. Co-Authored-By: Claude Fable 5 <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a published-package runtime crash for the dspack-validate bin by ensuring its validator dependencies are installed for end users (not just in dev checkouts), and adds CI coverage for the “packed tarball installed into an empty project” boundary.
Changes:
- Move
ajvandajv-formatsfromdevDependenciestodependenciesand bump version to0.4.1. - Add package metadata (
repository,homepage,bugs) for published-package discoverability. - Add “pack-and-install boundary” steps to CI validation and release workflows to exercise the real install surface.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| package.json | Bumps version, moves validator runtime deps to dependencies, and adds package metadata. |
| package-lock.json | Updates lock to reflect runtime deps and current package version. |
| .github/workflows/validate.yml | Adds a packed-tarball install test to catch runtime dependency/bin packaging regressions. |
| .github/workflows/release.yml | Adds the same packed-tarball install test before publishing. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| dir="$(mktemp -d)" | ||
| cd "$dir" && npm init -y >/dev/null | ||
| npm install "$tarball" | ||
| npx dspack-validate --file node_modules/@aestheticfunction/dspack-spec/examples/shadcn-ui.dspack.json |
| dir="$(mktemp -d)" | ||
| cd "$dir" && npm init -y >/dev/null | ||
| npm install "$tarball" | ||
| npx dspack-validate --file node_modules/@aestheticfunction/dspack-spec/examples/shadcn-ui.dspack.json |
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.
DX-3 publication verification caught this on the published 0.4.0:
npx dspack-validatecrashes on a clean install (ERR_MODULE_NOT_FOUND: ajv-formats) because the validator's runtime imports lived indevDependencies— invisible to every checkout-based test sincenpm ciinstalls devDeps.ajv+ajv-formats→dependencies; version 0.4.1;repository/homepage/bugsmetadata added (the published 0.4.0 had none).validate.ymlandrelease.yml: pack the tarball, install it into an empty project, run the bin as an end user would. The failing evidence is the published 0.4.0 itself; the step passes on this branch.v0.4.1after merge will publish via the now-registered trusted publisher (OIDC) — exercising it for real, as required.🤖 Generated with Claude Code