From 548c2c0330b6f5902f01c31569e6e7e74162d729 Mon Sep 17 00:00:00 2001 From: prateek-kumar-improving Date: Mon, 10 Feb 2025 10:11:03 -0800 Subject: [PATCH] Node: Fix @internal tag (#3118) * Node: Fix @internal tag Signed-off-by: Prateek Kumar --- node/DEVELOPER.md | 5 +++++ node/npm/glide/tests/ExportedSymbols.test.ts | 3 +++ node/package.json | 1 + node/src/BaseClient.ts | 1 - node/src/Commands.ts | 3 +-- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/node/DEVELOPER.md b/node/DEVELOPER.md index 34df6e41d0..1cddea2fff 100644 --- a/node/DEVELOPER.md +++ b/node/DEVELOPER.md @@ -98,12 +98,17 @@ Before starting this step, make sure you've installed all software requirments. Once building completed, you'll find the compiled JavaScript code in the`./build-ts` folder. 4. Run tests: + 1. Ensure that you have installed server and valkey-cli on your host. You can download Valkey at the following link: [Valkey Download page](https://valkey.io/download/). 2. Execute the following command from the node folder: + ```bash npm run build # make sure we have a debug build compiled first + npm test-local # For testing on local. For skipping exported symbols validation test on local. npm test + ``` + 5. Integrating the built GLIDE package into your project: Add the package to your project using the folder path with the command `npm install /node`. diff --git a/node/npm/glide/tests/ExportedSymbols.test.ts b/node/npm/glide/tests/ExportedSymbols.test.ts index 7cd4220f15..2005f28850 100644 --- a/node/npm/glide/tests/ExportedSymbols.test.ts +++ b/node/npm/glide/tests/ExportedSymbols.test.ts @@ -12,6 +12,9 @@ const skippedListForExports: string[] = [ "AdvancedBaseClientConfiguration", "ClusterScanOptions", "GlideMultiJson", + "BaseClient", + "convertFieldsAndValuesToHashDataType", + "parseInfoResponse", ]; const glideRsKeyWords: string[] = [ diff --git a/node/package.json b/node/package.json index 93b701ad30..d30243ef31 100644 --- a/node/package.json +++ b/node/package.json @@ -33,6 +33,7 @@ "clean": "rm -rf build-ts rust-client/target docs glide-logs rust-client/glide-rs.*.node rust-client/index.* src/ProtobufMessage.*", "fix-protobuf-file": "replace 'this\\.encode\\(message, writer\\)\\.ldelim' 'this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim' src/ProtobufMessage.js", "test": "npm run build-test-utils && jest --verbose --testPathIgnorePatterns='ServerModules'", + "test-local": "npm run build-test-utils && jest --verbose --testPathIgnorePatterns='Validation of Exported Symbols' --testPathIgnorePatterns='ServerModules'", "test-dbg": "npm run build-test-utils && jest --runInBand", "test-minimum": "npm run build-test-utils && jest --verbose --runInBand --testNamePattern='^(.(?!(GlideJson|GlideFt|pubsub|kill)))*$'", "test-modules": "npm run build-test-utils && jest --verbose --runInBand --testNamePattern='(GlideJson|GlideFt)'", diff --git a/node/src/BaseClient.ts b/node/src/BaseClient.ts index b3e8f0b855..29979b7fc0 100644 --- a/node/src/BaseClient.ts +++ b/node/src/BaseClient.ts @@ -730,7 +730,6 @@ export interface PubSubMsg { export type WritePromiseOptions = RouteOption & DecoderOption; /** - * @internal * Base client interface for GLIDE */ export class BaseClient { diff --git a/node/src/Commands.ts b/node/src/Commands.ts index 17d6750ef9..997e949ae9 100644 --- a/node/src/Commands.ts +++ b/node/src/Commands.ts @@ -54,7 +54,7 @@ function toBuffersArray(args: GlideString[]) { } /** - * @internal @test + * @test */ export function parseInfoResponse(response: string): Record { const lines = response.split("\n"); @@ -434,7 +434,6 @@ export function createHGet( } /** - * @internal * This function converts an input from {@link HashDataType} or `Record` types to `HashDataType`. * * @param fieldsAndValues - field names and their values.