music-routes-data 5.0.1 → 5.1.1

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/bin/verify CHANGED
@@ -44,6 +44,16 @@ const artistIds = getSet('artists')
44
44
  const releaseIds = getSet('releases')
45
45
  const individualIds = getSet('individuals')
46
46
 
47
+ // All IDs are strings but must not contain colons or slashes because the visualizer
48
+ // uses IDs as directory names.
49
+ const validateIds = (idsSet) => {
50
+ assert.ok(idsSet.values().every((id) => typeof id === 'string' && !id.includes(':') && !id.includes('/')), 'Invalid ID found')
51
+ }
52
+ validateIds(trackIds)
53
+ validateIds(artistIds)
54
+ validateIds(individualIds)
55
+ validateIds(releaseIds)
56
+
47
57
  const artistTrackIds = {
48
58
  artist: getSet('artist_track', { idName: 'artist_id', ignoreDuplicates: true }),
49
59
  track: getSet('artist_track', { idName: 'track_id', ignoreDuplicates: true })