File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -8,9 +8,14 @@ const chalk = require('chalk');
8
8
const ErrorMessage = require ( './error-message' ) ;
9
9
const PathHelpers = require ( './path-helpers' ) ;
10
10
11
- const minimalVersion = { major : 2 , minor : 14 } ;
12
- // prettier-ignore
13
- const supportedRange = `${ minimalVersion . major } .${ minimalVersion . minor } .0 <= v < ${ minimalVersion . major + 1 } .0.0`
11
+ const minimalVersion = /** @type {const } */ ( { major : 2 , minor : 14 } ) ;
12
+
13
+ // TS can't do arithmetic, so make sure the cast is right when bumping the major.
14
+ const nextMajor = /** @type {3 } */ ( minimalVersion . major + 1 ) ;
15
+
16
+ const supportedRange = /** @type {const } */ (
17
+ `${ minimalVersion . major } .${ minimalVersion . minor } .0 <= v < ${ nextMajor } .0.0`
18
+ ) ;
14
19
15
20
/**
16
21
* If given an input version string smaller than the hardcoded `minimalVersion`,
You can’t perform that action at this time.
0 commit comments