@adobe/spacecat-shared-athena-client 1.8.1 → 1.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/pta2/queries.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@adobe/spacecat-shared-athena-client-v1.8.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-athena-client-v1.8.1...@adobe/spacecat-shared-athena-client-v1.8.2) (2025-12-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fix query for PTRv2 weekly trend ([#1209](https://github.com/adobe/spacecat-shared/issues/1209)) ([5a8fa92](https://github.com/adobe/spacecat-shared/commit/5a8fa9226ec7ab9dd022f022fc2ed930155dec9f))
|
|
7
|
+
|
|
1
8
|
# [@adobe/spacecat-shared-athena-client-v1.8.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-athena-client-v1.8.0...@adobe/spacecat-shared-athena-client-v1.8.1) (2025-12-03)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
package/src/pta2/queries.js
CHANGED
|
@@ -21,7 +21,8 @@ import { getTemporalCondition } from '@adobe/spacecat-shared-utils';
|
|
|
21
21
|
* @returns {Object} Previous period with week/month and year
|
|
22
22
|
*/
|
|
23
23
|
export function getPreviousPeriod({ week, month, year }) {
|
|
24
|
-
if (week
|
|
24
|
+
// Check if week is defined and valid (prioritize week over month)
|
|
25
|
+
if (Number.isInteger(week)) {
|
|
25
26
|
// Calculate previous week
|
|
26
27
|
const prevWeek = week - 1;
|
|
27
28
|
if (prevWeek < 1) {
|
|
@@ -33,7 +34,7 @@ export function getPreviousPeriod({ week, month, year }) {
|
|
|
33
34
|
return { week: prevWeek, year };
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
if (month
|
|
37
|
+
if (Number.isInteger(month)) {
|
|
37
38
|
// Calculate previous month
|
|
38
39
|
const prevMonth = month - 1;
|
|
39
40
|
if (prevMonth < 1) {
|