From cd21d4cf9a84a7a3acfd1d62f532a717f79e72c4 Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Mon, 21 Oct 2024 10:30:36 -0400 Subject: [PATCH] chore: pin package versions in `genkit init` in prep for next release (#1082) --- genkit-tools/cli/src/commands/init/init-go.ts | 2 +- genkit-tools/cli/src/commands/init/init-nodejs.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/genkit-tools/cli/src/commands/init/init-go.ts b/genkit-tools/cli/src/commands/init/init-go.ts index 03d276efe..33edaca42 100644 --- a/genkit-tools/cli/src/commands/init/init-go.ts +++ b/genkit-tools/cli/src/commands/init/init-go.ts @@ -191,7 +191,7 @@ export async function initGo(options: InitOptions, isNew: boolean) { function installPackages(packages: string[]) { const spinner = ora('Installing Go packages').start(); try { - execSync(`go get ${packages.map((p) => p + '@latest').join(' ')}`, { + execSync(`go get ${packages.map((p) => p + '@v0.1').join(' ')}`, { stdio: 'ignore', }); spinner.succeed('Successfully installed Go packages'); diff --git a/genkit-tools/cli/src/commands/init/init-nodejs.ts b/genkit-tools/cli/src/commands/init/init-nodejs.ts index e80214834..483985be3 100644 --- a/genkit-tools/cli/src/commands/init/init-nodejs.ts +++ b/genkit-tools/cli/src/commands/init/init-nodejs.ts @@ -240,8 +240,8 @@ export async function initNodejs(options: InitOptions, isNew: boolean) { // Compile NPM packages list. const packages = [...externalPackages]; if (!distArchive) { - packages.push(...internalPackages); - packages.push(...plugins); + packages.push(...internalPackages.map((p) => `${p}@^0.5`)); + packages.push(...plugins.map((p) => `${p}@^0.5`)); } // Initialize and configure.