Skip to content

YPE-1146 - Prep React SDK for major bump#253

Merged
cameronapak merged 3 commits into
mainfrom
chore/remove-deprecated-apis-major
Jun 4, 2026
Merged

YPE-1146 - Prep React SDK for major bump#253
cameronapak merged 3 commits into
mainfrom
chore/remove-deprecated-apis-major

Conversation

@cameronapak
Copy link
Copy Markdown
Collaborator

@cameronapak cameronapak commented Jun 3, 2026

Removes previously-deprecated APIs and tightens BibleIndex types across all three packages, ahead of the next major release. 8 files deleted, 4 surfaces changed; guided by one rule — only symbols explicitly marked @deprecated are removed (plus the transitively-dead DEFAULT export, removed honestly and documented).

Removed/changed: redirectUrl prop on YouVersionAuthButton (use authRedirectUrl on YouVersionProvider), BibleWidgetView/BibleWidgetViewProps alias (use BibleCard/BibleCardProps), unused useInitData/useChapterNavigation/useVerseSelection hooks, Reader* and VerseSelection* contexts and providers, and passage_id now required on BibleIndexChapter/BibleIndexVerse (type-only). The per-call signIn({ redirectUrl }) override and BibleIndexBook.intro are intentionally untouched.

A single major changeset documents every breaking change with its migration path; it coalesces with the auth refactor (#248) into one release as long as the "Version Packages" PR isn't merged between them.

Build, typecheck, test, and lint pass across core, hooks, ui, and the vite-react example app.

Part of YPE-1146

There is additional work YPE-2889 for the necessary follow-up docs-site updates.

Greptile Summary

This PR executes the "next major" cleanup that was explicitly deferred in earlier PRs: it removes eight deprecated symbols (hooks, contexts, a component alias, and a prop) and promotes passage_id to required in the BibleIndex Zod schemas. No new logic is introduced — the change is entirely deletions plus one schema tightening.

  • YouVersionAuthButton loses its redirectUrl prop; the component now calls signIn({ scopes }) and correctly falls back to redirectUri sourced from YouVersionProvider via useYVAuth.
  • BibleIndexChapter / BibleIndexVerse schemas promote passage_id from .optional() to required, fulfilling the TODO(next-major) from PR YPE-2841 - Sync schemas/types with latest OpenAPI spec #251; the changeset accurately notes both the TypeScript and runtime Zod enforcement impact.
  • 8 files deleted: ReaderContext, ReaderProvider, VerseSelectionContext, VerseSelectionProvider, useInitData, useChapterNavigation, useVerseSelection, and bible-widget-view — all carried explicit @deprecated JSDoc before this PR.

Confidence Score: 5/5

Safe to merge — every removed symbol carried an explicit @deprecated JSDoc, the schema tightening fulfils a documented TODO from a prior PR, and the changeset accurately describes both the TypeScript and runtime impact of each breaking change.

Every removed symbol was already marked deprecated with a clear 'will be removed in the next major version' notice; the passage_id schema promotion is backed by the OpenAPI spec confirmed in the PR thread; signIn() in YouVersionAuthButton correctly falls back through useYVAuth to redirectUri from context; coverage exclusions are cleaned up in lockstep with the deleted files; and all three packages carry a matching major changeset entry.

No files require special attention. All deletions are clean, the schema change is intentional and documented, and the changeset covers every breaking surface.

Important Files Changed

Filename Overview
.changeset/remove-deprecated-apis.md Well-structured major changeset documenting all four breaking changes with accurate migration paths; runtime enforcement of passage_id is correctly called out alongside the type-level change.
packages/core/src/schemas/bible-index.ts Promotes passage_id from optional to required on both BibleIndexVerseSchema and BibleIndexChapterSchema; fulfills the explicit TODO(next-major) from PR #251; BibleIndexBook.intro correctly remains optional.
packages/hooks/src/context/index.ts Removes re-exports for all four deleted context/provider files; retains YouVersionContext and YouVersionProvider exports correctly.
packages/hooks/src/index.ts Drops the three deprecated hook exports (useVerseSelection, useChapterNavigation, useInitData); remaining public surface is unchanged.
packages/ui/src/components/YouVersionAuthButton.tsx Removes the deprecated redirectUrl prop and its forwarding into signIn(); signIn({ scopes }) now correctly falls back to redirectUri from the provider context via useYVAuth.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph REMOVED ["❌ Removed in this PR"]
        RCtx["ReaderContext / ReaderProvider"]
        VSCtx["VerseSelectionContext / VerseSelectionProvider"]
        UH["useInitData · useChapterNavigation · useVerseSelection"]
        BW["BibleWidgetView / BibleWidgetViewProps alias"]
        RU["YouVersionAuthButton.redirectUrl prop"]
    end

    subgraph KEPT ["✅ Retained public API"]
        YVAuth["YouVersionProvider\nauthRedirectUrl prop"]
        UC["useYVAuth\nsignIn({ redirectUrl?, scopes? })"]
        BC["BibleCard / BibleCardProps"]
        BI["BibleIndex schemas\npassage_id now required"]
        CTX["YouVersionContext\nYouVersionProvider"]
    end

    RU -->|"migration →"| YVAuth
    BW -->|"migration →"| BC
    UH -->|"migration →"| UC
    RCtx -->|"no replacement"| CTX
    VSCtx -->|"no replacement"| CTX
Loading

Reviews (2): Last reviewed commit: "Merge branch 'main' into chore/remove-de..." | Re-trigger Greptile

Remove previously-deprecated APIs and tighten BibleIndex types ahead of
the next major release. Only symbols explicitly marked @deprecated are
removed (plus the transitively-dead DEFAULT export).

- ui: remove deprecated redirectUrl prop from YouVersionAuthButton
- ui: remove BibleWidgetView alias (use BibleCard)
- hooks: remove unused useInitData/useChapterNavigation/useVerseSelection
  hooks and the Reader*/VerseSelection* contexts and providers
- core: make passage_id required on BibleIndexChapter and BibleIndexVerse

Adds a major changeset documenting each breaking change and its migration.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 3, 2026

🦋 Changeset detected

Latest commit: 951a0f4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@youversion/platform-core Major
@youversion/platform-react-hooks Major
@youversion/platform-react-ui Major
vite-react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cameronapak cameronapak self-assigned this Jun 3, 2026
Comment thread .changeset/remove-deprecated-apis.md Outdated
cameronapak and others added 2 commits June 3, 2026 12:59
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: Cameron Pak <cameronandrewpak@gmail.com>
@cameronapak cameronapak merged commit 52aa3b4 into main Jun 4, 2026
6 checks passed
@cameronapak cameronapak deleted the chore/remove-deprecated-apis-major branch June 4, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants