( pkg: BumpObject, opts: WriteOptions, )
| 11 | } |
| 12 | |
| 13 | export const writeUpdate = async ( |
| 14 | pkg: BumpObject, |
| 15 | opts: WriteOptions, |
| 16 | ): Promise<void> => { |
| 17 | const pkgPath = path.join(pkg.path, 'package.json'); |
| 18 | const pkgJson: PackageJson = await fs.readJson(pkgPath); |
| 19 | if (opts.version) pkgJson.version = pkg.bumpVersion; |
| 20 | if (opts.hash) pkgJson.publishHash = pkg.hash; |
| 21 | await fs.writeFile(pkgPath, stringify(pkgJson)); |
| 22 | }; |
| 23 | |
| 24 | const getPackages = async (dir: string): Promise<string[]> => { |
| 25 | const packages = await fs.readdir(dir, { |
no outgoing calls
no test coverage detected