musora-content-services 2.146.1 → 2.147.0

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,13 @@
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
+ ## [2.147.0](https://github.com/railroadmedia/musora-content-services/compare/v2.146.1...v2.147.0) (2026-04-02)
6
+
7
+
8
+ ### Features
9
+
10
+ * Add children to fetchScheduledAndNewReleases for navigateTo calculations ([#901](https://github.com/railroadmedia/musora-content-services/issues/901)) ([3ade1ad](https://github.com/railroadmedia/musora-content-services/commit/3ade1ad400e1dd9e56d245f3a37d77d709a0d4e1))
11
+
5
12
  ### [2.146.1](https://github.com/railroadmedia/musora-content-services/compare/v2.146.0...v2.146.1) (2026-04-02)
6
13
 
7
14
  ## [2.146.0](https://github.com/railroadmedia/musora-content-services/compare/v2.145.9...v2.146.0) (2026-04-02)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "musora-content-services",
3
- "version": "2.146.1",
3
+ "version": "2.147.0",
4
4
  "description": "A package for Musoras content services ",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
package/publish.sh CHANGED
@@ -4,16 +4,16 @@
4
4
  set -e
5
5
 
6
6
  # Check if there are uncommitted changes.
7
- #if ! git diff-index --quiet HEAD --; then
8
- # echo "You have uncommitted changes. Please commit or stash them before publishing."
9
- # exit 1
10
- #fi
7
+ if ! git diff-index --quiet HEAD --; then
8
+ echo "You have uncommitted changes. Please commit or stash them before publishing."
9
+ exit 1
10
+ fi
11
11
 
12
12
  # Run the release script
13
- # npm run release
13
+ npm run release
14
14
 
15
15
  # Push the changes and tags to the remote repository
16
- # git push --follow-tags origin main
16
+ git push --follow-tags origin main
17
17
 
18
18
  # Publish the package to npm
19
19
  npm publish
@@ -72,7 +72,7 @@ export const DEFAULT_FIELDS = [
72
72
  '"grandparent_id": parent_content_data[1].id',
73
73
  'live_event_start_time',
74
74
  'live_event_end_time',
75
- 'enrollment_start_time',
75
+ 'enrollment_start_time',
76
76
  'enrollment_end_time',
77
77
  ]
78
78
 
@@ -677,6 +677,7 @@ export let contentTypeConfig = {
677
677
  'show_in_new_feed',
678
678
  isLiveField()
679
679
  ],
680
+ includeChildFields: true,
680
681
  },
681
682
  }
682
683
 
@@ -343,21 +343,26 @@ export async function getContentRows(brand, pageName, contentRowSlug = null, {
343
343
  * .then(response => console.log(response))
344
344
  * .catch(error => console.error(error));
345
345
  */
346
- export async function getNewAndUpcoming(brand, {
347
- page = 1,
348
- limit = 10,
349
- } = {}) {
346
+ export async function getNewAndUpcoming(brand, { page = 1, limit = 10 } = {}) {
347
+ const data = await addContextToContent(
348
+ fetchScheduledAndNewReleases,
349
+ brand,
350
+ { page: page, limit: limit },
351
+ {
352
+ addNavigateTo: true,
353
+ addProgressPercentage: true,
354
+ addProgressStatus: true,
355
+ }
356
+ )
350
357
 
351
- const data = await fetchScheduledAndNewReleases(brand, {page: page, limit: limit});
352
358
  if (!data) {
353
- return null;
359
+ return null
354
360
  }
355
361
 
356
362
  return {
357
363
  data: data,
358
- };
364
+ }
359
365
  }
360
-
361
366
  /**
362
367
  * Fetches scheduled content rows for a given brand with optional filtering by content row ID.
363
368
  *
@@ -2088,7 +2088,7 @@ export async function fetchScheduledAndNewReleases(
2088
2088
 
2089
2089
  const parentsWithoutSong = parentRecentTypes.filter(type => type !== 'song')
2090
2090
 
2091
- const fields = getFieldsForContentType('new-and-scheduled')
2091
+ const fields = await getFieldsForContentTypeWithFilteredChildren('new-and-scheduled')
2092
2092
 
2093
2093
  const lessonFilter = f.combine(
2094
2094
  "show_in_new_feed == true",