File tree 2 files changed +12
-5
lines changed
2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @prestashop-core/ui-testing" ,
3
- "version" : " 0.0.10 " ,
3
+ "version" : " 0.0.11 " ,
4
4
"description" : " " ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -32,18 +32,25 @@ export default {
32
32
} ,
33
33
/**
34
34
* Return the version of current PrestaShop (depending the env value `PS_VERSION`)
35
+ * * `1.7.8.11` => `7.8.11`
36
+ * * `1.7.8.x` => `7.8.99`
37
+ * * `8.0.1` => `8.0.1`
38
+ * * `8.0.x` => `8.0.99`
39
+ * * `` => `99.99.99`
40
+ * * `develop` => `99.99.99`
41
+ * * `nightly` => `99.99.99`
35
42
* @returns string
36
43
*/
37
44
getPSVersion ( ) : string {
38
- if ( ! process . env . PS_VERSION ) {
39
- return '0.0.0' ;
40
- }
41
- if ( process . env . PS_VERSION === 'nightly' ) {
45
+ if ( ! process . env . PS_VERSION
46
+ || process . env . PS_VERSION === 'develop'
47
+ || process . env . PS_VERSION === 'nightly' ) {
42
48
return '99.99.99' ;
43
49
}
44
50
const version : string = process . env . PS_VERSION ;
45
51
46
52
return version
53
+ . replace ( / \. x $ / , '.99' )
47
54
. replace ( / ^ 1 \. 7 \. / , '7.' ) ;
48
55
} ,
49
56
} ;
You can’t perform that action at this time.
0 commit comments