musora-content-services 1.4.9 → 1.4.11

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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.4.11](https://github.com/railroadmedia/musora-content-services/compare/v1.4.10...v1.4.11) (2025-04-30)
6
+
7
+ ### [1.4.10](https://github.com/railroadmedia/musora-content-services/compare/v1.4.9...v1.4.10) (2025-04-30)
8
+
5
9
  ### [1.4.9](https://github.com/railroadmedia/musora-content-services/compare/v1.4.8...v1.4.9) (2025-04-30)
6
10
 
7
11
  ### [1.4.8](https://github.com/railroadmedia/musora-content-services/compare/v1.4.7...v1.4.8) (2025-04-30)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.4.9",
3
+ "version": "1.4.11",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -55,7 +55,7 @@ export function buildImageSRC(url, options = {}) {
55
55
  export function applySanityTransformations(url, options) {
56
56
  const { width, height, quality } = options
57
57
 
58
- const sanityOptions = ['auto=format']
58
+ const sanityOptions = ['fm=webp']
59
59
 
60
60
  // Dimensions
61
61
  if (width) sanityOptions.push(`w=${width}`)
@@ -14,7 +14,7 @@ describe('imageSRCBuilder', function () {
14
14
  quality: quality,
15
15
  height: height,
16
16
  })
17
- const expected = `${url}?auto=format&w=${width}&h=${height}&q=${quality}`
17
+ const expected = `${url}?fm=webp&w=${width}&h=${height}&q=${quality}`
18
18
 
19
19
  expect(resultingURL).toStrictEqual(expected)
20
20
  })
@@ -64,22 +64,21 @@ describe('Sanity Queries', function () {
64
64
  test('fetchReturning', async () => {
65
65
  const brand = 'guitareo'
66
66
  const page = 1
67
- const response = await fetchReturning(brand, {pageNumber: 1})
67
+ const response = await fetchReturning(brand, { pageNumber: 1 })
68
68
  expect(response).toBeDefined()
69
- });
69
+ })
70
70
 
71
71
  test('fetchLeaving', async () => {
72
72
  const brand = 'guitareo'
73
- const response = await fetchLeaving(brand, {pageNumber: 1})
73
+ const response = await fetchLeaving(brand, { pageNumber: 1 })
74
74
  expect(response).toBeDefined()
75
- });
75
+ })
76
76
 
77
77
  test('fetchComingSoon', async () => {
78
78
  const brand = 'guitareo'
79
- const response = await fetchComingSoon(brand, {pageNumber: 2, contentPerPage: 20})
79
+ const response = await fetchComingSoon(brand, { pageNumber: 2, contentPerPage: 20 })
80
80
  expect(response).toBeDefined()
81
- });
82
-
81
+ })
83
82
 
84
83
  test('fetchArtists', async () => {
85
84
  const response = await fetchArtists('drumeo')
@@ -292,7 +291,7 @@ describe('Sanity Queries', function () {
292
291
 
293
292
  test('fetchRelatedTutorials', async () => {
294
293
  const railContentId = 387379
295
- const brand = "pianote"
294
+ const brand = 'pianote'
296
295
  const queryResult = await fetchRelatedTutorials(railContentId, brand)
297
296
  console.log(queryResult)
298
297
  expect(typeof queryResult).toBe('object') //check structure of parent
@@ -638,8 +637,12 @@ describe('Sanity Queries', function () {
638
637
  expect(hierarchy.parents[241250]).toBe(241249)
639
638
  expect(hierarchy.parents[241249]).toBe(241248)
640
639
  expect(hierarchy.parents[241248]).toBe(241247)
641
- expect(hierarchy.children[241250]).toStrictEqual([241676])
642
- expect(hierarchy.children[243085]).toStrictEqual([243170, 243171, 243172, 243174, 243176])
640
+ expect(hierarchy.children[241250]).toContain(241676)
641
+ expect(hierarchy.children[243085]).toContain(243170)
642
+ expect(hierarchy.children[243085]).toContain(243171)
643
+ expect(hierarchy.children[243085]).toContain(243172)
644
+ expect(hierarchy.children[243085]).toContain(243174)
645
+ expect(hierarchy.children[243085]).toContain(243176)
643
646
  })
644
647
 
645
648
  test('fetchTopLeveldrafts', async () => {