Skip to content

Commit

Permalink
Node: include missing exports in the npm release
Browse files Browse the repository at this point in the history
Signed-off-by: Yi-Pin Chen <yi-pin.chen@improving.com>
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
  • Loading branch information
yipin-chen authored and acarbonetto committed Sep 19, 2024
1 parent c672c62 commit c1d7ac9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
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" });
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

0 comments on commit c1d7ac9

Please sign in to comment.