feat: 1.0.0-release scaffolding — branch docs + /react /vue parity preview#338
Merged
jedrazb merged 8 commits into1.0.0-releasefrom May 4, 2026
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…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>
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>
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.
Summary
Two pieces of scaffolding for the long-living
1.0.0-releaseintegration 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, notmain. New PRs in scope for 1.0.0 (#245 Vue impl, follow-up fixes) target1.0.0-release. Hotfixes for shipped 0.x versions still go tomain. Documents the post-train cleanup (npm deprecate @eigenpal/docx-js-editor, resetbaseBranchtomain).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 for1.0.0-release./examples/parity/index.html/react/examples/vite/dist@eigenpal/docx-editor-react/vue/examples/vue/dist@eigenpal/docx-editor-vueReal 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 throughnode_modules→ the workspace's builtdist/— same module resolution a community member gets afternpm install.Plumbing changes:
examples/{vite,vue}/vite.config.ts— gate source aliases onUSE_PUBLISHED_PACKAGES; acceptVITE_BASE_PATHfor subroute mounting.examples/vite/package.json— fix bogus"@eigenpal/docx-editor-react": "^0.0.7"→workspace:*; adddocx-editor-core(it's imported directly fromApp.tsx).package.json— addexamples/viteandexamples/vueto bun workspaces so deps symlink.package.jsonscripts —build:parityorchestrates 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(powerslatest.docx-editor.devoffmain) 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:
1.0.0-release./bun run build:parityexamples/parity/distbun installnext.docx-editor.dev(or1-0-0-release.docx-editor.dev)Test plan
bun run typecheckclean across all packagesbun run build:parityproducesexamples/parity/dist/withindex.html,react/,vue//react/(uses workspacedist/, not source)/vue/(will swap to real impl after feat: add vue version of docx editor #245 lands)bunx serve examples/parity/distopens correctly athttp://localhost:3000