From b531065379638126da81ac24cd20499bca48b4b4 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Wed, 26 Jun 2024 12:06:24 -0700 Subject: [PATCH 1/3] create-integration[patch]: Fill placeholders in package.json --- libs/create-langchain-integration/helpers/templates.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/create-langchain-integration/helpers/templates.ts b/libs/create-langchain-integration/helpers/templates.ts index ce821f9f878f..1118d2e89f36 100644 --- a/libs/create-langchain-integration/helpers/templates.ts +++ b/libs/create-langchain-integration/helpers/templates.ts @@ -30,6 +30,13 @@ export async function installTemplate({ appName, root }: any) { ); packageJson.name = appName; + if (appName.startsWith("@langchain/")) { + const integrationName = appName.replace("@langchain/", ""); + packageJson.description = `Integration for LangChain ${integrationName}`; + packageJson.homepage = `https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-${integrationName}/` + packageJson.scripts.build = `yarn turbo:command build:internal --filter=${appName}`; + } + await fs.writeFile( packageJsonFile, JSON.stringify(packageJson, null, 2) + os.EOL From a4b08a2bd4517d89c51fba742ca2f1e1fa999a6d Mon Sep 17 00:00:00 2001 From: bracesproul Date: Wed, 26 Jun 2024 12:06:36 -0700 Subject: [PATCH 2/3] chore: lint files --- libs/create-langchain-integration/helpers/templates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/create-langchain-integration/helpers/templates.ts b/libs/create-langchain-integration/helpers/templates.ts index 1118d2e89f36..ab960c558289 100644 --- a/libs/create-langchain-integration/helpers/templates.ts +++ b/libs/create-langchain-integration/helpers/templates.ts @@ -33,7 +33,7 @@ export async function installTemplate({ appName, root }: any) { if (appName.startsWith("@langchain/")) { const integrationName = appName.replace("@langchain/", ""); packageJson.description = `Integration for LangChain ${integrationName}`; - packageJson.homepage = `https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-${integrationName}/` + packageJson.homepage = `https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-${integrationName}/`; packageJson.scripts.build = `yarn turbo:command build:internal --filter=${appName}`; } From 8f575884b5e206f839e44799cf9b1d38c1f9926d Mon Sep 17 00:00:00 2001 From: bracesproul Date: Wed, 26 Jun 2024 12:07:58 -0700 Subject: [PATCH 3/3] cr --- libs/create-langchain-integration/helpers/templates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/create-langchain-integration/helpers/templates.ts b/libs/create-langchain-integration/helpers/templates.ts index ab960c558289..983079f60dc6 100644 --- a/libs/create-langchain-integration/helpers/templates.ts +++ b/libs/create-langchain-integration/helpers/templates.ts @@ -28,8 +28,8 @@ export async function installTemplate({ appName, root }: any) { const packageJson: any = JSON.parse( await fs.readFile(packageJsonFile, "utf8") ); - packageJson.name = appName; + packageJson.name = appName; if (appName.startsWith("@langchain/")) { const integrationName = appName.replace("@langchain/", ""); packageJson.description = `Integration for LangChain ${integrationName}`;