@nosslabs/iap 7.1.0 → 8.0.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 +119 -0
- package/README.md +9 -3
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -3
- package/dist/index.d.ts +7 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +18 -13
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,125 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); version
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [8.0.0] — 2026-09-04
|
|
9
|
+
|
|
10
|
+
**The Capacitor 8 line graduates to `@latest`.** `8.0.0-next.0` soaked on the
|
|
11
|
+
`@next` dist-tag from 2026-08-17, was exercised against the iOS and Android
|
|
12
|
+
store sandboxes, and reported no regressions; this promotes that same code to
|
|
13
|
+
general availability. `@latest` moves from `7.1.0` to `8.0.0`.
|
|
14
|
+
|
|
15
|
+
There are **no functional changes since `8.0.0-next.0`**; see that entry below
|
|
16
|
+
for the full delta against `7.1.0`. In short, moving from `7.1.0` is a
|
|
17
|
+
peer-dependency bump plus `npx cap sync`, with no consumer code changes: the
|
|
18
|
+
`createIAP({ ... })` config, the `IAP` surface, the event map, the error codes
|
|
19
|
+
and the backend contract are unchanged.
|
|
20
|
+
|
|
21
|
+
**Staying on Capacitor 7?**
|
|
22
|
+
A bare `npm install @nosslabs/iap` now resolves to the Capacitor 8 line. Pin
|
|
23
|
+
`@nosslabs/iap@^7` (or the `@latest-7` dist-tag) with
|
|
24
|
+
`@capgo/native-purchases@lts-v7` to stay on Capacitor 7. The `7.x` line
|
|
25
|
+
continues from the `7.x` branch, and its documentation is archived at
|
|
26
|
+
<https://iap.nossdev.com/v7/>.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- **Dist-tags rearranged for the rollover.** `@latest` → `8.0.0` (applied by the
|
|
31
|
+
release workflow). The auxiliary pointers are applied by hand immediately
|
|
32
|
+
after publish: the new `@latest-8` pins the Capacitor 8 line, and `@next` is
|
|
33
|
+
re-pointed at `8.0.0` so it does not sit on a superseded prerelease.
|
|
34
|
+
`@latest-7` continues to track `7.1.0` and `@latest-5` tracks `5.0.0`.
|
|
35
|
+
- **Corrected a stale doc comment on `VERSION`.** The published `8.0.0-next.0`
|
|
36
|
+
type declarations described `VERSION` as being "read at runtime by the logger
|
|
37
|
+
so error reports include the version". That was never true — `src/lib/logger.ts`
|
|
38
|
+
uses a fixed `[@nosslabs/iap]` prefix. `VERSION` is exported purely for
|
|
39
|
+
consumers to read. Consumer-visible only on IDE hover; no behaviour change.
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- **Versioned documentation for the `7.x` line** at `/v7/`, a frozen snapshot
|
|
44
|
+
taken at `7.1.0` and reachable from the site's version switcher, mirroring the
|
|
45
|
+
existing `/v5/` archive. Install commands there pin `@^7` throughout, since
|
|
46
|
+
`@latest` no longer resolves to Capacitor 7.
|
|
47
|
+
|
|
48
|
+
### Internal
|
|
49
|
+
|
|
50
|
+
Not part of the published package; recorded for contributors.
|
|
51
|
+
|
|
52
|
+
- **A release gate that loads the built bundle.** CI and the release workflow now
|
|
53
|
+
import `dist/index.cjs` and `dist/index.js` and assert that `VERSION` matches
|
|
54
|
+
`package.json`. The build-time `__PKG_VERSION__` define is otherwise
|
|
55
|
+
unguarded: removing it leaves typecheck, lint, tests and the build all green
|
|
56
|
+
while shipping a bundle that throws `ReferenceError` on import. CI also runs
|
|
57
|
+
`test:coverage` now, so the 80% thresholds are actually enforced.
|
|
58
|
+
- **The docs version switcher is built from one shared table**
|
|
59
|
+
(`docs/.vitepress/versions.ts`). `theme/Layout.vue` overwrites `themeConfig.nav`
|
|
60
|
+
per route, so the copy in `config.ts` had been dead code — the `/v5/` archive
|
|
61
|
+
was reachable only because that override happened to hardcode it.
|
|
62
|
+
|
|
63
|
+
## [8.0.0-next.0] — 2026-08-17
|
|
64
|
+
|
|
65
|
+
**First release of the Capacitor 8 line, on the `@next` npm dist-tag.** The
|
|
66
|
+
Capacitor 7 line continues as `7.x` on `@latest` (and on the new `@latest-7`
|
|
67
|
+
dist-tag); `@latest` stays at `7.1.0` until the 8.x line graduates. Install the
|
|
68
|
+
candidate with `npm install @nosslabs/iap@next`.
|
|
69
|
+
|
|
70
|
+
Note that `@next` previously pointed at `7.0.0-next.0`, a Capacitor 7
|
|
71
|
+
prerelease; it now moves to the Capacitor 8 line. `7.0.0-next.0` remains
|
|
72
|
+
installable by exact version.
|
|
73
|
+
|
|
74
|
+
**Opens the Capacitor 8 line.** Same library, next platform major: the peer
|
|
75
|
+
range moves from Capacitor 7 to Capacitor 8, and nothing else changes. Cap-7
|
|
76
|
+
consumers stay on `7.x` — `^7` ranges don't auto-resolve to `8.x`.
|
|
77
|
+
|
|
78
|
+
### Changed (BREAKING, vs `7.1.0` — peer range only)
|
|
79
|
+
|
|
80
|
+
- **Anchored the `8.x` line to Capacitor 8.** Peer dependencies moved to
|
|
81
|
+
`@capacitor/core`, `@capacitor/preferences` and (optional) `@capacitor/app`
|
|
82
|
+
at `>=8.0.0` — the forward-open range that upstream `@capacitor/*` plugins
|
|
83
|
+
and `@capgo/native-purchases` themselves declare — and
|
|
84
|
+
`@capgo/native-purchases` at `^8.0.0`, which stays a caret because the
|
|
85
|
+
adapter binds to its method signatures. The Cap-7 ranges
|
|
86
|
+
(`@capacitor/*: ^7.0.0`, `@capgo/native-purchases: ^7.16.2`) are dropped —
|
|
87
|
+
they were the only thing blocking a clean `npm install` in a Capacitor 8 app.
|
|
88
|
+
Upgrading is a peer-dep bump plus `npx cap sync`.
|
|
89
|
+
- **`VERSION` is now typed `string` rather than the literal `"0.1.0"`.** It is
|
|
90
|
+
injected from `package.json` at build time instead of being hard-coded, so
|
|
91
|
+
it finally reports the version that is actually installed.
|
|
92
|
+
|
|
93
|
+
### Fixed
|
|
94
|
+
|
|
95
|
+
- **CommonJS consumers can type-check again.** The `exports` map declared a
|
|
96
|
+
single top-level `types` entry, so `require()` resolved the CommonJS bundle
|
|
97
|
+
against ESM declarations and `tsc` failed with TS1479 under
|
|
98
|
+
`moduleResolution: node16`/`nodenext`. `types` is now nested per condition,
|
|
99
|
+
with `require` pointing at the `dist/index.d.cts` the build already emitted.
|
|
100
|
+
Affects `7.1.0` and earlier too.
|
|
101
|
+
- **`VERSION` no longer reports `0.1.0`.** It was hard-coded and never updated
|
|
102
|
+
by any publish step, so the value every released build exported was wrong.
|
|
103
|
+
(The `8.0.0-next.0` entry claimed this also corrupted logger error reports —
|
|
104
|
+
it did not. `src/lib/logger.ts` uses a fixed `[@nosslabs/iap]` prefix and has
|
|
105
|
+
never read `VERSION`. The export is for consumers only.)
|
|
106
|
+
|
|
107
|
+
### Notes
|
|
108
|
+
|
|
109
|
+
- **No runtime API changes.** `createIAP({ ... })` config, the `IAP` instance
|
|
110
|
+
surface, the event map, the error codes and the backend contract are all
|
|
111
|
+
byte-for-byte what `7.1.0` shipped. Nothing in `src/` needed a call-site fix:
|
|
112
|
+
every `@capgo/native-purchases` method this library calls
|
|
113
|
+
(`isBillingSupported`, `getProducts`, `purchaseProduct`, `getPurchases`,
|
|
114
|
+
`acknowledgePurchase`, `manageSubscriptions`, `getStorefront`) keeps its
|
|
115
|
+
`7.16.2` signature in `8.6.5`. The plugin's v8 additions — `consumePurchase()`,
|
|
116
|
+
`presentOfferCodeRedeemSheet()`, the `billingPlanType` purchase option, the
|
|
117
|
+
`onlyCurrentEntitlements` filter on `getPurchases()`, and the StoreKit
|
|
118
|
+
commitment/renewal metadata on `Product` and `Transaction` — are all optional
|
|
119
|
+
and none are consumed.
|
|
120
|
+
- **`getStorefront()` keeps its capability probe.** The plugin declares
|
|
121
|
+
`getStorefront()` on its TypeScript interface as of `8.5.0`, but the peer
|
|
122
|
+
range also admits `8.0.0`–`8.4.x`, which don't register the native method. The
|
|
123
|
+
adapter therefore still gates on the Capacitor plugin header rather than the
|
|
124
|
+
declared type, and still resolves `null` when the method is absent — including
|
|
125
|
+
for the plugin's own "storefront unavailable" signal, an empty `countryCode`.
|
|
126
|
+
|
|
8
127
|
## [7.1.0] — 2026-07-04
|
|
9
128
|
|
|
10
129
|
### 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: `
|
|
5
|
+
**Status: `8.0.0` — the Capacitor 8 line, on `@latest`** (built on `@capgo/native-purchases@^8`). The Capacitor 7 line continues in maintenance as `7.x` (pin `^7`, or the `@latest-7` dist-tag — [v7 docs](https://iap.nossdev.com/v7/)) and the Capacitor 5 line (`cordova-plugin-purchase`) as `5.x` (pin `^5` — [v5 docs](https://iap.nossdev.com/v5/)). `^7` and `^5` ranges resolve to their own lines and never cross-resolve. See the [CHANGELOG](./CHANGELOG.md) for the `8.0.0` delta and [Migration](https://iap.nossdev.com/migration/).
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
+
# Capacitor 8 — the current @latest line
|
|
8
9
|
npm install @nosslabs/iap @capgo/native-purchases
|
|
10
|
+
|
|
11
|
+
# Capacitor 7 — maintenance; both pins are required
|
|
12
|
+
npm install @nosslabs/iap@^7 @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
|
-
|
|
|
81
|
-
|
|
|
85
|
+
| 8.x | 8.x | `@capgo/native-purchases ^8` | `@latest`, `@latest-8` | **Current** — `8.0.0` |
|
|
86
|
+
| 7.x | 7.x | `@capgo/native-purchases@lts-v7` | `@latest-7` (pin via `^7`) | Maintenance |
|
|
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.
|
|
2307
|
+
var VERSION = "8.0.0";
|
|
2308
2308
|
|
|
2309
2309
|
exports.DEFAULT_PERMANENT_ERROR_CODES = DEFAULT_PERMANENT_ERROR_CODES;
|
|
2310
2310
|
exports.HttpBackendAdapter = HttpBackendAdapter;
|