Repository navigation
Consume the editor from paranext-core's staged copy - #119
Conversation
This package pinned @eten-tech-foundation/platform-editor ~0.8.13 and scripture-utilities ~0.1.6 from the npm registry. Those packages are no longer published from the repository we develop them in: scripture-editors now lives at paranext/scripture-editors, and paranext-core builds it from source and stages the result into dev-packages/staging/ rather than installing it from npm. Left as registry pins, this package would stay frozen at whatever ETEN last published. Points both at paranext-core's staged copy, matching how this repo already consumes platform-bible-react, platform-bible-utils, and papi-dts from a sibling paranext-core checkout. package-lock.json is deliberately not updated here — regenerating it requires a paranext-core that already carries the staging change, so it should be refreshed once that has merged.
|
Marking this a draft: CI is red and will stay red until paranext-core#2745 merges.
To finish once core has merged: # with an up-to-date paranext-core checked out as a sibling
npm install
git commit -am 'build: refresh lockfile for the staged editor'That will also clear the stale nested |
The editor `file:` specifiers point into paranext-core's `dev-packages/staging/`, which is gitignored there and produced by core's `preinstall`. Checking core out does not create it, and both workflows install this repo before core and then install core with `--ignore-scripts`, which skips that `preinstall`. npm links a missing `file:` target and exits 0, so CI would have installed against a broken symlink and failed later as an unresolved module. Stage core's dev packages first instead; the script needs only git and node, which is why core can run it as its own `preinstall`. The lockfile drops the editor's transitive closure because npm resolves a `file:` target's dependencies only when the target is inside the consuming project's root, and core is a sibling. Those dependencies resolve through the symlink's realpath from core's own `node_modules`, as this repo's existing `file:../paranext-core/lib/...` dependencies already do. Verified with an updated core beside it: lint clean, and both webpack bundles compile. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017jvJ2eYTfxJaBkKoQbVeiW
|
🤖 Claude: Reviewed as part of the eight-repo set; this one and paratext-assistant#130 are the two with hand-written bodies, and both are accurate. Live-tested against a core checkout carrying paranext-core#2745:
LGTM after paranext-core#2745 and scripture-editors#1 + the |
The staging step ran `node .erb/scripts/stage-dev-packages.ts`, so eight repos depended on the location of a file inside paranext-core; renaming or moving it would have broken all of them at once, silently, since nothing here references it in a way a search from core would find. `npm run stage-dev-packages` is core's own entry point for the same thing. It needs nothing installed, so it still works before core's `npm ci`, and it survives the file moving. Core's script also carries `--experimental-strip-types`, which is what lets a repo whose Volta pin predates Node 22.18 run it at all. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TqDvvB9RpsxEE49f75ZtB6
|
Thanks — all three points taken.
PR body corrected — the pnpm sentence was left over from the first commit and the second one removed the pnpm setup, so it described a workflow that no longer exists. Merge order — the body now carries it, including that this stays red after core#2745 merges until scripture-editors#1 has merged and Also on the branch since your review: the branch is rebased onto current The README follow-up (that a sibling |
paranext-core's postinstall checks that the staged editor packages match core's package-lock.json. This repo installs core with `npm ci --ignore-scripts` - required, because core's postinstall builds an Electron DLL this repo has no use for - so that check never ran here, and a build could resolve the editor from whatever the pinned branch happened to hold at that moment. `npm run verify:dev-packages`, added in paranext-core#2745, is that check on its own. It reads the tree and reports; it never installs or repairs anything. Also refreshes package-lock.json against core's current tree. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TqDvvB9RpsxEE49f75ZtB6
src/paratext-bible-text-collectionpinned@eten-tech-foundation/platform-editor@~0.8.13andscripture-utilities@~0.1.6from the npm registry. Those packages are no longer published from the repo we develop them in.Part of PT-4500.
Why this repo needs a change at all
scripture-editorsnow lives at paranext/scripture-editors, and paranext-core stages it intodev-packages/staging/rather than installing it from npm. Left as registry pins, this package would stay frozen at whatever ETEN last published — it was already a version behind core (~0.8.13vs~0.8.15), and the source has since moved to 0.8.16.The change
Both deps now point at paranext-core's staged copy:
Same shape and same relative depth as the
platform-bible-react,platform-bible-utils, andpapi-dtslinks this package already uses, so it needs nothing new locally: a siblingparanext-corecheckout, which is already required.CI needed a step, or this would have shipped broken
dev-packages/staging/is gitignored in core and produced by core'spreinstall.actions/checkoutdoes not create it, and both workflows install this repo before core and then install core withnpm ci --ignore-scripts— which skips that verypreinstall.npm does not report a missing
file:target. It creates a broken symlink and exits 0:So CI would have installed "successfully" and failed later with an unresolved module, far from the cause. Both workflows now stage core's dev packages first:
It needs only git and node — the script has no npm dependencies, which is exactly why core uses it as its own
preinstall.The lockfile, and where the closure comes from
package-lock.jsonis refreshed here, regenerated against a paranext-core carrying the staging change. Both entries are nowlink: trueat the staged versions (platform-editor0.8.16,scripture-utilities0.1.6).It also drops ~135 entries. That is expected: npm resolves a
file:target's dependency closure only when the target is inside the consuming project's root. Core is a sibling, so its tree is no longer restated here. Those dependencies resolve at runtime through the symlink's realpath out of core's ownnode_modules— verified forlexicaland@floating-ui/dom— which is precisely how this repo's existingfile:../paranext-core/lib/...dependencies have always worked.Merge order
Unblocked. paranext-core#2745 and scripture-editors#1 have both merged, and
platform-yalchas beenmoved onto scripture-editors' new
main, so the pinned revision carries its committeddist/andthe staging step copies rather than building — which is the only shape this runner supports, since
there is no pnpm here.
Verification
With an updated paranext-core checked out beside this repo:
npm install— lockfile regenerated and committed, both links resolvenpm run lint— cleannpm run build— both bundles compile (webViewandmain), which is the pathpublish.ymlexercises vianpm run packageRelated
paratext-assistant#130makes the equivalent change. An earlier version of this description claimed this repo was the only consumer outside paranext-core; that was wrong —paratext-assistantalso depends onscripture-utilities, and it needed the same workflow step.🤖 Generated with Claude Code
https://claude.ai/code/session_017jvJ2eYTfxJaBkKoQbVeiW
This change is