Skip to content

Commit

Permalink
Merge pull request #480 from nats-io/rel1_12_0
Browse files Browse the repository at this point in the history
1.12.0
  • Loading branch information
aricart committed Feb 9, 2023
2 parents 755a914 + b42cc28 commit 2f81d4d
Show file tree
Hide file tree
Showing 60 changed files with 225 additions and 132 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
environment: CI
strategy:
matrix:
deno-version: [1.29.2]
deno-version: [1.30.3]

steps:
- name: Git Checkout Deno Module
Expand All @@ -30,7 +30,7 @@ jobs:
deno-version: ${{ matrix.deno-version }}

- name: Set NATS Server Version
run: echo "NATS_VERSION=v2.9.11" >> $GITHUB_ENV
run: echo "NATS_VERSION=v2.9.14" >> $GITHUB_ENV

# this here because dns seems to be wedged on gha
# - name: Add hosts to /etc/hosts
Expand All @@ -44,13 +44,6 @@ jobs:
mv nats-server-$NATS_VERSION-linux-amd64 nats-server
rm nats-server/README.md LICENSE
# - name: Get nats-server
# run: |
# wget "https://github.com/aricart/wsgnatsd/releases/download/v0.8.4/nats-server-$NATS_VERSION-linux-amd64.zip" -O tmp.zip
# unzip tmp.zip
# mv nats-server-$NATS_VERSION-linux-amd64 nats-server
# rm nats-server/README.md LICENSE

- name: Lint Deno Module
run: deno fmt --check --ignore=docs/

Expand Down
19 changes: 17 additions & 2 deletions bin/exports.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
import { parse } from "https://deno.land/std@0.171.0/flags/mod.ts";
/*
* Copyright 2021-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { parse } from "https://deno.land/std@0.177.0/flags/mod.ts";
import {
basename,
extname,
join,
resolve,
} from "https://deno.land/std@0.171.0/path/mod.ts";
} from "https://deno.land/std@0.177.0/path/mod.ts";

const argv = parse(
Deno.args,
Expand Down
2 changes: 1 addition & 1 deletion dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ This file lists the dependencies used in this repository.

| Dependency | License |
| ------------------------------------------ | ----------- |
| https://deno.land/std@0.171.0/flags/mod.ts | MIT License |
| https://deno.land/std@0.177.0/flags/mod.ts | MIT License |
| http://github.com/nats-io/nkeys.js | Apache-2.0 |
3 changes: 1 addition & 2 deletions examples/bench.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env deno run --allow-all --unstable

import { parse } from "https://deno.land/std@0.171.0/flags/mod.ts";
import { parse } from "https://deno.land/std@0.177.0/flags/mod.ts";
import { connect, Nuid } from "../src/mod.ts";
import { Bench, Metric } from "../nats-base-client/bench.ts";
const defaults = {
Expand Down
2 changes: 1 addition & 1 deletion examples/nats-events.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env deno run --allow-all --unstable

import { parse } from "https://deno.land/std@0.171.0/flags/mod.ts";
import { parse } from "https://deno.land/std@0.177.0/flags/mod.ts";
import { connect, ConnectionOptions } from "../src/mod.ts";

const argv = parse(
Expand Down
2 changes: 1 addition & 1 deletion examples/nats-pub.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env deno run --allow-all --unstable

import { parse } from "https://deno.land/std@0.171.0/flags/mod.ts";
import { parse } from "https://deno.land/std@0.177.0/flags/mod.ts";
import {
connect,
ConnectionOptions,
Expand Down
2 changes: 1 addition & 1 deletion examples/nats-rep.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env deno run --allow-all --unstable

import { parse } from "https://deno.land/std@0.171.0/flags/mod.ts";
import { parse } from "https://deno.land/std@0.177.0/flags/mod.ts";
import {
connect,
ConnectionOptions,
Expand Down
2 changes: 1 addition & 1 deletion examples/nats-req.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env deno run --allow-all --unstable

import { parse } from "https://deno.land/std@0.171.0/flags/mod.ts";
import { parse } from "https://deno.land/std@0.177.0/flags/mod.ts";
import {
connect,
ConnectionOptions,
Expand Down
2 changes: 1 addition & 1 deletion examples/nats-sub.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env deno run --allow-all --unstable

import { parse } from "https://deno.land/std@0.171.0/flags/mod.ts";
import { parse } from "https://deno.land/std@0.177.0/flags/mod.ts";
import {
connect,
ConnectionOptions,
Expand Down
4 changes: 2 additions & 2 deletions examples/services/01_services.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2022 The NATS Authors
* Copyright 2022-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -24,7 +24,7 @@ import {
ServiceMsg,
ServiceStats,
} from "../../src/mod.ts";
import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.177.0/testing/asserts.ts";

// connect to NATS on demo.nats.io
const nc = await connect({ servers: ["demo.nats.io"] });
Expand Down
6 changes: 3 additions & 3 deletions src/deno_transport.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2022 The NATS Authors
* Copyright 2020-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -13,7 +13,7 @@
* limitations under the License.
*/

