From c1f841267e47ec796ad077fb8f8fae3c4e1803d9 Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Wed, 31 Jul 2024 14:10:12 -0400 Subject: [PATCH] fix: moved core lib deps to peer deps for plugins (#669) --- js/plugins/chroma/package.json | 10 ++++++---- js/plugins/dev-local-vectorstore/package.json | 6 ++++-- js/plugins/dotprompt/package.json | 6 ++++-- js/plugins/evaluators/package.json | 6 ++++-- js/plugins/firebase/package.json | 8 ++++---- js/plugins/google-cloud/package.json | 6 ++++-- js/plugins/googleai/package.json | 6 ++++-- js/plugins/langchain/package.json | 12 +++++++----- js/plugins/ollama/package.json | 2 +- js/plugins/pinecone/package.json | 6 ++++-- js/plugins/vertexai/package.json | 9 +++------ 11 files changed, 45 insertions(+), 32 deletions(-) diff --git a/js/plugins/chroma/package.json b/js/plugins/chroma/package.json index c7b17ef34..8b6cf4edb 100644 --- a/js/plugins/chroma/package.json +++ b/js/plugins/chroma/package.json @@ -30,11 +30,13 @@ "author": "genkit", "license": "Apache-2.0", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "chromadb": "^1.7.3", "ts-md5": "^1.3.1", - "zod": "^3.22.4" + "zod": "^3.22.4", + "chromadb": "^1.7.3" + }, + "peerDependencies": { + "@genkit-ai/ai": "workspace:*", + "@genkit-ai/core": "workspace:*" }, "devDependencies": { "@types/node": "^20.11.16", diff --git a/js/plugins/dev-local-vectorstore/package.json b/js/plugins/dev-local-vectorstore/package.json index e18d46a4b..2b5c28764 100644 --- a/js/plugins/dev-local-vectorstore/package.json +++ b/js/plugins/dev-local-vectorstore/package.json @@ -27,12 +27,14 @@ "author": "genkit", "license": "Apache-2.0", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", "compute-cosine-similarity": "^1.1.0", "ts-md5": "^1.3.1", "zod": "^3.22.4" }, + "peerDependencies": { + "@genkit-ai/ai": "workspace:*", + "@genkit-ai/core": "workspace:*" + }, "devDependencies": { "@types/node": "^20.11.16", "npm-run-all": "^4.1.5", diff --git a/js/plugins/dotprompt/package.json b/js/plugins/dotprompt/package.json index 1a35eeb98..a3b564516 100644 --- a/js/plugins/dotprompt/package.json +++ b/js/plugins/dotprompt/package.json @@ -27,13 +27,15 @@ "author": "genkit", "license": "Apache-2.0", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", "front-matter": "^4.0.2", "handlebars": "^4.7.8", "node-fetch": "^3.3.2", "zod": "^3.22.4" }, + "peerDependencies": { + "@genkit-ai/ai": "workspace:*", + "@genkit-ai/core": "workspace:*" + }, "devDependencies": { "@types/node": "^20.11.16", "npm-run-all": "^4.1.5", diff --git a/js/plugins/evaluators/package.json b/js/plugins/evaluators/package.json index e8b5a1065..f5e2f09b7 100644 --- a/js/plugins/evaluators/package.json +++ b/js/plugins/evaluators/package.json @@ -30,14 +30,16 @@ "author": "genkit", "license": "Apache-2.0", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", "@genkit-ai/dotprompt": "workspace:*", "compute-cosine-similarity": "^1.1.0", "node-fetch": "^3.3.2", "path": "^0.12.7", "zod": "^3.22.4" }, + "peerDependencies": { + "@genkit-ai/ai": "workspace:*", + "@genkit-ai/core": "workspace:*" + }, "devDependencies": { "@types/node": "^20.11.16", "npm-run-all": "^4.1.5", diff --git a/js/plugins/firebase/package.json b/js/plugins/firebase/package.json index 09356bb65..3bda0ec33 100644 --- a/js/plugins/firebase/package.json +++ b/js/plugins/firebase/package.json @@ -31,9 +31,6 @@ "author": "genkit", "license": "Apache-2.0", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/flow": "workspace:*", "@genkit-ai/google-cloud": "workspace:*", "express": "^4.19.2", "google-auth-library": "^9.6.3", @@ -42,7 +39,10 @@ "peerDependencies": { "@google-cloud/firestore": "^7.6.0", "firebase-admin": "^12.2.0", - "firebase-functions": "^4.8.0 || ^5.0.0" + "firebase-functions": "^4.8.0 || ^5.0.0", + "@genkit-ai/ai": "workspace:*", + "@genkit-ai/core": "workspace:*", + "@genkit-ai/flow": "workspace:*" }, "devDependencies": { "@types/node": "^20.11.16", diff --git a/js/plugins/google-cloud/package.json b/js/plugins/google-cloud/package.json index c163affb4..deefa4ce9 100644 --- a/js/plugins/google-cloud/package.json +++ b/js/plugins/google-cloud/package.json @@ -31,8 +31,6 @@ "author": "genkit", "license": "Apache-2.0", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", "@google-cloud/logging-winston": "^6.0.0", "@google-cloud/opentelemetry-cloud-monitoring-exporter": "^0.19.0", "@google-cloud/opentelemetry-cloud-trace-exporter": "^2.1.0", @@ -52,6 +50,10 @@ "prettier-plugin-organize-imports": "^3.2.4", "winston": "^3.12.0" }, + "peerDependencies": { + "@genkit-ai/ai": "workspace:*", + "@genkit-ai/core": "workspace:*" + }, "devDependencies": { "@types/node": "^20.11.16", "npm-run-all": "^4.1.5", diff --git a/js/plugins/googleai/package.json b/js/plugins/googleai/package.json index 38382b5f8..9111cc1a0 100644 --- a/js/plugins/googleai/package.json +++ b/js/plugins/googleai/package.json @@ -31,13 +31,15 @@ "author": "genkit", "license": "Apache-2.0", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", "@google/generative-ai": "^0.15.0", "google-auth-library": "^9.6.3", "node-fetch": "^3.3.2", "zod": "^3.22.4" }, + "peerDependencies": { + "@genkit-ai/ai": "workspace:*", + "@genkit-ai/core": "workspace:*" + }, "devDependencies": { "@types/node": "^20.11.16", "npm-run-all": "^4.1.5", diff --git a/js/plugins/langchain/package.json b/js/plugins/langchain/package.json index 5b83b951e..c7e03fcff 100644 --- a/js/plugins/langchain/package.json +++ b/js/plugins/langchain/package.json @@ -26,14 +26,16 @@ "author": "genkit", "license": "Apache-2.0", "dependencies": { + "@langchain/community": "^0.0.53", + "@langchain/core": "^0.1.61", + "@opentelemetry/api": "^1.7.0", + "zod": "^3.22.4" + }, + "peerDependencies": { "@genkit-ai/ai": "workspace:*", "@genkit-ai/core": "workspace:*", "@genkit-ai/flow": "workspace:*", - "zod": "^3.22.4", - "langchain": "^0.1.36", - "@langchain/community": "^0.0.53", - "@langchain/core": "^0.1.61", - "@opentelemetry/api": "^1.7.0" + "langchain": "^0.1.36" }, "devDependencies": { "@types/node": "^20.11.16", diff --git a/js/plugins/ollama/package.json b/js/plugins/ollama/package.json index fad47ecb1..4fd51f386 100644 --- a/js/plugins/ollama/package.json +++ b/js/plugins/ollama/package.json @@ -26,7 +26,7 @@ }, "author": "genkit", "license": "Apache-2.0", - "dependencies": { + "peerDependencies": { "@genkit-ai/ai": "workspace:*", "@genkit-ai/core": "workspace:*" }, diff --git a/js/plugins/pinecone/package.json b/js/plugins/pinecone/package.json index 1caab6aab..db1a00ef5 100644 --- a/js/plugins/pinecone/package.json +++ b/js/plugins/pinecone/package.json @@ -30,12 +30,14 @@ "author": "genkit", "license": "Apache-2.0", "dependencies": { - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", "@pinecone-database/pinecone": "^2.0.1", "ts-md5": "^1.3.1", "zod": "^3.22.4" }, + "peerDependencies": { + "@genkit-ai/ai": "workspace:*", + "@genkit-ai/core": "workspace:*" + }, "devDependencies": { "@types/node": "^20.11.16", "npm-run-all": "^4.1.5", diff --git a/js/plugins/vertexai/package.json b/js/plugins/vertexai/package.json index 64c114cf6..4d2ac1a8a 100644 --- a/js/plugins/vertexai/package.json +++ b/js/plugins/vertexai/package.json @@ -37,21 +37,18 @@ "dependencies": { "@anthropic-ai/sdk": "^0.24.3", "@anthropic-ai/vertex-sdk": "^0.4.0", - "@genkit-ai/ai": "workspace:*", - "@genkit-ai/core": "workspace:*", - "@genkit-ai/flow": "workspace:*", "@google-cloud/aiplatform": "^3.23.0", "@google-cloud/vertexai": "^1.1.0", "google-auth-library": "^9.6.3", "googleapis": "^140.0.1", "node-fetch": "^3.3.2", - "openai": "^4.52.7" + "openai": "^4.52.7", + "zod": "^3.22.4" }, "peerDependencies": { "@genkit-ai/ai": "workspace:*", "@genkit-ai/core": "workspace:*", - "@genkit-ai/flow": "workspace:*", - "zod": "^3.22.4" + "@genkit-ai/flow": "workspace:*" }, "optionalDependencies": { "firebase-admin": "^12.1.0",