Skip to content

Commit

Permalink
updates simulator sdk dependency in version-bump (#3777)
Browse files Browse the repository at this point in the history
the simulator package depends on the sdk, so we need to bump the dependency
version whenever we bump the sdk version.

failure to do so results in lint failures in CI since it creates yarn
dependencies on multiple sdk versions.
  • Loading branch information
hughy authored Apr 12, 2023
1 parent c76c772 commit 098ba1d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/version-bump.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const path = require('path')
const CLI_PACKAGE = path.join(__dirname, '../ironfish-cli/package.json')
const NODE_PACKAGE = path.join(__dirname, '../ironfish/package.json')
const RUST_PACKAGE = path.join(__dirname, '../ironfish-rust-nodejs/package.json')
const SIMULATOR_PACKAGE = path.join(__dirname, '../simulator/package.json')

const shouldBumpIronfishRust = process.argv.find((a) => a.includes('rust'))

Expand Down Expand Up @@ -63,17 +64,20 @@ const getDirectories = async source =>
const bumpNodeAndCliPackage = async (shouldBumpRust) => {
const nodePackage = await readPackage(NODE_PACKAGE)
const cliPackage = await readPackage(CLI_PACKAGE)
const simulatorPackage = await readPackage(SIMULATOR_PACKAGE)

// Bump node package and packages that depend on it
const newNodeVersion = bumpPatch(nodePackage.version)
nodePackage.version = newNodeVersion
cliPackage.dependencies[nodePackage.name] = newNodeVersion
simulatorPackage.dependencies[nodePackage.name] = newNodeVersion

// Bump the CLI
cliPackage.version = bumpPatch(cliPackage.version)

writePackage(NODE_PACKAGE, nodePackage)
writePackage(CLI_PACKAGE, cliPackage)
writePackage(SIMULATOR_PACKAGE, simulatorPackage)
}

const bumpRustPackage = async () => {
Expand Down

0 comments on commit 098ba1d

Please sign in to comment.