-
Notifications
You must be signed in to change notification settings - Fork 576
/
Copy pathglobals.js
32 lines (27 loc) · 1000 Bytes
/
globals.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* eslint import/no-commonjs: off, flowtype/require-valid-file-annotation: off, flowtype/require-return-type: off */
let postRobotGlobals = require('post-robot/globals');
let zoidGlobals = require('zoid/globals');
function getNextVersion() {
let version = require('./package.json').version;
version = version.split('.');
version[2] = (parseInt(version[2], 10) + 1).toString();
version = version.join('.');
return version;
}
function getNextMajorVersion() {
return getNextVersion().split('.')[0];
}
function getNextMinorVersion() {
return getNextVersion();
}
module.exports = Object.assign({}, postRobotGlobals, zoidGlobals, {
__PAYPAL_CHECKOUT__: {
__LEGACY_SUPPORT__: true,
__DEFAULT_LOG_LEVEL__: 'warn',
__MAJOR__: true,
__MAJOR_VERSION__: getNextMajorVersion(),
__MINOR_VERSION__: getNextMinorVersion(),
__sdk__: undefined,
__paypal_checkout__: undefined
}
});