Skip to content

Commit 674601b

Browse files
committed
Strip leading 0 too
1 parent d389809 commit 674601b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build/updatePackageVersion.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const json = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json
66
const jsonLock = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package-lock.json')).toString());
77

88
// Set version to TS Version
9-
const version = jsonLock['dependencies']['typescript']['version'].replace(/\-\w*\./g, '');
9+
const version = jsonLock['dependencies']['typescript']['version'].replace(/0?\-\w*\./g, '');
1010
if (version === json['version']) {
1111
console.log(`Already at latest version ${version}`);
1212
process.exit(1);

0 commit comments

Comments
 (0)