chore(m3u): bump parser for input robustness and library hygiene

Pulls the fork's real-world input tolerance: UTF-8 BOM, blank lines and
whitespace before the header, and case-insensitive #EXTM3U no longer
reject the playlist (all VLC-accepted forms); Node Buffers are decoded
as UTF-8 and other non-string input throws a clear TypeError. Also
brings truthful types (url?: string), fork metadata, an enforced 100%
coverage gate, and the fork CHANGELOG.

Extends the contract spec with a BOM regression test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5 committed 2026-07-19 08:10:32 +02:00
1 parent 41d9369c1a
commit 2341cf4786
3 files changed
+17 -7

No files matched your search

@@ -83,6 +83,15 @@ describe('iptv-playlist-parser contract (4gray fork)', () => {
expect(result.items[0].http.referrer).toBe('http://ref.example');
});
it('accepts playlists with a UTF-8 BOM before the header', () => {
const result = parse(
'#EXTM3U\n#EXTINF:-1,One\nhttp://example.com/one.m3u8\n'
);
expect(result.items.length).toBe(1);
expect(result.items[0].url).toBe('http://example.com/one.m3u8');
});
it('exposes EPG urls from the playlist header', () => {
const result = parse(
[
+1 -1
View File
@@ -97,7 +97,7 @@
"epg-parser": "^0.1.6",
"fix-path": "5.0.0",
"hls.js": "1.6.13",
"iptv-playlist-parser": "github:4gray/iptv-playlist-parser#f1948986add4b58987974d399b724b496f978579",
"iptv-playlist-parser": "github:4gray/iptv-playlist-parser#33f5e9c09539524d758901c02a6f29302833c0a4",
"marked": "18.0.5",
"mpegts.js": "1.8.0",
"ms": "2.1.3",
+7 -6
View File
@@ -126,8 +126,8 @@ importers:
specifier: 1.6.13
version: 1.6.13
iptv-playlist-parser:
specifier: github:4gray/iptv-playlist-parser#f1948986add4b58987974d399b724b496f978579
version: https://codeload.github.com/4gray/iptv-playlist-parser/tar.gz/f1948986add4b58987974d399b724b496f978579
specifier: github:4gray/iptv-playlist-parser#33f5e9c09539524d758901c02a6f29302833c0a4
version: https://codeload.github.com/4gray/iptv-playlist-parser/tar.gz/33f5e9c09539524d758901c02a6f29302833c0a4
marked:
specifier: 18.0.5
version: 18.0.5
@@ -7594,9 +7594,10 @@ packages:
resolution: {integrity: sha512-Zv/pA+ciVFbCSBBjGfaKUya/CcGmUHzTydLMaTwrUUEM2DIEO3iZvueGxmacvmN50fGpGVKeTXpb2LcYQxeVdg==}
engines: {node: '>= 10'}
iptv-playlist-parser@https://codeload.github.com/4gray/iptv-playlist-parser/tar.gz/f1948986add4b58987974d399b724b496f978579:
resolution: {tarball: https://codeload.github.com/4gray/iptv-playlist-parser/tar.gz/f1948986add4b58987974d399b724b496f978579}
version: 0.15.2
iptv-playlist-parser@https://codeload.github.com/4gray/iptv-playlist-parser/tar.gz/33f5e9c09539524d758901c02a6f29302833c0a4:
resolution: {tarball: https://codeload.github.com/4gray/iptv-playlist-parser/tar.gz/33f5e9c09539524d758901c02a6f29302833c0a4}
version: 0.15.2-iptvnator.1
engines: {node: '>=18'}
iron-webcrypto@1.2.1:
resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==}
@@ -20590,7 +20591,7 @@ snapshots:
ipaddr.js@2.3.0: {}
iptv-playlist-parser@https://codeload.github.com/4gray/iptv-playlist-parser/tar.gz/f1948986add4b58987974d399b724b496f978579: {}
iptv-playlist-parser@https://codeload.github.com/4gray/iptv-playlist-parser/tar.gz/33f5e9c09539524d758901c02a6f29302833c0a4: {}
iron-webcrypto@1.2.1: {}