Skip to content

Commit

Permalink
release 2.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aricart committed Dec 19, 2022
2 parents e672fe6 + 6f51f12 commit 8fac746
Show file tree
Hide file tree
Showing 5 changed files with 204 additions and 195 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/natsjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
test:
strategy:
matrix:
node-version: [18.x, 16.x, 14.x]
node-version: [19.x, 18.x, 16.x, 14.x]

runs-on: ubuntu-latest

Expand All @@ -31,7 +31,7 @@ jobs:
with:
deno-version: 1.27.0
- name: Set NATS Server Version
run: echo "NATS_VERSION=v2.9.5" >> $GITHUB_ENV
run: echo "NATS_VERSION=v2.9.9" >> $GITHUB_ENV
- name: Get nats-server
run: |
wget "https://github.com/nats-io/nats-server/releases/download/$NATS_VERSION/nats-server-$NATS_VERSION-linux-amd64.zip" -O tmp.zip
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ simply to illustrate not only how to create responses, but how the subject
itself is used to dispatch different behaviors.

```javascript
import { connect, StringCodec, Subscription } from "nats";
import { connect, StringCodec } from "nats";

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

// this subscription listens for `time` requests and returns the current time
const sub = nc.subscribe("time");
(async (sub: Subscription) => {
const subscription = nc.subscribe("time");
(async (sub) => {
console.log(`listening for ${sub.getSubject()} requests...`);
for await (const m of sub) {
if (m.respond(sc.encode(new Date().toISOString()))) {
Expand All @@ -221,7 +221,7 @@ const sub = nc.subscribe("time");
}
}
console.log(`subscription ${sub.getSubject()} drained.`);
})(sub);
})(subscription);

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

```javascript
import { connect, StringCodec } from "nats";
import { connect, Empty, StringCodec } from "nats";

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

0 comments on commit 8fac746

Please sign in to comment.