Skip to content

Commit 8fac746

Browse files
committed
release 2.10.0
2 parents e672fe6 + 6f51f12 commit 8fac746

File tree

5 files changed

+204
-195
lines changed

5 files changed

+204
-195
lines changed

.github/workflows/natsjs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
test:
1414
strategy:
1515
matrix:
16-
node-version: [18.x, 16.x, 14.x]
16+
node-version: [19.x, 18.x, 16.x, 14.x]
1717

1818
runs-on: ubuntu-latest
1919

@@ -31,7 +31,7 @@ jobs:
3131
with:
3232
deno-version: 1.27.0
3333
- name: Set NATS Server Version
34-
run: echo "NATS_VERSION=v2.9.5" >> $GITHUB_ENV
34+
run: echo "NATS_VERSION=v2.9.9" >> $GITHUB_ENV
3535
- name: Get nats-server
3636
run: |
3737
wget "https://github.com/nats-io/nats-server/releases/download/$NATS_VERSION/nats-server-$NATS_VERSION-linux-amd64.zip" -O tmp.zip

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ simply to illustrate not only how to create responses, but how the subject
201201
itself is used to dispatch different behaviors.
202202

203203
```javascript
204-
import { connect, StringCodec, Subscription } from "nats";
204+
import { connect, StringCodec } from "nats";
205205

206206
// create a connection
207207
const nc = await connect({ servers: "demo.nats.io" });
@@ -210,8 +210,8 @@ const nc = await connect({ servers: "demo.nats.io" });
210210
const sc = StringCodec();
211211

212212
// this subscription listens for `time` requests and returns the current time
213-
const sub = nc.subscribe("time");
214-
(async (sub: Subscription) => {
213+
const subscription = nc.subscribe("time");
214+
(async (sub) => {
215215
console.log(`listening for ${sub.getSubject()} requests...`);
216216
for await (const m of sub) {
217217
if (m.respond(sc.encode(new Date().toISOString()))) {
@@ -221,7 +221,7 @@ const sub = nc.subscribe("time");
221221
}
222222
}
223223
console.log(`subscription ${sub.getSubject()} drained.`);
224-
})(sub);
224+
})(subscription);
225225

226226
// this subscription listens for admin.uptime and admin.stop
227227
// requests to admin.uptime returns how long the service has been running
@@ -276,7 +276,7 @@ Here's a simple example of a client making a simple request from the service
276276
above:
277277

278278
```javascript
279-
import { connect, StringCodec } from "nats";
279+
import { connect, Empty, StringCodec } from "nats";
280280

281281
// create a connection
282282
const nc = await connect({ servers: "demo.nats.io:4222" });

0 commit comments

Comments
 (0)