import { BufWriter } from "https://deno.land/std@0.171.0/io/mod.ts";
import { BufWriter } from "https://deno.land/std@0.177.0/io/mod.ts";
import { Deferred, deferred } from "../nats-base-client/internal_mod.ts";
import Conn = Deno.Conn;
import {
Expand All @@ -33,7 +33,7 @@ import {
} from "../nats-base-client/internal_mod.ts";
import type { TlsOptions } from "../nats-base-client/types.ts";

const VERSION = "1.11.0";
const VERSION = "1.12.0";
const LANG = "nats.deno";

// if trying to simply write to the connection for some reason
Expand Down
4 changes: 2 additions & 2 deletions tests/auth_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2022 The NATS Authors
* Copyright 2018-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -17,7 +17,7 @@ import {
assertEquals,
assertRejects,
fail,
} from "https://deno.land/std@0.171.0/testing/asserts.ts";
} from "https://deno.land/std@0.177.0/testing/asserts.ts";
import {
connect,
createInbox,
Expand Down
17 changes: 16 additions & 1 deletion tests/authenticator_test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2022-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import { cleanup, setup } from "./jstest_util.ts";
import {
credsAuthenticator,
Expand All @@ -9,7 +24,7 @@ import {
tokenAuthenticator,
usernamePasswordAuthenticator,
} from "../nats-base-client/mod.ts";
import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.177.0/testing/asserts.ts";
import { nkeys } from "../nats-base-client/nkeys.ts";
import {
encodeAccount,
Expand Down
4 changes: 2 additions & 2 deletions tests/autounsub_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2021 The NATS Authors
* Copyright 2018-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.177.0/testing/asserts.ts";

import { createInbox, Empty, ErrorCode, Subscription } from "../src/mod.ts";
import { Lock } from "./helpers/mod.ts";
Expand Down
4 changes: 2 additions & 2 deletions tests/basics_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2021 The NATS Authors
* Copyright 2020-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -20,7 +20,7 @@ import {
assertRejects,
assertThrows,
fail,
} from "https://deno.land/std@0.171.0/testing/asserts.ts";
} from "https://deno.land/std@0.177.0/testing/asserts.ts";

import { assertThrowsAsyncErrorCode } from "./helpers/asserts.ts";

Expand Down
4 changes: 2 additions & 2 deletions tests/bench_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2021 The NATS Authors
* Copyright 2018-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -16,7 +16,7 @@ import {
assert,
assertEquals,
assertThrows,
} from "https://deno.land/std@0.171.0/testing/asserts.ts";
} from "https://deno.land/std@0.177.0/testing/asserts.ts";
import { Bench, connect, createInbox } from "../src/mod.ts";
import { BenchOpts, Metric } from "../nats-base-client/bench.ts";

Expand Down
4 changes: 2 additions & 2 deletions tests/binary_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2021 The NATS Authors
* Copyright 2018-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -13,7 +13,7 @@
* limitations under the License.
*/

import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.177.0/testing/asserts.ts";
import { createInbox, Msg } from "../src/mod.ts";
import { deferred } from "../nats-base-client/internal_mod.ts";
import { cleanup, setup } from "./jstest_util.ts";
Expand Down
2 changes: 1 addition & 1 deletion tests/buffer_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
assert,
assertEquals,
assertThrows,
} from "https://deno.land/std@0.171.0/testing/asserts.ts";
} from "https://deno.land/std@0.177.0/testing/asserts.ts";
import {
DenoBuffer,
MAX_SIZE,
Expand Down
4 changes: 2 additions & 2 deletions tests/clobber_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2021 The NATS Authors
* Copyright 2020-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -16,7 +16,7 @@
import { NatsServer } from "./helpers/launcher.ts";
import { createInbox, DataBuffer } from "../nats-base-client/internal_mod.ts";
import { connect } from "../src/mod.ts";
import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.177.0/testing/asserts.ts";

function makeBuffer(N: number): Uint8Array {
const buf = new Uint8Array(N);
Expand Down
4 changes: 2 additions & 2 deletions tests/codec_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2022 The NATS Authors
* Copyright 2020-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -13,7 +13,7 @@
* limitations under the License.
*/
import { JSONCodec, StringCodec } from "../nats-base-client/codec.ts";
import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.177.0/testing/asserts.ts";

Deno.test("codec - string", () => {
const sc = StringCodec();
Expand Down
4 changes: 2 additions & 2 deletions tests/consumeropts_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021 The NATS Authors
* Copyright 2021-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -17,7 +17,7 @@ import {
assert,
assertEquals,
assertThrows,
} from "https://deno.land/std@0.171.0/testing/asserts.ts";
} from "https://deno.land/std@0.177.0/testing/asserts.ts";

import {
consumerOpts,
Expand Down
4 changes: 2 additions & 2 deletions tests/databuffer_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2018-2021 The NATS Authors
* Copyright 2018-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -12,7 +12,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.177.0/testing/asserts.ts";
import { DataBuffer } from "../nats-base-client/internal_mod.ts";

Deno.test("databuffer - empty", () => {
Expand Down
6 changes: 3 additions & 3 deletions tests/doublesubs_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2021 The NATS Authors
* Copyright 2020-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -25,9 +25,9 @@ import {
import {
assertArrayIncludes,
assertEquals,
} from "https://deno.land/std@0.171.0/testing/asserts.ts";
} from "https://deno.land/std@0.177.0/testing/asserts.ts";
import { extend } from "../nats-base-client/util.ts";
import { join, resolve } from "https://deno.land/std@0.171.0/path/mod.ts";
import { join, resolve } from "https://deno.land/std@0.177.0/path/mod.ts";

async function runDoubleSubsTest(tls: boolean) {
const cwd = Deno.cwd();
Expand Down
4 changes: 2 additions & 2 deletions tests/drain_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2020-2021 The NATS Authors
* Copyright 2020-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -16,7 +16,7 @@ import {
assert,
assertEquals,
fail,
} from "https://deno.land/std@0.171.0/testing/asserts.ts";
} from "https://deno.land/std@0.177.0/testing/asserts.ts";
import { assertThrowsAsyncErrorCode } from "./helpers/asserts.ts";
import {
connect,
Expand Down
4 changes: 2 additions & 2 deletions tests/events_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021-2021 The NATS Authors
* Copyright 2021-2023 The NATS Authors
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
Expand All @@ -14,7 +14,7 @@
*/
import { Lock, NatsServer, ServerSignals } from "../tests/helpers/mod.ts";
import { connect, Events, ServersChanged } from "../src/mod.ts";
import { assertEquals } from "https://deno.land/std@0.171.0/testing/asserts.ts";
import { assertEquals } from "https://deno.land/std@0.177.0/testing/asserts.ts";
import { delay, NatsConnectionImpl } from "../nats-base-client/internal_mod.ts";
import { setup } from "./jstest_util.ts";

Expand Down

0 comments on commit 2f81d4d

Please sign in to comment.