add versions to test args and version getters to config
This commit is contained in:
parent
e63386e9eb
commit
817a4a03b6
|
@ -11,8 +11,20 @@
|
||||||
const TESTS = typeof PRODUCTION === 'undefined';
|
const TESTS = typeof PRODUCTION === 'undefined';
|
||||||
const TEST_ARGS = () => {
|
const TEST_ARGS = () => {
|
||||||
const _basePath = path.resolve(__dirname, '..', '..');
|
const _basePath = path.resolve(__dirname, '..', '..');
|
||||||
const _baseDataPath = path.resolve(_basePath, 'tests');
|
const _baseDataPath = path.resolve(_basePath, 'tests');
|
||||||
|
|
||||||
|
const _corePkg = require(path.resolve(_basePath, 'core', 'package.json'));
|
||||||
|
const _clientPkg = require(path.resolve(_basePath, 'client', 'package.json'));
|
||||||
|
const _editorPkg = require(path.resolve(_basePath, 'editor', 'package.json'));
|
||||||
|
|
||||||
|
const coreVersion = _corePkg.version;
|
||||||
|
const clientVersion = _clientPkg.version;
|
||||||
|
const editorVersion = _editorPkg.version;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
coreVersion,
|
||||||
|
clientVersion,
|
||||||
|
editorVersion,
|
||||||
'options': {
|
'options': {
|
||||||
'autoInject': true,
|
'autoInject': true,
|
||||||
'commonCore': true,
|
'commonCore': true,
|
||||||
|
|
|
@ -16,8 +16,16 @@ export default class Config extends Module {
|
||||||
return this.args.version;
|
return this.args.version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get coreVersion() {
|
||||||
|
return this.state.coreVersion;
|
||||||
|
}
|
||||||
|
|
||||||
get clientVersion() {
|
get clientVersion() {
|
||||||
return this.args.clientVersion;
|
return this.state.clientVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
get editorVersion() {
|
||||||
|
return this.state.editorVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
setClientVersion(clientVersion) {
|
setClientVersion(clientVersion) {
|
||||||
|
|
Loading…
Reference in New Issue