|
| 1 | +# Changelog |
| 2 | + |
| 3 | +This file records user-visible changes. Alpha releases may contain breaking changes, and |
| 4 | +changes may occur between alpha versions. Version numbers and publication-channel instructions |
| 5 | +are maintained by the release workflow; see the [alpha release readiness tracker](https://github.com/rescript-lang/experimental-rescript-webapi/issues/382). |
| 6 | + |
| 7 | +## 1.0.0-alpha.1 (candidate) |
| 8 | + |
| 9 | +Planned first release in the `1.0.0-alpha.N` series. ReScript `13.0.0-alpha.5` is the tested |
| 10 | +compiler baseline. This alpha is not a stable API; review the migration notes below before |
| 11 | +upgrading from earlier prereleases. The release workflow is the source of truth for actual |
| 12 | +versioning and publication. |
| 13 | + |
| 14 | +### Migration notes |
| 15 | + |
| 16 | +- WebSocket sends and worker `Request` fetches now preserve their native receiver (`this`) rather |
| 17 | + than calling receiver-bound methods unbound. |
| 18 | +- `WebAPI.Request.bytes`, `WebAPI.Response.bytes`, `WebAPI.Blob.bytes`, |
| 19 | + `WebAPI.Blob.stream`, and `WebAPI.SafeFetch.bytes` expose |
| 20 | + native `Uint8Array.t` values or chunks instead of `array<int>`. Use the typed-array API |
| 21 | + directly; the bytes are not copied into a ReScript integer array. `SafeFetch.bytes` keeps its |
| 22 | + existing result and response wrapper; only the byte payload changes. |
| 23 | +- `BodyInit.fromReadableStream` and `Response.fromReadableStream` now require |
| 24 | + `ReadableStream.t<Uint8Array.t>` input. These HTTP-body adapters accept byte chunks, not arbitrary |
| 25 | + or string chunks; `ReadableStream` itself remains generic for other uses. |
| 26 | +- `ResizeObserver` callbacks now receive `(entries, observer)` as two arguments rather than a |
| 27 | + curried callback. |
| 28 | +- Web Audio analyser float buffers, `AudioBuffer` channel and copy APIs, and Biquad/IIR filter |
| 29 | + frequency-response buffers use `Float32Array.t`; analyser byte buffers use `Uint8Array.t`. |
| 30 | + `DOMMatrix` and `DOMMatrixReadOnly` Float32 conversions also use `Float32Array.t`. Use native |
| 31 | + typed-array values rather than ordinary ReScript arrays for these calls. |
| 32 | +- `Element.closest` returns `Null.t<DOMTree.element>` and is no longer polymorphic. Narrow the |
| 33 | + result with the relevant public classifier when a more specific HTML interface is required. |
| 34 | +- WebCrypto signatures now reflect native results: `sign` and `digest` return `ArrayBuffer.t`, |
| 35 | + `verify` returns `bool`, `deriveKey` returns `WebAPI.SubtleCrypto.cryptoKey`, and `deriveBits` |
| 36 | + and `wrapKey` return `ArrayBuffer.t`. Key and algorithm support types are available through |
| 37 | + `WebAPI.SubtleCrypto`. Use `algorithmString` for a native algorithm name and `algorithmObject` |
| 38 | + for parameter dictionaries such as AES-GCM's `iv` and `tagLength`; the object helper preserves |
| 39 | + typed-array values rather than copying them into a closed algorithm-name variant. |
| 40 | +- Generic `SubtleCrypto.generateKey` and `generateKey2` now return `unknown` because the result |
| 41 | + depends on the algorithm. Use `generateKeySymmetric` for HMAC keys |
| 42 | + (`SubtleCrypto.cryptoKey`) or `generateEcdsaKeyPair` for ECDSA pairs |
| 43 | + (`SubtleCrypto.cryptoKeyPair`). Generic `exportKey` also returns `unknown`; use |
| 44 | + `exportKeyBinary` for `Raw`, `Pkcs8`, or `Spki` formats (`ArrayBuffer.t`), and |
| 45 | + `exportKeyJwk` for `Jwk` format (`JSON.t`). |
| 46 | +- `DOMTree.element` no longer exposes a generic `className`. Specific HTML interfaces retain a |
| 47 | + string `className`; `SVGElement.t.className` is `SVGElement.svgAnimatedString` with |
| 48 | + `baseVal` and `animVal`. |
| 49 | +- `CustomElementRegistry.define` takes a `DOM.customElementConstructor`; it does not take an |
| 50 | + element instance. |
| 51 | +- Request destination, referrer-policy, and media `canPlayType` result types now include `Empty` |
| 52 | + for native empty-string values. `HTMLCanvasElement.toBlob` callbacks receive a |
| 53 | + `Null.t<WebAPI.Blob.t>` because the browser can return null (including for a zero-sized |
| 54 | + canvas). An `ifAvailable` Web Locks callback receives a nullable lock when the lock is |
| 55 | + unavailable. `IDBFactory.deleteDatabase` has an operation-specific `unit` result because the |
| 56 | + browser's successful result is `undefined`, not a database. |
| 57 | +- `WebAPI.Notification.t` no longer contains a static permission field. Read that value through |
| 58 | + `WebAPI.Notification.permission`. |
| 59 | + |
| 60 | +For the intended installation, compiler range, runtime/browser checks, and known limitations, |
| 61 | +see the [project status](https://rescript-lang.github.io/experimental-rescript-webapi/project-status/) |
| 62 | +and [API surface guide](https://rescript-lang.github.io/experimental-rescript-webapi/api-surface/). |
0 commit comments