@nosslabs/iap 7.1.0 → 8.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,68 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); version
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [8.0.0-next.0] — 2026-08-17
9
+
10
+ **First release of the Capacitor 8 line, on the `@next` npm dist-tag.** The
11
+ Capacitor 7 line continues as `7.x` on `@latest` (and on the new `@latest-7`
12
+ dist-tag); `@latest` stays at `7.1.0` until the 8.x line graduates. Install the
13
+ candidate with `npm install @nosslabs/iap@next`.
14
+
15
+ Note that `@next` previously pointed at `7.0.0-next.0`, a Capacitor 7
16
+ prerelease; it now moves to the Capacitor 8 line. `7.0.0-next.0` remains
17
+ installable by exact version.
18
+
19
+ **Opens the Capacitor 8 line.** Same library, next platform major: the peer
20
+ range moves from Capacitor 7 to Capacitor 8, and nothing else changes. Cap-7
21
+ consumers stay on `7.x` — `^7` ranges don't auto-resolve to `8.x`.
22
+
23
+ ### Changed (BREAKING, vs `7.1.0` — peer range only)
24
+
25
+ - **Anchored the `8.x` line to Capacitor 8.** Peer dependencies moved to
26
+ `@capacitor/core`, `@capacitor/preferences` and (optional) `@capacitor/app`
27
+ at `>=8.0.0` — the forward-open range that upstream `@capacitor/*` plugins
28
+ and `@capgo/native-purchases` themselves declare — and
29
+ `@capgo/native-purchases` at `^8.0.0`, which stays a caret because the
30
+ adapter binds to its method signatures. The Cap-7 ranges
31
+ (`@capacitor/*: ^7.0.0`, `@capgo/native-purchases: ^7.16.2`) are dropped —
32
+ they were the only thing blocking a clean `npm install` in a Capacitor 8 app.
33
+ Upgrading is a peer-dep bump plus `npx cap sync`.
34
+ - **`VERSION` is now typed `string` rather than the literal `"0.1.0"`.** It is
35
+ injected from `package.json` at build time instead of being hard-coded, so
36
+ it finally reports the version that is actually installed.
37
+
38
+ ### Fixed
39
+
40
+ - **CommonJS consumers can type-check again.** The `exports` map declared a
41
+ single top-level `types` entry, so `require()` resolved the CommonJS bundle
42
+ against ESM declarations and `tsc` failed with TS1479 under
43
+ `moduleResolution: node16`/`nodenext`. `types` is now nested per condition,
44
+ with `require` pointing at the `dist/index.d.cts` the build already emitted.
45
+ Affects `7.1.0` and earlier too.
46
+ - **`VERSION` no longer reports `0.1.0`.** It was hard-coded and never updated
47
+ by any publish step, so error reports from every released build
48
+ misattributed their version.
49
+
50
+ ### Notes
51
+
52
+ - **No runtime API changes.** `createIAP({ ... })` config, the `IAP` instance
53
+ surface, the event map, the error codes and the backend contract are all
54
+ byte-for-byte what `7.1.0` shipped. Nothing in `src/` needed a call-site fix:
55
+ every `@capgo/native-purchases` method this library calls
56
+ (`isBillingSupported`, `getProducts`, `purchaseProduct`, `getPurchases`,
57
+ `acknowledgePurchase`, `manageSubscriptions`, `getStorefront`) keeps its
58
+ `7.16.2` signature in `8.6.5`. The plugin's v8 additions — `consumePurchase()`,
59
+ `presentOfferCodeRedeemSheet()`, the `billingPlanType` purchase option, the
60
+ `onlyCurrentEntitlements` filter on `getPurchases()`, and the StoreKit
61
+ commitment/renewal metadata on `Product` and `Transaction` — are all optional
62
+ and none are consumed.
63
+ - **`getStorefront()` keeps its capability probe.** The plugin declares
64
+ `getStorefront()` on its TypeScript interface as of `8.5.0`, but the peer
65
+ range also admits `8.0.0`–`8.4.x`, which don't register the native method. The
66
+ adapter therefore still gates on the Capacitor plugin header rather than the
67
+ declared type, and still resolves `null` when the method is absent — including
68
+ for the plugin's own "storefront unavailable" signal, an empty `countryCode`.
69
+
8
70
  ## [7.1.0] — 2026-07-04
9
71
 
10
72
  ### Added
package/README.md CHANGED
@@ -2,10 +2,15 @@
2
2
 
3
3
  > Thin Capacitor IAP orchestrator. Server-side validation via [Attesto](https://attesto.nossdev.com).
4
4
 
5
- **Status: `7.0.0` — GA on `@latest`** (the Capacitor 7+ line, built on `@capgo/native-purchases`). The Capacitor 5 line (`cordova-plugin-purchase`) continues as `5.x` from the `5.x` branch — `^5` ranges still resolve to `5.x`. See the [CHANGELOG](./CHANGELOG.md) for the GA delta and [Migration](https://iap.nossdev.com/migration/) for upgrading from `5.x`.
5
+ **Status: `8.0.0-next.0` — the Capacitor 8 line, on `@next`** (built on `@capgo/native-purchases@^8`). `@latest` remains `7.1.0` (Capacitor 7) while the 8.x line soaks. The Capacitor 7 line continues as `7.x` (also on `@latest-7`) and the Capacitor 5 line (`cordova-plugin-purchase`) as `5.x` — `^7` and `^5` ranges still resolve to their own lines. See the [CHANGELOG](./CHANGELOG.md) for the `8.0.0-next.0` delta and [Migration](https://iap.nossdev.com/migration/).
6
6
 
7
7
  ```bash
8
- npm install @nosslabs/iap @capgo/native-purchases
8
+ # Capacitor 8 — release candidate, on @next
9
+ npm install @nosslabs/iap@next @capgo/native-purchases
10
+
11
+ # Capacitor 7 — the current @latest line
12
+ npm install @nosslabs/iap @capgo/native-purchases@lts-v7
13
+
9
14
  npx cap sync
10
15
  ```
11
16
 
@@ -77,8 +82,9 @@ It does **not**: talk to Attesto directly, define entitlement business logic, ma
77
82
 
78
83
  | `@nosslabs/iap` | Capacitor | Native plugin | dist-tag | Status |
79
84
  |---|---|---|---|---|
80
- | 7.x | 7.x (also runs on 8.x) | `@capgo/native-purchases 7.16.x` (or `^8` on Cap 8) | `@latest` | **Current** |
81
- | 5.x | 5.x | `cordova-plugin-purchase ^13.x` | (pinned via `^5`) | Maintenance |
85
+ | 8.x | 8.x and later | `@capgo/native-purchases ^8` | `@next` | **Release candidate** — `8.0.0-next.0` |
86
+ | 7.x | 7.x | `@capgo/native-purchases@lts-v7` | `@latest`, `@latest-7` | **Current** |
87
+ | 5.x | 5.x | `cordova-plugin-purchase ^13.x` | `@latest-5` (pin via `^5`) | Maintenance |
82
88
 
83
89
  ## Optional peer dependency
84
90
 
package/dist/index.cjs CHANGED
@@ -2304,7 +2304,7 @@ function requireInitialized(state) {
2304
2304
  init_errors();
2305
2305
 
2306
2306
  // src/version.ts
2307
- var VERSION = "0.1.0";
2307
+ var VERSION = "8.0.0-next.0";
2308
2308
 
2309
2309
  exports.DEFAULT_PERMANENT_ERROR_CODES = DEFAULT_PERMANENT_ERROR_CODES;
2310
2310
  exports.HttpBackendAdapter = HttpBackendAdapter;