Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
console.log(`bumping version ${oldVersion} to specific version ${newVersion}`);
}
if (argv.dry) {
console.log(colors.yellow("dry run:") + " not updating package files");
} else {
console.log(`updating package.json from ${colors.blue(pack.version)} to ${colors.green(newVersion)}`);
pack.version = newVersion;
fs.writeFileSync(packPath, JSON.stringify(pack, null, 2));
console.log(`updating CHANGELOG.md`);
const d = new Date();
changelog = changelog.replace(
CHANGELOG_PLACEHOLDER,
`## ${newVersion} (${d.getFullYear()}-${padStart("" + (d.getMonth() + 1), 2, "0")}-${padStart("" + d.getDate(), 2, "0")})`,
);
fs.writeFileSync(changelogPath, changelog, "utf8");
// console.log(`updating io-package.json from ${colors.blue(ioPack.common.version)} to ${colors.green(newVersion)}`);
// ioPack.common.version = newVersion;
// fs.writeFileSync(ioPackPath, JSON.stringify(ioPack, null, 4));
}
const gitCommands = [
`npm install`,
`git add -A`,
`git commit -m "release v${newVersion} [skip ci]"`,
`git push`,
`git tag v${newVersion}`,
`git push origin --tags`,
];
return [r, g, b].map(c => padStart(c.toString(16), 2, "0")).join("");
}
return [r, g, b].map(c => strings_1.padStart(c.toString(16), 2, "0")).join("");
}