From d43ea268b01e80166ca9325bf174a9796105715f Mon Sep 17 00:00:00 2001 From: matt korwel Date: Thu, 3 Jul 2025 22:57:01 -0500 Subject: Releasing: Utilizing Github Actions and Tagging for release. (#2852) Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: N. Taylor Mullen --- scripts/bind_package_dependencies.js | 50 ------------------------------------ 1 file changed, 50 deletions(-) delete mode 100644 scripts/bind_package_dependencies.js (limited to 'scripts/bind_package_dependencies.js') diff --git a/scripts/bind_package_dependencies.js b/scripts/bind_package_dependencies.js deleted file mode 100644 index eb9a4cc6..00000000 --- a/scripts/bind_package_dependencies.js +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @license - * Copyright 2025 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ - -import fs from 'node:fs'; -import path from 'node:path'; -import _ from 'lodash'; - -function bindPackageDependencies() { - const scriptDir = process.cwd(); - const currentPkgJsonPath = path.join(scriptDir, 'package.json'); - const currentPkg = JSON.parse(fs.readFileSync(currentPkgJsonPath)); - // assume packages are all under //packages/ - const packagesDir = path.join(path.dirname(scriptDir)); - - const geminiCodePkgs = fs - .readdirSync(packagesDir) - .filter( - (name) => - fs.statSync(path.join(packagesDir, name)).isDirectory() && - fs.existsSync(path.join(packagesDir, name, 'package.json')), - ) - .map((packageDirname) => { - const packageJsonPath = path.join( - packagesDir, - packageDirname, - 'package.json', - ); - return JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); - }) - .reduce((pkgs, pkg) => ({ ...pkgs, [pkg.name]: pkg }), {}); - currentPkg.dependencies = _.mapValues( - currentPkg.dependencies, - (value, key) => { - if (geminiCodePkgs[key]) { - console.log( - `Package ${currentPkg.name} has a dependency on ${key}. Updating dependent version.`, - ); - return geminiCodePkgs[key].version; - } - return value; - }, - ); - const updatedPkgJson = JSON.stringify(currentPkg, null, 2) + '\n'; - fs.writeFileSync(currentPkgJsonPath, updatedPkgJson); -} - -bindPackageDependencies(); -- cgit v1.2.3