@baeta/subscriptions-pubsub 2.0.0-next.15 → 2.0.0-next.16

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +25 -42
  2. package/README.md +2 -1
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,62 +1,45 @@
1
1
  # @baeta/subscriptions-pubsub
2
2
 
3
- ## 2.0.0-next.15
3
+ ## 2.0.0-next.16
4
4
 
5
- ### Patch Changes
6
-
7
- - Drop Node v23 and v25 by [@andreisergiu98](https://github.com/andreisergiu98) in [#474](https://github.com/andreisergiu98/baeta/pull/474)
8
-
9
- ## 2.0.0-next.14
10
-
11
- ### Patch Changes
12
-
13
- - Fix wrong error being thrown in the case for single errors by [@andreisergiu98](https://github.com/andreisergiu98) in [#397](https://github.com/andreisergiu98/baeta/pull/397)
14
-
15
- ## 2.0.0-next.13
16
-
17
- ## 2.0.0-next.12
18
-
19
- ## 2.0.0-next.11
20
-
21
- ## 2.0.0-next.10
22
-
23
- ## 2.0.0-next.9
5
+ ### Major Changes
24
6
 
25
- ## 2.0.0-next.8
7
+ - Drop support for Node.js v23 and v25. Baeta now targets the active LTS releases — Node.js `^22.20.0`, `^24.0.0`, or `>=26.0.0`. by [@andreisergiu98](https://github.com/andreisergiu98) in [#290](https://github.com/andreisergiu98/baeta/pull/290)
26
8
 
27
- ## 2.0.0-next.7
9
+ - `TypedPubSub` is now a concrete class you instantiate with `new`, the `createTypedPubSub()` factory has been removed, and the package targets `graphql-subscriptions` v3 only. Support for `graphql-subscriptions` v2 (and its runtime engine detection) is gone. by [@andreisergiu98](https://github.com/andreisergiu98) in [#290](https://github.com/andreisergiu98/baeta/pull/290)
28
10
 
29
- ## 2.0.0-next.6
11
+ #### Creating the PubSub
30
12
 
31
- ### Patch Changes
13
+ In v1, `TypedPubSub` was a _type_ and you built the instance with the `createTypedPubSub()` factory, which detected the engine version (`asyncIterator` for v2, `asyncIterableIterator` for v3) at runtime. In v2, `TypedPubSub` is the class itself.
32
14
 
33
- - Fix export for subscriptions-pubsub
15
+ **v1:**
34
16
 
35
- ## 2.0.0-next.2
17
+ ```typescript
18
+ import { createTypedPubSub } from "@baeta/subscriptions-pubsub";
19
+ import { PubSub } from "graphql-subscriptions";
36
20
 
37
- ### Patch Changes
21
+ export const pubsub = createTypedPubSub<PubSub, PubSubMap>(new PubSub());
22
+ ```
38
23
 
39
- - Fix broken types
24
+ **v2:**
40
25
 
41
- ## 2.0.0-next.1
26
+ ```typescript
27
+ import { TypedPubSub } from "@baeta/subscriptions-pubsub";
28
+ import { PubSub } from "graphql-subscriptions";
42
29
 
43
- ### Patch Changes
30
+ export const pubsub = new TypedPubSub<PubSub, PubSubMap>(new PubSub());
31
+ ```
44
32
 
45
- - Fix release version
33
+ The optional `{ prefix }` options object is unchanged and still passed as the second argument.
46
34
 
47
- ## 2.0.0-next.0
35
+ #### Removed and changed exports
48
36
 
49
- ### Major Changes
37
+ - `createTypedPubSub()` — removed; use `new TypedPubSub(...)`.
38
+ - `PubSubEngineV2` / `PubSubEngineV3` — removed. The package now targets a single `graphql-subscriptions` v3 engine.
39
+ - `TypedPubSub` — was a type alias in v1; is now the exported class.
40
+ - `TypedPubSubOptions` — unchanged.
50
41
 
51
- - [#214](https://github.com/andreisergiu98/baeta/pull/214) [`31d1a50`](https://github.com/andreisergiu98/baeta/commit/31d1a509f96535b43ae85d19c770eb1a5f09dc94) Thanks [@andreisergiu98](https://github.com/andreisergiu98)! - Baeta v2 – major refactor
52
- - **Side-effect-free type generation & resolver definitions.**
53
- The types generator and resolver definitions were reworked to be side-effect free, improving type safety.
54
- - **Stricter type safety.**
55
- You must now **explicitly define resolvers for every field** during development—breakages that used to surface at runtime are now caught at compile time.
56
- - **Removed `@baeta/compiler`.**
57
- Since modern runtimes can execute TypeScript natively, the separate compiler package is no longer needed. Use your runtime’s native TS support or your existing build setup.
58
- - **Subscriptions update.**
59
- `@baeta/subscriptions-pubsub` now targets **`graphql-subscriptions` v3**.
42
+ Because v2 support is dropped, the `asyncIterator` method (the v2-only iterator) is no longer available — use `asyncIterableIterator(channel)` for the async iterable. `publish`, `subscribe`, and `unsubscribe` are unchanged.
60
43
 
61
44
  ## 1.0.9
62
45
 
package/README.md CHANGED
@@ -5,9 +5,10 @@
5
5
  <div align="center">
6
6
  <h1>Baeta</h1>
7
7
  <a href="https://www.npmjs.com/package/@baeta/cli"><img src="https://img.shields.io/npm/v/@baeta/cli.svg?style=flat" /></a>
8
- <a href="https://github.com/andreisergiu98/baeta/actions/workflows/checks.yml"><img src="https://img.shields.io/github/actions/workflow/status/andreisergiu98/baeta/checks.yml" /></a>
8
+ <a href="https://github.com/andreisergiu98/baeta/actions/workflows/build.yml"><img src="https://img.shields.io/github/actions/workflow/status/andreisergiu98/baeta/build.yml" /></a>
9
9
  <a href="https://github.com/andreisergiu98/baeta/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" /></a>
10
10
  <a href="https://github.com/andreisergiu98/baeta/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" /></a>
11
+ <img alt="nycrc config on GitHub" src="https://img.shields.io/nycrc/andreisergiu98/baeta?config=.nycrc.json&preferredThreshold=branches&color=green">
11
12
  <br />
12
13
  <br />
13
14
  <a href="https://baeta.io/docs/getting-started/installation">Getting Started</a>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baeta/subscriptions-pubsub",
3
- "version": "2.0.0-next.15",
3
+ "version": "2.0.0-next.16",
4
4
  "description": "Typed PubSub helpers for Baeta subscriptions.",
5
5
  "keywords": [
6
6
  "baeta",