Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,26 @@ jobs:
- name: Build package
run: yarn prepare

- name: Report npm pack size
run: |
PACK_JSON=$(npm pack --dry-run --json --ignore-scripts)
node -e '
const fs = require("fs");
const data = JSON.parse(fs.readFileSync(0, "utf8"));
const pkg = Array.isArray(data) ? data[0] : data;
const fmt = (b) => (b / 1024).toFixed(1) + " KiB";
const lines = [
"### Package size (npm pack --dry-run)",
"",
"| Metric | Size |",
"|---|---:|",
`| Tarball (packed) | ${fmt(pkg.size)} (${pkg.size} bytes) |`,
`| Unpacked | ${fmt(pkg.unpackedSize)} (${pkg.unpackedSize} bytes) |`,
`| File count | ${pkg.entryCount} |`,
];
fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, lines.join("\n") + "\n");
' <<< "$PACK_JSON"

build-android:
runs-on: ubuntu-latest

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ jobs:
if: steps.version-check.outputs.version_changed == 'true'
run: yarn nitrogen

- name: Lint files
if: steps.version-check.outputs.version_changed == 'true'
run: yarn lint

- name: Typecheck files
if: steps.version-check.outputs.version_changed == 'true'
run: yarn typecheck

- name: Build package
if: steps.version-check.outputs.version_changed == 'true'
run: yarn prepare
Expand Down
25 changes: 24 additions & 1 deletion BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,27 @@ Use the table at the bottom of each entry to enumerate every renamed, removed, o

## [Unreleased]

No breaking changes yet -- the library is pre-1.0 and the public API surface is still being shaped. Upcoming breaking changes will be cataloged here before each release and moved into a dated section on publish.
### iOS minimum deployment target `13.0` --> `15.0`

> **Category:** platform-requirement change (**not** a JS/TS API break). Pre-1.0.
>
> **Changelog:** see the [`[Unreleased]` entry in `CHANGELOG.md`](./CHANGELOG.md#unreleased).

The iOS minimum deployment target declared in `SyncProvider.podspec` is raised from `13.0` to `15.0`. This is a **platform-requirement change**: the public TypeScript surface (functions, hooks, types, enums, error codes) is unchanged, and no consumer JS code needs to be migrated. The blast radius is **install/compile-time on iOS only** — apps that pin an iOS deployment target below `15.0` must raise it.

**Rationale:** `ios/HTTP/SyncDispatcher.swift` uses the async `URLSession.data(for:)` API, which requires **iOS 15+**. The previous `13.0` floor was latent: the build only passed because the example app overrode `IPHONEOS_DEPLOYMENT_TARGET` to `>= 15.x`, masking the mismatch. Any consumer honoring the declared `13.0` floor would have hit an availability compile error in `SyncDispatcher.swift`. Raising the podspec floor to `15.0` makes the declared requirement match the code. (`BGTaskScheduler`'s iOS 13+ requirement is comfortably covered by the higher floor.)

#### Migration steps

1. In your app's `ios/Podfile`, ensure the platform line is at least `platform :ios, '15.0'`.
2. If you set `IPHONEOS_DEPLOYMENT_TARGET` anywhere (Podfile `post_install`, Xcode build settings), make sure it is `>= 15.0`.
3. Run `cd ios && bundle exec pod install`.

No JS/TS code changes are required.

#### Affected symbols

| Symbol / surface | Change |
| ------------------------------------------------------------- | --------------------------- |
| `SyncProvider.podspec` (`s.platforms`, `test_spec.platforms`) | iOS floor `13.0` --> `15.0` |
| Public TypeScript API | none (no JS break) |
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

> **Pre-1.0 notice:** while the library is on `0.x`, minor version bumps (`0.x.0`) may include breaking changes. Every breaking change is summarized in [`BREAKING_CHANGES.md`](./BREAKING_CHANGES.md) and ships with a dedicated migration guide under `website/docs/migration/`.

## [Unreleased]

### Changed

- **iOS minimum deployment target raised `13.0` → `15.0`** (P7). `SyncProvider.podspec` (`s.platforms` and `test_spec.platforms`) now declares `ios 15.0`. The implementation already relied on `URLSession.data(for:)` (iOS 15+) in `ios/HTTP/SyncDispatcher.swift`; the previous `13.0` floor only compiled because the example app overrode `IPHONEOS_DEPLOYMENT_TARGET`, so any consumer honoring the declared floor would hit an availability compile error. The always-true `if #available(iOS 13.0, *)` / `@available(iOS 13.0, *)` guards in `ios/HTTP/SyncDispatcher.swift` and `ios/Background/BackgroundSyncManager.swift` were removed as dead code. This is a **platform-requirement change, not a JS/TS API break** — see [`BREAKING_CHANGES.md`](./BREAKING_CHANGES.md).

### Fixed

- **android:** retry jitter corrected to `[0.75, 1.25]` equal-jitter (P9b). The Android `RetryPolicyEvaluator` previously applied **full-jitter** over `[0, capped]` and capped the delay _before_ jittering, so delays collapsed toward `0` and never reflected the documented spread. It now jitters the raw delay by `[0.75, 1.25]` (`raw * (0.75 + random.nextDouble() * 0.5)`) and applies the cap _after_ jitter, matching the JS (`src/utils/retryBackoff.ts`) and iOS (`ios/Retry/RetryPolicyEvaluator.swift`) implementations and the documented behavior.

### Internal

- **iOS:** demoted the Core Data entity classes `SyncItemEntity` and `SyncResultEntity` (and their members) from `public` to internal (P-CI). The `public` access level leaked the entities into the generated `SyncProvider-Swift.h` bridging header, breaking Objective-C translation units (`Cannot find interface declaration for NSManagedObject`) and the iOS CI build. The entities are implementation-only, so this restores green iOS CI with **no public-API impact**. Also updated the example AppDelegate to call the renamed `HybridSyncProvider.handleBackgroundURLSessionEvents`.

## v0.1.1 - 2025-05-19

### Fixed
Expand Down
Loading
Loading