From 1d1b83fa03b0356fd4b2fbc03e3d5d66c7258547 Mon Sep 17 00:00:00 2001 From: Jacob Cable Date: Mon, 21 Oct 2024 16:30:51 +0100 Subject: [PATCH] fix(js/plugins/vertexai): add package.json exports to reranker --- js/plugins/vertexai/package.json | 15 ++++++++++++++- js/testapps/vertexai-reranker/tsconfig.json | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/js/plugins/vertexai/package.json b/js/plugins/vertexai/package.json index cfbe8a39b..82efb9bde 100644 --- a/js/plugins/vertexai/package.json +++ b/js/plugins/vertexai/package.json @@ -66,9 +66,22 @@ "import": "./lib/index.mjs", "types": "./lib/index.d.ts", "default": "./lib/index.js" + }, + "./reranker": { + "require": "./lib/reranker/index.js", + "import": "./lib/reranker/index.mjs", + "types": "./lib/reranker/index.d.ts", + "default": "./lib/reranker/index.js" } }, "typesVersions": { - "*": {} + "*": { + ".": [ + "./lib/index.d.ts" + ], + "./reranker": [ + "./lib/reranker/index.d.ts" + ] + } } } diff --git a/js/testapps/vertexai-reranker/tsconfig.json b/js/testapps/vertexai-reranker/tsconfig.json index efbb566bf..71b16761d 100644 --- a/js/testapps/vertexai-reranker/tsconfig.json +++ b/js/testapps/vertexai-reranker/tsconfig.json @@ -2,7 +2,7 @@ "compileOnSave": true, "include": ["src"], "compilerOptions": { - "module": "commonjs", + "module": "NodeNext", "noImplicitReturns": true, "outDir": "lib", "sourceMap": true,