Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node: Fixed missing exports #2301

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#### Changes
* Node: Fixed missing exports ([#2301](https://github.com/valkey-io/valkey-glide/pull/2301))
* Node: Use `options` struct for all optional arguments ([#2287](https://github.com/valkey-io/valkey-glide/pull/2287))
* Node: Added `invokeScript` API with routing for cluster client ([#2284](https://github.com/valkey-io/valkey-glide/pull/2284))
* Java: Expanded tests for converting non UTF-8 bytes to Strings ([#2286](https://github.com/valkey-io/valkey-glide/pull/2286))
Expand Down
2 changes: 1 addition & 1 deletion examples/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function sendPingToRandomNodeInCluster() {
clientName: "test_cluster_client",
});
// The empty array signifies that there are no additional arguments.
const pong = await client.customCommand(["PING"], "randomNode");
const pong = await client.customCommand(["PING"], { route: "randomNode" });
yipin-chen marked this conversation as resolved.
Show resolved Hide resolved
console.log(pong);
await send_set_and_get(client);
client.close();
Expand Down
2 changes: 1 addition & 1 deletion examples/node/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "module",
"dependencies": {
"@valkey/valkey-glide": "^1.0.0",
"@valkey/valkey-glide": "^1.1.0",
"@types/node": "^20.4.8"
},
"devDependencies": {
Expand Down
12 changes: 12 additions & 0 deletions node/npm/glide/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ function initialize() {
createLeakedMap,
createLeakedString,
parseInfoResponse,
Script,
ObjectType,
ClusterScanCursor,
BaseClientConfiguration,
GlideClusterClientConfiguration,
LevelOptions,
} = nativeBinding;

module.exports = {
Expand Down Expand Up @@ -305,6 +311,12 @@ function initialize() {
createLeakedMap,
createLeakedString,
parseInfoResponse,
Script,
ObjectType,
ClusterScanCursor,
BaseClientConfiguration,
GlideClusterClientConfiguration,
LevelOptions,
};

globalObject = Object.assign(global, nativeBinding);
Expand Down
2 changes: 1 addition & 1 deletion node/src/Logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const LEVEL = new Map<LevelOptions | undefined, Level | undefined>([
["trace", Level.Trace],
[undefined, undefined],
]);
type LevelOptions = "error" | "warn" | "info" | "debug" | "trace";
export type LevelOptions = "error" | "warn" | "info" | "debug" | "trace";

/*
* A singleton class that allows logging which is consistent with logs from the internal rust core.
Expand Down
Loading