musora-content-services 1.4.4 → 1.4.8

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,32 @@
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.8](https://github.com/railroadmedia/musora-content-services/compare/v1.4.7...v1.4.8) (2025-04-30)
6
+
7
+ ### [1.4.7](https://github.com/railroadmedia/musora-content-services/compare/v1.4.4...v1.4.7) (2025-04-08)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * **BR-178:** fix url routing to genres on song-tutorial page ([#209](https://github.com/railroadmedia/musora-content-services/issues/209)) ([d32e37a](https://github.com/railroadmedia/musora-content-services/commit/d32e37af4fe53c1d7c5c1fd4eb646df54e007f95))
13
+ * **TP-833:** mod comments missing content ([#222](https://github.com/railroadmedia/musora-content-services/issues/222)) ([55e6e0c](https://github.com/railroadmedia/musora-content-services/commit/55e6e0c4f602d336b99c32f231265a94e35ace4f))
14
+
15
+ ### [1.4.6](https://github.com/railroadmedia/musora-content-services/compare/v1.4.4...v1.4.6) (2025-04-08)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **BR-178:** fix url routing to genres on song-tutorial page ([#209](https://github.com/railroadmedia/musora-content-services/issues/209)) ([d32e37a](https://github.com/railroadmedia/musora-content-services/commit/d32e37af4fe53c1d7c5c1fd4eb646df54e007f95))
21
+ * **TP-833:** mod comments missing content ([#222](https://github.com/railroadmedia/musora-content-services/issues/222)) ([55e6e0c](https://github.com/railroadmedia/musora-content-services/commit/55e6e0c4f602d336b99c32f231265a94e35ace4f))
22
+
23
+ ### [1.4.5](https://github.com/railroadmedia/musora-content-services/compare/v1.4.4...v1.4.5) (2025-04-08)
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * **BR-178:** fix url routing to genres on song-tutorial page ([#209](https://github.com/railroadmedia/musora-content-services/issues/209)) ([d32e37a](https://github.com/railroadmedia/musora-content-services/commit/d32e37af4fe53c1d7c5c1fd4eb646df54e007f95))
29
+ * **TP-833:** mod comments missing content ([#222](https://github.com/railroadmedia/musora-content-services/issues/222)) ([55e6e0c](https://github.com/railroadmedia/musora-content-services/commit/55e6e0c4f602d336b99c32f231265a94e35ace4f))
30
+
5
31
  ### [1.4.4](https://github.com/railroadmedia/musora-content-services/compare/v1.4.3...v1.4.4) (2025-03-31)
6
32
 
7
33
  ### [1.4.3](https://github.com/railroadmedia/musora-content-services/compare/v1.4.2...v1.4.3) (2025-03-31)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "1.4.4",
3
+ "version": "1.4.8",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -154,6 +154,7 @@ export let contentTypeConfig = {
154
154
  isOneToOne: true,
155
155
  },
156
156
  },
157
+ slug: 'song-tutorials',
157
158
  },
158
159
  'song-tutorial-children': {
159
160
  fields: [`"resources": ${resourcesField}`],
File without changes
@@ -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 = []
58
+ const sanityOptions = ['auto=format']
59
59
 
60
60
  // Dimensions
61
61
  if (width) sanityOptions.push(`w=${width}`)
@@ -1852,13 +1852,16 @@ function populateHierarchyLookups(currentLevel, data, parentId) {
1852
1852
  * @returns {Promise<Object|null>} - A promise that resolves to an object containing the data
1853
1853
  */
1854
1854
  export async function fetchCommentModContentData(ids) {
1855
+ if (!ids) {
1856
+ return []
1857
+ }
1855
1858
  const idsString = ids.join(',')
1856
1859
  const fields = `"id": railcontent_id, "type": _type, title, "url": web_url_path, "parent": *[^._id in child[]._ref]{"id": railcontent_id, title}`
1857
1860
  const query = await buildQuery(
1858
1861
  `railcontent_id in [${idsString}]`,
1859
1862
  { bypassPermissions: true },
1860
1863
  fields,
1861
- { end: 50 }
1864
+ { end: ids.length }
1862
1865
  )
1863
1866
  let data = await fetchSanity(query, true)
1864
1867
  let mapped = {}
@@ -14,7 +14,7 @@ describe('imageSRCBuilder', function () {
14
14
  quality: quality,
15
15
  height: height,
16
16
  })
17
- const expected = `${url}?w=${width}&h=${height}&q=${quality}`
17
+ const expected = `${url}?auto=format&w=${width}&h=${height}&q=${quality}`
18
18
 
19
19
  expect(resultingURL).toStrictEqual(expected)
20
20
  })