feat. refactor Proof SDK into standalone publishable packages#20
Open
tmchow wants to merge 53 commits intoEveryInc:mainfrom
Open
feat. refactor Proof SDK into standalone publishable packages#20tmchow wants to merge 53 commits intoEveryInc:mainfrom
tmchow wants to merge 53 commits intoEveryInc:mainfrom
Conversation
Author
|
@dshipper I realize how insane the changeset is given the line count, but it's a complete refactor to try to improve the overall architecture. I also realize it'll be easy to punt on this, so I won't be offended :) |
c1c64b4 to
e5bc00e
Compare
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.
Why
This PR completes the first pass of making the
@proof/*packages real standalone packages instead of thin monorepo aliases.Before this branch:
src/andserver/The goal here is to make the package boundaries honest and publishable.
The biggest architecture choice in this PR is
@proof/editor: instead of moving the entire browser runtime into the package, this branch narrows@proof/editorto reusable editor modules and keeps the app/web runtime out of the package surface.What Changed
1. Package-owned source now lives in the packages
The package directories now own the implementation for the reusable/public parts of:
@proof/core@proof/editor@proof/server@proof/sqliteThat includes moving the core marks/provenance code, the reusable editor plugins/schema/utilities, the server route/runtime modules, and the sqlite store contract under
packages/.The old root files under
src/andserver/are mostly compatibility shims now, so existing internal imports still work while the package boundaries become the source of truth.2. The package surfaces are explicit now
This branch adds explicit package exports and subpath exports instead of relying on broad re-export behavior.
Notable change:
@proof/editorno longer exports the old./editorbrowser runtime entrypointThat runtime is app/web-runtime code, not a clean reusable SDK module. Narrowing the package surface makes the package boundary more honest and avoids shipping a disguised application singleton as part of the editor SDK.
3. The non-core packages are now buildable/publishable
@proof/editor,@proof/server, and@proof/sqlitenow:dist/src/*.ts.d.tsfiles for the published exportsrepository,homepage,bugs,license,keywords,publishConfig)The workspace root stays
private.4. Package validation is part of the branch now
This branch adds package-focused verification instead of relying on the monorepo shape:
npm packThe packed-consumer test was tightened so it only links the dependencies actually declared by the packed
@proof/*packages. That means missing dependency declarations now fail in the test instead of being hidden by the repo root install.As part of manual local testing, this branch also fixes the local
/d/:slugshare-page wiring that was affected by the server extraction and adds regression coverage around that path.Review Guide
This is a large refactor, so the easiest way to review it is in this order:
package.jsonfiles andscripts/build-package.mjssrc/tests/*package*and related regression testspackages/doc-core/**packages/doc-editor/**./editorpackages/doc-server/**andpackages/doc-store-sqlite/**root
src/**andserver/**shimsTesting
Ran:
npm run buildnpm run test:packagesnpm run pack:packagesThis now covers built package outputs, package-name imports, packed external-consumer imports, and local share-page regressions uncovered during manual testing.
Out Of Scope / Follow-ups
This PR is about standalone package ownership and publishability, not root-app adoption.
Intentionally not included here:
@proof/serverpackage sizeKnown follow-up worth tracking:
@proof/serverpacks a large tarball because it includes bundled runtime code plus OG-share assets