chore(repo): repository preparation prerequisites - #5
Merged
Conversation
SyncItemEntity/SyncResultEntity were public and leaked into the Swift bridging header, breaking Obj-C translation and the iOS CI build. AppDelegate now calls HybridSyncProvider.handleBackgroundURLSessionEvents.
podspec floor 13.0 -> 15.0 to match URLSession.data(for:) (iOS 15+) used in SyncDispatcher. Removed the always-true iOS 13 availability guards as dead code.
Android RetryPolicyEvaluator applied full-jitter and capped before jittering; now jitters the raw delay by [0.75, 1.25) then caps, matching JS/iOS. Aligned the RetryPolicy TSDoc and added seeded-Random tests.
The spec header now states the JS facade lives wholly in src/index.tsx (no per-method .native.tsx/.tsx split) and the iOS impl is HybridSyncProvider, not SyncProvider.
eslint now ignores nitrogen/, website/build, website/.docusaurus and coverage/. tsconfig enables incremental builds (build config opts out). Removed the unused turbo test task.
release-it npm.publish=false so only CI publishes (with provenance). publish.yml runs lint+typecheck before the build; ci.yml reports the npm pack size in the job summary.
CHANGELOG [Unreleased] and a BREAKING_CHANGES entry for the iOS 13->15 floor; README platform tables updated to iOS 15. CONTRIBUTING gains a V-JS/V-AND/V-IOS pre-merge checklist and a corrected facade lifecycle.
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
This PR is a round of repository hardening that lands before feature work begins. It restores green iOS CI, aligns the Android retry-jitter implementation with the JS and iOS engines, tightens tooling/DX, makes CI the sole publisher of the package, and refreshes the documentation that drifted from the current codebase.
What & Why
iOS build / CI correctness
SyncItemEntity/SyncResultEntitywere declaredpublic, so they leaked into the generated Swift bridging header and broke Obj-C translation units (Cannot find interface declaration for NSManagedObject), failing the iOS CI build. They (and their members) are nowinternal— implementation-only, no public-API impact. The exampleAppDelegatewas updated to call the renamedHybridSyncProvider.handleBackgroundURLSessionEvents.ios/HTTP/SyncDispatcher.swiftalready usesURLSession.data(for:)(iOS 15+). The old 13.0 podspec floor only compiled because the example app overrodeIPHONEOS_DEPLOYMENT_TARGET; consumers honoring the declared 13.0 floor would hit an availability compile error. The podspec floor (boths.platformsandtest_spec.platforms) is now 15.0, and the now-always-true#available(iOS 13.0)/@available(iOS 13.0)guards inSyncDispatcher.swiftandBackgroundSyncManager.swiftwere removed as dead code.Android retry-jitter correctness
[0.75, 1.25). The AndroidRetryPolicyEvaluatorpreviously applied full jitter over[0, capped]and capped before jittering, collapsing delays toward 0 and diverging from the other two engines. It now jitters the raw delay (raw * (0.75 + random.nextDouble() * 0.5)) and caps afterwards, matching JS (src/utils/retryBackoff.ts) and iOS (ios/Retry/RetryPolicyEvaluator.swift). TheRetryPolicyTSDoc insrc/types/sync.tswas aligned and seeded-Randomunit tests were added.Tooling / DX
nitrogen/,website/build/,website/.docusaurus/, andcoverage/.tsconfig.jsonenablesincremental+tsBuildInfoFile(faster pre-committsc), whiletsconfig.build.jsonkeepsincremental: false. The unusedtesttask was removed fromturbo.json.Release / CI pipeline
package.jsonrelease-it now setsnpm.publish: false, so localyarn releaseonly bumps/tags/pushes — CI performs the actual publish (with--provenance), and the version-diff guard works correctly.publish.ymlrunsyarn lint+yarn typecheckafter nitrogen and before the build (fail-fast), andci.ymladds a report-onlynpm pack --dry-runpackage-size summary afteryarn prepare.Documentation
src/SyncProvider.nitro.tsheader now states the JS facade lives wholly insrc/index.tsx(no per-method.native.tsx/.tsxsplit; entry-level web split via thebrowserexports condition) and that the iOS impl class isHybridSyncProvider(notSyncProvider).CHANGELOG.mdgains an[Unreleased]section (Changed / Fixed / Internal);BREAKING_CHANGES.mdgains an[Unreleased]entry for the iOS 13→15 floor with migration steps;README.mdplatform tables now read iOS 15;CONTRIBUTING.mdadds a V-JS / V-AND / V-IOS pre-merge checklist and corrects the Nitro-method lifecycle (facade lives insrc/index.tsx).How
A few decisions worth a reviewer's attention:
internal: Nitro's Swift↔C++ interop emits a bridging header;publicCore Data subclasses ofNSManagedObjectforced Obj-C translation units to resolveNSManagedObject, which they cannot. Demoting tointernalkeeps them out of the header while leaving runtime behaviour identical (they were never part of the public API).npm.publish: false: Splitting "version + tag + push" (local, viayarn release) from "publish" (CI only) makes CI the single source of truth for what ships, lets us publish with--provenance, and keeps the version-diff guard reliable — a local accidental publish can no longer race CI.#availableguards: With the floor at iOS 15, theiOS 13.0checks are statically always-true; leaving them in implies a 13.0 path that no longer exists.Testing
V-JS gate — run locally, green ✅
yarn typecheck— PASSyarn lint— PASS (0 errors; 25 pre-existing warnings in untouched hooks/contexts/website)yarn test— 13 suites / 71 tests passrelease-it.npm.publish === falseconfirmedretryBackoff.ts) and iOS (RetryPolicyEvaluator.swift)