chore: remove the React surface from the SDK (core-only, module settings unchanged)#7
Merged
Merged
Conversation
…ngs unchanged) Delete the React provider/hooks/contexts and the React dev-playground so the default (and only) package entry is react-free. Master's existing single-entry build now naturally yields a core-only package — no module-settings change. Deleted (React library surface): - src/lib/main.tsx (OpenSecretProvider/OpenSecretContext) - src/lib/developer.tsx (OpenSecretDeveloper/OpenSecretDeveloperContext) - src/lib/context.ts (useOpenSecret) - src/lib/developerContext.ts (useOpenSecretDeveloper) - src/lib/util.ts (orphan useOnMount/sleep — nothing imported ./util) Deleted (React dev-playground): - index.html, src/main.tsx, src/App.tsx, src/AI.tsx, src/App.css, src/index.css Edited: - src/lib/index.ts — drop the React re-exports; keep all core exports (api, ai, config, apiConfig, attestation/attestationForView, pcr, crypto) - package.json — drop react/react-dom peers + 5 React devDeps; 0.1.0 -> 0.2.0; main/module/exports/type UNCHANGED (single-entry preserved) - vite.config.ts — drop @vitejs/plugin-react import + react() plugin only - eslint.config.js — drop the removed react-hooks/react-refresh plugin imports Breaking (0.2.0): removes the React provider/hooks. agicash needs no change — it imports only core symbols. Do NOT publish (gudnuf-gated). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pmilic021
approved these changes
Jun 10, 2026
jbojcic1
approved these changes
Jun 10, 2026
gudnuf
approved these changes
Jun 10, 2026
orveth
pushed a commit
that referenced
this pull request
Jun 15, 2026
- Retitle to "OpenSecret SDK" and describe it as a framework-agnostic JS/TS SDK (the React surface was removed in #7). Drop the React component, Suspense+TanStack, and deprecated-Provider usage examples; add a plain-TS Usage section and a Storage section covering configure({ storage }), browserStorage for the browser, and custom sync-or-async StorageProvider adapters for React Native / Node / Bun / CLI / MCP. - Document the now-required storage param on configure(). - Fix the package name to @agicash/opensecret-sdk throughout; route the crypto examples through direct imports (the provider instance is gone); fix stale source references (src/AI.tsx removed; corrected the ai integration-test path). - package.json: 0.2.0 -> 1.0.0 (npm release to follow the merge). 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.
What
DELETE the React surface from OpenSecret-SDK entirely — the React provider/hooks/contexts and the React dev-playground — so the default (and only) package entry is react-free. Supersedes the earlier "split behind
./reactsubpath" approach (PR #6), which the team rejected.Deleting the React files makes
src/lib/index.tscore-only, so master's existing single-entry build naturally yields a react-free package — no module-settings change.Deleted
React library surface (5 files):
src/lib/main.tsx—OpenSecretProvider/OpenSecretContextsrc/lib/developer.tsx—OpenSecretDeveloper/OpenSecretDeveloperContextsrc/lib/context.ts—useOpenSecretsrc/lib/developerContext.ts—useOpenSecretDevelopersrc/lib/util.ts— orphan (useOnMount/sleep); grep-confirmed nothing imported./utilReact dev-playground:
index.html,src/main.tsx,src/App.tsx,src/AI.tsx,src/App.css,src/index.css(the css are playground-only; grep-confirmedsrc/libdoes not import them).src/global.d.ts(the*.derdeclaration) andsrc/assets/aws_root.derare KEPT — load-bearing for the core attestation code.Changed
src/lib/index.ts— removed the React re-exports (provider/contexts/hooks + their React types). KEPT all core exports incl. the adjacent core types (AttestationDocument,ParsedAttestationView,PcrConfig/Pcr0ValidationResult,generateSecureSecret/hashSecret). No reference to the deleted modules remains.package.json— removedreact/react-dompeers + the 5 React devDeps (@types/react,@types/react-dom,@vitejs/plugin-react,eslint-plugin-react-hooks,eslint-plugin-react-refresh); bumped0.1.0→0.2.0.main/module/exports/typeare UNCHANGED — single-entry settings preserved (artifact stays namedopensecret-react.*).vite.config.ts— removed ONLY the@vitejs/plugin-reactimport + thereact()plugin entry (no JSX left). Single entry,derPlugin,dts, and the rollup react externals are untouched.eslint.config.js— dropped the now-removedeslint-plugin-react-hooks/-refreshimports + their plugin/rules block so the config doesn't crash.Module settings: UNCHANGED
main/module/exports/typeare exactly master's single-entry config. No multi-entry, no es+cjs, no./reactsubpath.dist/stays master-shaped:opensecret-react.umd.js,opensecret-react.es.js,index.d.ts.Gate proof (repo has no
testscript)Breaking change (0.2.0)
Removes the React provider/hooks/contexts. agicash needs no change — it imports only core symbols (
configure,fetchUser, signing/crypto, etc.), not the React surface.Merge / publish
Ready for review and mergeable (verified above) — there is no reason to hold the merge itself. Merge +
npm publishare a human call (gudnuf's trigger, per the team's convention for landing + shipping outward changes); the bot just won't merge or publish autonomously. Note: merging does NOT auto-publish — there's no publish CI (onlytest.yml/rust.yml, noNPM_TOKEN). Publishing is a separate, deliberatebun run build && npm publishafter merge, whenever the team wants it on npm.🤖 Generated with Claude Code