File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ import {base64Map} from "./base64Map.js";
3
3
/**
4
4
* @private
5
5
* @description Encodes a semVer-like version string for OS
6
- * @param {string } semVer Input can be either x.y.z or x.y
7
- * @return {string } A string built from 3 characters of the base64 table that encode the semVer
6
+ * @param {string } semVer Input is x.y
7
+ * @return {string } A string built from 2 characters of the base64 table that encode the semVer
8
8
*/
9
9
export function encodeOSVersion ( semVer : string ) :string {
10
10
const [ major , minor ] = semVer . split ( '.' ) ;
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export function encodeVersion(semVer: string):string {
17
17
const paddedStringLength = parts * 6 ; // we pad to either 12 or 18 characters
18
18
// reverse (but don't mirror) the version. 1.5.15 -> 15.5.1
19
19
const reversedSemver = reverseVersion ( semVer ) ;
20
- // Pad to two spaces, 15.5.1 -> 15.05.01x
20
+ // Pad to two spaces, 15.5.1 -> 15.05.01
21
21
const paddedSemver = padVersion ( reversedSemver ) ;
22
22
// turn 15.05.01 to a string '150501' then to a number 150501
23
23
const num = parseInt ( paddedSemver . split ( '.' ) . join ( '' ) ) ;
You can’t perform that action at this time.
0 commit comments