feat!: rename packages and prepare 1.0.0 restructure#337
Merged
jedrazb merged 5 commits into1.0.0-releasefrom May 4, 2026
Merged
feat!: rename packages and prepare 1.0.0 restructure#337jedrazb merged 5 commits into1.0.0-releasefrom
jedrazb merged 5 commits into1.0.0-releasefrom
Conversation
Renames the npm packages to a unified `docx-editor-*` naming and ships the framework-agnostic core publicly: - `@eigenpal/docx-js-editor` → `@eigenpal/docx-editor-react` - `@eigenpal/docx-core` → `@eigenpal/docx-editor-core` (now public) - `@eigenpal/docx-editor-vue` stays private until #245 lands its build - `@eigenpal/docx-editor-agents` unchanged Adds `packages/react-legacy-shim/` as a thin re-export of `docx-editor-react` published under the old `docx-js-editor` name so existing installs keep working without code changes. The shim is in the changesets fixed group with `docx-editor-react` and `docx-editor-agents` so versions stay in lockstep. Note: changesets cannot auto-bump from `0.x` to `1.0.0`; the maintainer needs to edit each `package.json` `version` to `1.0.0` inside the auto-opened release PR before merging. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Restore historical CHANGELOG entries for `packages/react/` and
`packages/agent-use/` — past releases really did publish under the
old `@eigenpal/docx-js-editor` / `@eigenpal/docx-core` names; rewriting
the history would mislead anyone debugging an old install.
- Fix vite alias regex in `examples/{vite,vue,collaboration}/vite.config.ts`
— bulk sed missed the regex bodies (`/^@eigenpal\/docx-core\/(.+)/`).
- Fix shim's `./styles.css` and `./i18n/*.json` exports. The previous
paths into `./node_modules/@eigenpal/docx-editor-react/...` would not
resolve post-publish (npm hoists the dep, and `node_modules` doesn't
ship in the tarball). Now copies the assets into the shim's own
`dist/styles.css` and `i18n/` at build time via `scripts/copy-assets.mjs`.
- Simplify shim's tsup `external` to a single regex.
- Drop the manual-version-bump caveat from the changeset entry — `major`
on `0.4.1` produces `1.0.0` automatically per semver.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Drop \`private: true\` from \`packages/vue/package.json\` so it ships at 1.0.0 with the rest. Add a minimal \`tsup.config.ts\` so the existing stub (\`src/index.ts\`) builds; #245 will replace the stub with the real implementation when it merges into \`1.0.0-release\`. - Extend the changeset \`fixed\` group to all five packages (\`docx-editor-react\`, \`docx-editor-core\`, \`docx-editor-agents\`, \`docx-editor-vue\`, \`docx-js-editor\`) and clear \`ignore\`. - List every package explicitly in the 1.0.0 changeset entry so the changelog spells out the bump per-package. - Add \`docx-editor-vue\` to the root build pipeline. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ze build - `packages/react-legacy-shim/package.json`: change `sideEffects: false` to `["*.css"]`. The shim re-exports `./styles.css`, but webpack/esbuild tree-shake unused side-effects when the package declares none. Match the upstream `@eigenpal/docx-editor-react` declaration so consumers doing `import '@eigenpal/docx-js-editor/styles.css'` actually get the styles emitted. - `packages/react-legacy-shim/scripts/copy-assets.mjs`: rmSync the destination i18n dir before cpSync. Without this, `cpSync` with `recursive: true` merges into the existing dir, so a locale removed upstream still ships from a stale prior build. - root `package.json` build pipeline: split the middle group so only react gates downstream. Now `core → react → (agents ∥ vue ∥ shim)` — agents and vue don't depend on react, but the shim's copy-assets does, so the shim still waits. Cuts the critical path by one tsup run. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- packages/vue/package.json: prefix description with [STUB] so the npm page warns Vue users that renderAsync is not yet implemented. Without this, a 1.0.0 version number is the loudest possible "production-ready" signal and the package can't back it up until #245 lands. - README.md: flag vue as "stub at 1.0.0, not yet functional" in the packages table; add the prosemirror peer-deps install line under Quick Start for strict installers (pnpm / npm 6 / auto-install-peers off). - packages/react-legacy-shim/README.md: replace vague "foreseeable future" wording with a concrete commitment ("ships in lockstep for the entire 1.x line; plan to migrate before 2.0.0"). - .changeset/1-0-0-package-restructure.md: spell out that vue is a runtime-throwing stub at 1.0.0 — the per-package CHANGELOG that lands on npm now tells the truth. - CLAUDE.md: document the post-publish `npm deprecate @eigenpal/docx-js-editor` step so first-wave 1.0.0 installs get a migration banner. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
jedrazb
added a commit
that referenced
this pull request
May 4, 2026
…eview (#338) * docs: document 1.0.0-release as the active integration branch 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> * feat(examples): add /react /vue parity preview for the 1.0.0-release 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> * chore(vercel): make parity build the default for all deployments 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> * fix(parity): resolve review findings — fetch base path, stale refs, DX 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> * feat(parity): switch from side-by-side to single-column with framework 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> * refactor(parity): drop landing wrapper, switcher lives in each editor'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> * fix(vercel): pin install to lockfile so cached node_modules can't drift 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> * fix(deps): tighten prosemirror-transform peer/dev to ^1.12.0 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> --------- 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
Unified 1.0.0 rename. All five packages ship under matching versions in a single coordinated release. Targets the long-living
1.0.0-releasebranch — PR #245 (Vue impl) lands separately into the same branch before this whole train merges tomain.@eigenpal/docx-js-editor@eigenpal/docx-editor-react@eigenpal/docx-core@eigenpal/docx-editor-core@eigenpal/docx-editor-agents@eigenpal/docx-editor-vueWhat changed
@eigenpal/docx-core→@eigenpal/docx-editor-core,@eigenpal/docx-js-editor→@eigenpal/docx-editor-react).packages/coreandpackages/vueflipped fromprivate: trueto public-publishable.packages/react-legacy-shim/— publishes under the old@eigenpal/docx-js-editorname, pure re-export of@eigenpal/docx-editor-react. Existing installs keep working with no code changes.scripts/copy-assets.mjscopiesstyles.cssandi18n/*.jsonfrom upstream into the shim's own tarball at build time so subpath imports (/styles.css,/i18n/de.json) resolve post-publish.sideEffects: ["*.css"]so bundlers don't tree-shake the CSS away.tsupexternals collapsed to one regex.packages/vue/tsup.config.tsadded so the existing stub builds; feat: add vue version of docx editor #245 will replace the stub..changeset/config.json:fixedgroup now contains all 5 packages,ignorecleared,baseBranchset to1.0.0-release.buildpipeline:core → react → (agents ∥ vue ∥ shim).examples/{vite,vue,collaboration}/vite.config.tsthat the bulk sed missed.Migration for consumers
No API changes. The shim keeps the old name working indefinitely, but won't get new features — those land on
@eigenpal/docx-editor-reactdirectly.Version math
bunx changeset statusconfirms all 5 packages bump at major. Per semver,majorfrom0.4.1→1.0.0, from0.0.28→1.0.0, from0.0.1→1.0.0. No manualpackage.jsonedits needed.Review pass
Round 1 (3 parallel review agents) found and fixed:
./styles.cssand./i18n/*.jsonexports pointed into./node_modules/...which doesn't ship in the tarball. Now copies into the shim's owndist/+i18n/at build time.@eigenpal/docx-core.Round 2 (2 parallel review agents) found and fixed:
sideEffects: falsewould let bundlers tree-shake the CSS export. Mirrored upstream's["*.css"].cpSyncwithrecursive: truemerges into existing dir; an upstream-deleted locale would still ship. AddedrmSyncbefore copy.Open items (handled outside this PR)
1.0.0-releasebefore this train ships1.0.0-releasebranch (project settings)docx-editor-core,docx-editor-react,docx-editor-vue)npm deprecate @eigenpal/docx-js-editor "renamed to @eigenpal/docx-editor-react"Test plan
bun run typecheckclean across all 5 packages including the shimbun run buildsucceeds end-to-end with the new pipeline orderingnpm pack --dry-runfor the shim confirmsdist/styles.cssandi18n/*.jsonship in the tarball (38.7 kB)@eigenpal/docx-coreor@eigenpal/docx-js-editorreferences in source (only in shim's own name + intentional CHANGELOG history)@eigenpal/docx-js-editorimport path1.0.0-release🤖 Generated with Claude Code