Skip to content

fix: rebuild dist on prepack so publishes carry the bumped version - #32

Merged
pyramation merged 3 commits into
mainfrom
fix/publish-dist-manifests
Aug 22, 2026
Merged

fix: rebuild dist on prepack so publishes carry the bumped version#32
pyramation merged 3 commits into
mainfrom
fix/publish-dist-manifests

Conversation

@pyramation

@pyramation pyramation commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

One line per makage package, matching what every constructive-io/constructive package already does:

+"prepack": "npm run build"

That is why last night's lerna publish only landed the five @constructive-io/* packages. These six publish from dist, lerna version bumps only the source manifest, and nothing rebuilt dist — so npm got the pre-bump version number with the new code (blocks-schema@0.2.1 is really 0.3.0's code, blocks-renderer@0.1.2 is really 0.2.0's) and json-renderer failed outright because its dist still said 0.0.1. The same missing rebuild is why "json-renderer": "workspace:^" reached npm: lerna resolves workspace ranges in the source manifest, and prepack is what copies that resolved manifest into dist. @constructive-io/cli publishes with ^5.18.3 deps for exactly this reason.

json-renderer@0.1.0 and the other five bumped versions are still unpublished and now publish correctly. blocks-schema@0.2.1 and blocks-renderer@0.1.1/0.1.2 are immutable and carry workspace: deps — worth npm deprecate-ing once the good versions are out.

pnpm check passes.

Link to Devin session: https://app.devin.ai/sessions/027937d092794c92a31c6ee49c513f59
Requested by: @pyramation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@tenki-reviewer

tenki-reviewer Bot commented Aug 22, 2026

Copy link
Copy Markdown

Review complete. No issues found — approved ✅.


This PR wires up the makage dist-layout publishing flow for the six packages on the publish-from-dist layout. It adds prepack: pnpm build hooks to the source manifests, introduces scripts/resolve-dist-workspace-deps.mjs to rewrite workspace: ranges in the copied dist/package.json, adds scripts/check-dist-manifests.ts as a gate that verifies each package's dist/package.json matches its source manifest and enforces the publishConfig.directory invariant, and documents the release process in docs/RELEASING.md.

Files Change
package.json, packages/*/package.json (6 makage packages) Adds prepack build hooks and check:dist-manifests to the check gate
scripts/resolve-dist-workspace-deps.mjs New resolver that copies source manifests to dist/ and rewrites workspace: protocol ranges
scripts/check-dist-manifests.ts New gate validating dist manifest consistency and publish directory invariant
docs/RELEASING.md Documents the makage dist-layout build and publish sequence

No high-confidence defects were found; two low-confidence observations (unguarded source manifest read, and the published tarball shipping the prepack hook) fell below the confidence threshold and are not reported as findings.

Reviewed commit: fa71044

@devin-ai-integration devin-ai-integration Bot changed the title fix: make dist manifests publishable with npm/lerna fix: rebuild dist on prepack so publishes carry the bumped version Aug 22, 2026
Resolve workspace: ranges into real semver in dist/package.json, rebuild dist on prepack, and guard both properties with pnpm check:dist-manifests.
@devin-ai-integration
devin-ai-integration Bot force-pushed the fix/publish-dist-manifests branch from 4e84d3b to bce4819 Compare August 22, 2026 03:23
@pyramation
pyramation merged commit eab57b9 into main Aug 22, 2026
6 checks passed
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.

1 participant