Skip to content

Commit

Permalink
change imports to jsr
Browse files Browse the repository at this point in the history
  • Loading branch information
aricart committed Jun 13, 2024
1 parent 6339c16 commit 661876f
Show file tree
Hide file tree
Showing 12 changed files with 42 additions and 43 deletions.
46 changes: 25 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
"bump-release": "npm version patch --no-commit-hooks --no-git-tag-version"
},
"engines": {
"node": ">= 16.0.0"
"node": ">= 18.0.0"
},
"dependencies": {
"@nats-io/nats-core": "^3.0.0-16",
"nkeys.js": "1.1.0",
"nuid": "^2.0.1-1"
"@nats-io/nats-core": "^3.0.0-17",
"nkeys.js": "^1.2.0-4",
"nuid": "^2.0.1-2"
},
"devDependencies": {
"@types/node": "^20.12.12",
Expand Down
7 changes: 4 additions & 3 deletions test/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@
*/
const test = require("ava");
const {
connect,
credsAuthenticator,
deferred,
ErrorCode,
Events,
jwtAuthenticator,
nkeyAuthenticator,
} = require(
"../",
"@nats-io/nats-core/internal",
);
const { nkeys } = require("../lib/nats-base-client/internal_mod");

const {connect} = require("../src/mod.ts");
const { nkeys } = require("nkeys.js");
const { NatsServer } = require("./helpers/launcher");
const {
createOperator,
Expand Down
2 changes: 1 addition & 1 deletion test/basics.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const {
const net = require("net");

const { deferred, delay, nuid } = require(
"../lib/nats-base-client/internal_mod",
"@nats-io/nats-core/internal",
);
const { Lock } = require("./helpers/lock");
const { NatsServer } = require("./helpers/launcher");
Expand Down
2 changes: 1 addition & 1 deletion test/clobber.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const {
} = require("../");
const { NatsServer } = require("./helpers/launcher");
const { connect } = require("../");
const { DataBuffer } = require("../lib/nats-base-client/internal_mod");
const { DataBuffer } = require("@nats-io/nats-core/internal");

function makeBuffer(N) {
const buf = new Uint8Array(N);
Expand Down
2 changes: 1 addition & 1 deletion test/heartbeats.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const test = require("ava");
// install globals
require("../");
const { deferred, delay, DebugEvents, Heartbeat } = require(
"../lib/nats-base-client/internal_mod",
"@nats-io/nats-core/internal",
);

function pm(
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/delay.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const {
deferred,
} = require("../../lib/nats-base-client/internal_mod");
} = require("@nats-io/nats-core/internal");

exports.check = function check(
fn,
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const {
delay,
timeout,
nuid,
} = require("../../lib/nats-base-client/internal_mod");
} = require("@nats-io/nats-core/internal");

const { spawn } = require("child_process");

Expand Down
4 changes: 1 addition & 3 deletions test/msgheaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
* limitations under the License.
*/
const test = require("ava");
// install globals
require("../lib/src/mod");
const { NatsError, MsgHdrsImpl, canonicalMIMEHeaderKey } = require(
"../lib/nats-base-client/internal_mod",
"@nats-io/nats-core/internal",
);

test("msgheaders - basics", (t) => {
Expand Down
4 changes: 1 addition & 3 deletions test/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
* limitations under the License.
*/
const test = require("ava");
// install globals
require("../lib/src/mod");

const {
Kind,
Parser,
State,
} = require("../lib/nats-base-client/internal_mod");
} = require("@nats-io/nats-core/internal");

let te = new TextEncoder();
const td = new TextDecoder();
Expand Down
2 changes: 1 addition & 1 deletion test/reconnect.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const {
ErrorCode,
deferred,
DebugEvents,
} = require("../lib/nats-base-client/internal_mod");
} = require("@nats-io/nats-core/internal");
const { Lock } = require("./helpers/lock");

test("reconnect - should receive when some servers are invalid", async (t) => {
Expand Down
4 changes: 1 addition & 3 deletions test/tls.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ const { resolve, join } = require("path");
const { readFileSync } = require("fs");
const { Lock } = require("./helpers/lock");
const { NatsServer } = require("./helpers/launcher");
const { buildAuthenticator } = require("../lib/nats-base-client/options");
const { extend } = require("../lib/nats-base-client/util");
const { Connect } = require("../lib/nats-base-client/protocol");
const { buildAuthenticator, extend, Connect} = require("@nats-io/nats-core/internal");

const dir = process.cwd();
const tlsConfig = {
Expand Down

0 comments on commit 661876f

Please sign in to comment.