Skip to content

feat: 1.0.0-release scaffolding — branch docs + /react /vue parity preview#338

Merged
jedrazb merged 8 commits into1.0.0-releasefrom
chore/document-1.0.0-release-branch
May 4, 2026
Merged

feat: 1.0.0-release scaffolding — branch docs + /react /vue parity preview#338
jedrazb merged 8 commits into1.0.0-releasefrom
chore/document-1.0.0-release-branch

Conversation

@jedrazb
Copy link
Copy Markdown
Contributor

@jedrazb jedrazb commented May 4, 2026

Summary

Two pieces of scaffolding for the long-living 1.0.0-release integration branch.

1. Branch documentation

CLAUDE.md gains a top-of-file section explaining that the 1.0.0 unified rename is being assembled on 1.0.0-release, not main. New PRs in scope for 1.0.0 (#245 Vue impl, follow-up fixes) target 1.0.0-release. Hotfixes for shipped 0.x versions still go to main. Documents the post-train cleanup (npm deprecate @eigenpal/docx-js-editor, reset baseBranch to main).

2. /react /vue parity preview

A new examples/parity/ deployment lets community members verify React and Vue parity side by side on a single Vercel project for 1.0.0-release.

Path Source Adapter
/ examples/parity/index.html landing page, two iframes side by side
/react/ examples/vite/dist @eigenpal/docx-editor-react
/vue/ examples/vue/dist @eigenpal/docx-editor-vue

Real installed experience, not source-aliased dev mode. Both apps build with USE_PUBLISHED_PACKAGES=1, which makes their vite configs skip the workspace source aliases. Vite then resolves the @eigenpal/* package names through node_modules → the workspace's built dist/ — same module resolution a community member gets after npm install.

Plumbing changes:

  • examples/{vite,vue}/vite.config.ts — gate source aliases on USE_PUBLISHED_PACKAGES; accept VITE_BASE_PATH for subroute mounting.
  • examples/vite/package.json — fix bogus "@eigenpal/docx-editor-react": "^0.0.7"workspace:*; add docx-editor-core (it's imported directly from App.tsx).
  • root package.json — add examples/vite and examples/vue to bun workspaces so deps symlink.
  • root package.json scripts — build:parity orchestrates root build → react example → vue example → assemble.
  • examples/parity/index.html — landing page with side-by-side iframes, responsive single-column at <900px.
  • examples/parity/README.md — how to set up the new Vercel project (root dir, build command, output dir, branch alias).

Existing root vercel.json (powers latest.docx-editor.dev off main) is untouched. The 1.0.0-release deployment is a separate Vercel project the maintainer configures via dashboard.

Vercel project setup (manual, after merge)

In a new Vercel project alongside the existing one:

  • Production Branch: 1.0.0-release
  • Root Directory: ./
  • Build Command: bun run build:parity
  • Output Directory: examples/parity/dist
  • Install Command: bun install
  • Framework Preset: Other
  • Custom Domain: next.docx-editor.dev (or 1-0-0-release.docx-editor.dev)

Test plan

  • bun run typecheck clean across all packages
  • bun run build:parity produces examples/parity/dist/ with index.html, react/, vue/
  • React app renders the demo at /react/ (uses workspace dist/, not source)
  • Vue app renders the stub at /vue/ (will swap to real impl after feat: add vue version of docx editor #245 lands)
  • Local preview via bunx serve examples/parity/dist opens correctly at http://localhost:3000
  • After merge: configure Vercel project, verify deploy at custom domain

Adds a top-of-file section in CLAUDE.md so future contributors (and
agents) know that 1.0.0-related work targets the long-living
1.0.0-release branch, not main. Lists what has merged so far (#337),
what is still pending (#245), and the post-train cleanup (npm deprecate,
reset baseBranch back to main).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docx-editor Ready Ready Preview, Comment May 4, 2026 10:20am

Request Review

…Vercel deploy

Adds a single deployment that mounts both example apps at distinct routes
so community members can verify React and Vue parity side by side.

  /         landing page with two iframes (React left, Vue right)
  /react/   examples/vite — @eigenpal/docx-editor-react
  /vue/     examples/vue  — @eigenpal/docx-editor-vue

Both apps build with USE_PUBLISHED_PACKAGES=1, which makes their vite
configs skip the workspace source aliases. Vite then resolves the
@eigenpal/* package names through node_modules → the workspace's
built dist/ — the same module resolution a community member gets after
\`npm install\`. So the deployment is the real installed experience,
not the dev-mode source-aliased one.

Plumbing:
- examples/{vite,vue}/vite.config.ts: gate the source-alias array on
  USE_PUBLISHED_PACKAGES, accept VITE_BASE_PATH for subroute mounting.
- examples/vite/package.json: switch dep on docx-editor-react from a
  bogus "^0.0.7" to workspace:*, add docx-editor-core (it's imported
  directly from the demo's App.tsx).
- root package.json: include examples/vite and examples/vue in the
  bun workspaces array so deps actually symlink.
- root package.json scripts: build:parity orchestrates root build →
  react example → vue example → assemble into examples/parity/dist/.
- examples/parity/index.html: landing page with side-by-side iframes,
  responsive single-column at <900px width.
- examples/parity/README.md: how to set up the new Vercel project
  (root dir, build command, output dir, branch alias).

The existing root vercel.json (latest.docx-editor.dev off main) is
untouched — the 1.0.0-release deployment is a separate Vercel project
that the maintainer configures via dashboard.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jedrazb jedrazb changed the title docs: document 1.0.0-release as the active integration branch feat: 1.0.0-release scaffolding — branch docs + /react /vue parity preview May 4, 2026
Updates root vercel.json so any Vercel project pointed at this repo
gets the /react /vue parity preview without dashboard overrides:
- buildCommand: bun run build:parity
- outputDirectory: examples/parity/dist
- rewrites: SPA fallbacks for /react/* and /vue/* plus the landing
  page fallback at /.
- framework: null (build command handles it).

This applies to:
- The existing latest.docx-editor.dev project (deploys off main) — on
  its next deploy after this lands, / will show the side-by-side
  comparison and /react/ /vue/ give the standalone experiences.
- The new 1.0.0-release Vercel project — no manual settings needed,
  just point at the repo and assign the custom domain.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…X polish

Round 3 of reviews surfaced one blocker, two bugs, and several DX
improvements. Applying the in-scope ones.

BLOCKER
- examples/vite/src/App.tsx:233 — fetch('/docx-editor-demo.docx') is an
  absolute path, which under the parity build at /react/ falls through
  to the catchall rewrite and returns the landing HTML. The .catch
  branch then silently created an empty document. Switched to
  \`fetch(\${import.meta.env.BASE_URL}docx-editor-demo.docx)\` so vite
  rewrites the path correctly for any base.

BUGS
- examples/vue/src/App.vue:6 — pre-rename package name in the visible
  copy. Updated to @eigenpal/docx-editor-core.
- examples/vite/vercel.json — stale, never consulted at the repo root,
  but a footgun if a Vercel project is ever pointed at examples/vite as
  Root Directory. Deleted.

DX polish (parity landing)
- Added a banner above the iframes explaining Vue is in active
  development (#245) so first-time visitors don't think the package is
  half-broken when the Vue pane shows a placeholder.
- Added GitHub link + npm install snippet to the header so the landing
  page actually exits to docs / install / repo.
- Mobile layout: capped each pane at 60vh instead of stacking 200vh
  total — both labels visible at once, scroll inside iframe instead of
  the page.
- Dropped redundant <span> wrappers in <h2> and the loading="eager"
  default on <iframe>.

Code quality
- Normalized USE_PUBLISHED_PACKAGES check from === '1' to === 'true' in
  both vite configs to match the existing ENABLE_FRAMEWORK_SWITCHER
  convention. Also updated the build:parity:* scripts.
- Dropped redundant fields from vercel.json: installCommand (auto from
  bun.lock) and framework: null (omit-key equivalent in fresh config).

Contributor DX
- Added bun run dev:parity script: builds + serves the parity output on
  port 4173 in one command. Without this, contributors had to memorize
  the build + serve incantation.
- examples/parity/README.md: added a "Why this exists" section
  explaining the dev/parity build divergence and what the deployment is
  proving (real installed bytes, not source-aliased dev mode).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…k toggle

Side-by-side iframes felt cramped, especially on the React side where
the editor toolbar already eats horizontal space. Replaced with a
single full-width iframe and a React/Vue toggle in the header.

  Header: [docx-editor] [React | Vue] npm install ... GitHub ↗ Fullscreen ↗
  Body:   <iframe> takes the rest of the viewport

Switcher behavior:
- Default: React. ?framework=vue in the URL switches to Vue at load.
- Clicking either tab swaps the iframe src and updates the install snippet,
  the fullscreen link target, and the URL (replaceState — no scroll
  jump).
- The Vue stub banner is gated to only show when the Vue tab is active —
  no warning noise for visitors who never click Vue.

The /react/ and /vue/ routes still serve the standalone fullscreen
experiences; only the landing page changed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…'s toolbar

You were right — having both /react /vue routes AND a ?framework= URL
param on / was redundant. Cleanup:

- Delete examples/parity/index.html (the landing iframe wrapper).
- vercel.json: / now 307-redirects to /react/. Bookmark whichever
  adapter you want.
- examples/shared/AdapterSwitcher.tsx — small React pill, two anchor
  tags pointing at /react/ and /vue/. Drop-in alongside the existing
  ExampleSwitcher in examples/vite/src/App.tsx.
- examples/vue/src/App.vue — same pill as plain HTML/CSS so the stub
  has it too. When PR #245 lands, the real Vue editor inherits the
  pattern.

Each adapter now owns the full viewport. Switcher is just navigation —
no iframe, no param, canonical URLs, bookmarkable.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The 1.0.0-release deploy failed because Vercel's cached .bun/ store
held both prosemirror-transform@1.11.0 (from a pre-PR lockfile) and
1.12.0 (current). DTS build for @eigenpal/docx-editor-core saw two
incompatible Mapping types and crashed with TS2322.

Adding installCommand: 'bun install --frozen-lockfile' forces Vercel
to match the committed lockfile exactly. New version drift = build
fails fast at install rather than producing a confusing type error
mid-build. (Maintainer needs to clear Vercel build cache once for
this PR's deploy.)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The 1.0.0-release Vercel build kept failing because a stale 1.11.0
slipped into Vercel's .bun/ store next to 1.12.0, and tsup's dts gen
pulled types from the older one — TS2322 on TableExtension.ts:2330
because Mapping has private '_maps' that diverges between minor
versions of prosemirror-transform.

Root cause: peer/dev constraint was ^1.10.2, satisfied by both 1.11.0
and 1.12.0. The root overrides force 1.12.0 in the lockfile but Vercel's
resolver evidently picks something different for transitive deps.

Bumping the constraint to ^1.12.0 in packages/core and packages/react
removes the ambiguity at the package level — every resolver, on any
platform, must land on >=1.12.0. The override stays for belt-and-braces.

Also confirmed the lockfile only carries 1.12.0 after re-resolve.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jedrazb jedrazb merged commit 80d49c5 into 1.0.0-release May 4, 2026
2 checks passed
@jedrazb jedrazb deleted the chore/document-1.0.0-release-branch branch May 4, 2026 10:26
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