@cubejs-client/core
Advanced tools
Comparing version 0.2.3 to 0.2.5
@@ -129,3 +129,3 @@ 'use strict'; | ||
}); | ||
pivotConfig = pivotConfig || timeDimensions.length ? { | ||
pivotConfig = pivotConfig || (timeDimensions.length ? { | ||
x: timeDimensions.map(function (td) { | ||
@@ -138,3 +138,3 @@ return td.dimension; | ||
y: [] | ||
}; | ||
}); | ||
@@ -179,3 +179,5 @@ if (!pivotConfig.x.concat(pivotConfig.y).find(function (d) { | ||
var range = moment.range(dateRange[0], dateRange[1]); | ||
var start = moment(dateRange[0]).format('YYYY-MM-DD 00:00:00'); | ||
var end = moment(dateRange[1]).format('YYYY-MM-DD 23:59:59'); | ||
var range = moment.range(start, end); | ||
@@ -182,0 +184,0 @@ if (!TIME_SERIES[timeDimension.granularity]) { |
{ | ||
"name": "@cubejs-client/core", | ||
"version": "0.2.3", | ||
"version": "0.2.5", | ||
"description": "cube.js client", | ||
@@ -15,2 +15,5 @@ "main": "dist/cubejs-client-core.js", | ||
}, | ||
"scripts": { | ||
"test": "jest" | ||
}, | ||
"files": [ | ||
@@ -20,3 +23,9 @@ "src", | ||
], | ||
"license": "MIT" | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@babel/core": "^7.3.3", | ||
"@babel/preset-env": "^7.3.1", | ||
"babel-jest": "^24.1.0", | ||
"jest": "^24.1.0" | ||
} | ||
} |
@@ -63,3 +63,3 @@ import { groupBy, pipe, toPairs, uniq, filter, map, unnest, dropLast, equals, reduce, minBy, maxBy } from 'ramda'; | ||
let timeDimensions = (query.timeDimensions || []).filter(td => !!td.granularity); | ||
pivotConfig = pivotConfig || timeDimensions.length ? { | ||
pivotConfig = pivotConfig || (timeDimensions.length ? { | ||
x: timeDimensions.map(td => td.dimension), | ||
@@ -70,3 +70,3 @@ y: query.dimensions || [] | ||
y: [] | ||
}; | ||
}); | ||
if (!pivotConfig.x.concat(pivotConfig.y).find(d => d === 'measures')) { | ||
@@ -104,3 +104,5 @@ pivotConfig.y = pivotConfig.y.concat(['measures']); | ||
} | ||
const range = moment.range(dateRange[0], dateRange[1]); | ||
const start = moment(dateRange[0]).format('YYYY-MM-DD 00:00:00'); | ||
const end = moment(dateRange[1]).format('YYYY-MM-DD 23:59:59'); | ||
const range = moment.range(start, end); | ||
if (!TIME_SERIES[timeDimension.granularity]) { | ||
@@ -214,2 +216,2 @@ throw new Error(`Unsupported time granularity: ${timeDimension.granularity}`); | ||
} | ||
} | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
457854
10
13082
4