v2.0.0 — @studiolxd/scorm: framework-agnostic core + multi-framework adapters#2
Merged
Conversation
BREAKING: package renamed @studiolxd/react-scorm → @studiolxd/scorm. React adapter now at the ./react subpath. - Move package packages/react-scorm → packages/scorm; name @studiolxd/scorm@2.0.0 - Split entries: "." = framework-agnostic core (no React imports), "./react" = adapter - New createScormSession() observable session (on/off/destroy emitter) - Extract autoTerminate/autoCommit to framework-agnostic src/lifecycle; React hooks now delegate to them; useScormSession uses useSyncExternalStore over session - Provider builds a ScormSession and exposes it via context - tsup multi-entry (index, react) + IIFE global build (window.Scorm) for <script>/CDN - package.json: exports map (., ./react), unpkg/jsdelivr, optional framework peers - Migrate example app imports to @studiolxd/scorm/react - 408 tests green (14 new for session + vanilla lifecycle); typecheck + builds OK Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- ./wc: <scorm-session> custom element (vanilla, SSR-safe, auto-registers) - ./vue: useScorm() composable (shallowRef + onScopeDispose) - ./svelte: createScormStore() (readable store) - ./angular: provideScorm() + SCORM token — decorator-free, builds as plain ESM (no ng-packagr), Angular >=17 (signals/DestroyRef); validated via tsup dts build - tsup: 6 entries; exports for ./wc ./vue ./angular ./svelte; sideEffects only wc - framework devDeps (@angular/core, vue, svelte, rxjs) for type builds - 415 tests green (+7 adapter/WC tests); typecheck + full build OK Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- packages/scorm/llms.txt: LLM-friendly API overview (shipped in the tarball) - AGENTS.md: repo conventions for AI coding agents - README.md (en): new name, entry-points table, vanilla quickstart, Vue/Angular/ Svelte/WC/CDN snippets, useScormSession reactive note - Fix import/install lines across all language READMEs to @studiolxd/scorm[/react] Note: non-English README prose still needs a full translation pass (follow-up). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- source/skill.md: canonical skill teaching @studiolxd/scorm usage - scripts/build.mjs: generates Claude Code plugin+marketplace, Cursor .mdc rule, and a portable AGENTS-style baseline from the single source - build/: generated outputs; README explains per-tool install + distribution Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New PlatformsSection demonstrates createScormSession() (vanilla) and the <scorm-session> Web Component, both in mock mode, independent of the React provider. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…m-example Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- tests/angular-smoke/: minimal Angular 17 standalone app using provideScorm() + inject(SCORM); compiles the decorator-free adapter in AOT/production - .github/workflows/angular-smoke.yml: build lib → npm pack → install into fixture → ng build --configuration production (Angular 17, the documented floor) - Verified locally: Angular 17 AOT production build succeeds against the packed plain-ESM @studiolxd/scorm/angular (no ng-packagr needed) - Plan §11 acceptance criterion met Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Update English root + example READMEs to 2.0.0 (new name, agnostic core, entry-points table, 10 demo sections incl. Vanilla/WC) - Re-translate all 15 non-English READMEs (root, packages/scorm, example × 5 langs) from the updated English sources — structure-identical, code/identifiers/nav line preserved - Plan: translation follow-up marked done Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Review finding: example/package.json still declared @studiolxd/react-scorm@^1.0.1 (the renamed-away package), leaving a dangling node_modules symlink to the deleted packages/react-scorm and stale package-lock entries — a potential npm ci break. Build only passed via workspace hoisting. - example/package.json: dependency -> @studiolxd/scorm; root name -> @studiolxd/scorm-monorepo; removed leftover packages/react-scorm/ dir; regenerated clean lockfile (npm ci --dry-run in sync); 415 tests + example build green Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- wc: announce initial state before auto-wiring so auto-terminate yields a distinct initialized event instead of a duplicate initial one - vue: return destroy() and guard onScopeDispose with getCurrentScope() — no silent session leak when used outside an effect scope - svelte: readable pushes the current status on subscribe so late subscribers do not see the stale creation-time snapshot +4 tests (419 total); typecheck + build green Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…lup on Linux) npm/cli#4828: a macOS-generated lockfile makes npm ci skip @rollup/rollup-linux-x64-gnu on the Linux runner, breaking tsup. npm install re-resolves the platform binary. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…nal-dep fix) npm install alone still respected the macOS lockfile and skipped @rollup/rollup-linux-x64-gnu. Removing package-lock.json forces a fresh platform-correct resolution on the runner (npm/cli#4828). Co-Authored-By: Claude Opus 4.8 (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.
Breaking. Renames
@studiolxd/react-scorm→@studiolxd/scorm(2.0.0) and turns the package into a framework-agnostic core with thin adapters. Going straight to 2.0.0 — 1.1.0 is not published standalone.What's included
Core (framework-agnostic, subpath
.)createScormSession(version, options)— observable session (on/off/destroy, reactivestatus)autoTerminate(session)/autoCommit(session, ms)helpers (the React hooks now delegate to these)ScormApi, mock,Result) — zero framework importsAdapters (subpaths)
./react—ScormProvider,useScorm,useScormSession(nowuseSyncExternalStore),useScormAutoTerminate/Commit./vue—useScorm()composable./angular—provideScorm()+SCORMtoken — decorator-free, builds as plain ESM (no ng-packagr). Angular 17+./svelte—createScormStore()./wc—<scorm-session>Web Component (SSR-safe, auto-registers)window.Scorm(dist/scorm.global.js) for<script>/CDNPackaging
exportsmap per subpath; framework deps are optional peer dependencies;sideEffectsonly on./wcDocs & tooling
llms.txt(shipped),AGENTS.md, README rewrite + import fixes across 6 languagesskills/— single source → Claude Code plugin/marketplace, Cursor.mdc, portable baseline@studiolxd/scorm/react+ new Vanilla / Web Component tabVerification
.d.ts(incl. Angular as plain ESM); example builds + lintsFollow-ups (not in this PR)
npm deprecate @studiolxd/react-scorm— only at publish timeSee
docs/PLAN-agnostic-core.mdfor the full plan and rationale.🤖 Generated with Claude Code