Skip to content

fix(package): ajv/ajv-formats are runtime deps of the dspack-validate bin (0.4.1)#31

Merged
ryandmonk merged 1 commit into
mainfrom
fix/validate-cli-runtime-deps
Jul 23, 2026
Merged

fix(package): ajv/ajv-formats are runtime deps of the dspack-validate bin (0.4.1)#31
ryandmonk merged 1 commit into
mainfrom
fix/validate-cli-runtime-deps

Conversation

@ryandmonk

Copy link
Copy Markdown
Contributor

DX-3 publication verification caught this on the published 0.4.0: npx dspack-validate crashes on a clean install (ERR_MODULE_NOT_FOUND: ajv-formats) because the validator's runtime imports lived in devDependencies — invisible to every checkout-based test since npm ci installs devDeps.

  • ajv + ajv-formatsdependencies; version 0.4.1; repository/homepage/bugs metadata added (the published 0.4.0 had none).
  • Pack-and-install boundary step added to validate.yml and release.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.
  • Tagging v0.4.1 after merge will publish via the now-registered trusted publisher (OIDC) — exercising it for real, as required.

🤖 Generated with Claude Code

… 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 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 23, 2026 00:38
@ryandmonk
ryandmonk merged commit c58a97a into main Jul 23, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ajv and ajv-formats from devDependencies to dependencies and bump version to 0.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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants