@@ -655,7 +655,7 @@ class PackageURL {
655655 // Split the remainder once from left on ':'
656656 const colonIndex = StringPrototypeIndexOf ( purlStr , ':' )
657657 // Use WHATWG URL to split up the purl string
658- /* c8 ignore next 3 -- Comment lines don't need coverage. */
658+ /* v8 ignore next 3 -- Comment lines don't need coverage. */
659659 // - Split the purl string once from right on '#'
660660 // - Split the remainder once from right on '?'
661661 // - Split the remainder once from left on ':'
@@ -675,7 +675,7 @@ class PackageURL {
675675 // When leading slashes were trimmed, the original string had an authority
676676 // section (e.g., pkg://user:pass@host/...). Detect `@` in the authority
677677 // by checking between the `//` and the next `/`.
678- /* c8 ignore next 8 -- V8 coverage sees multiple branch paths that can't all be tested. */
678+ /* v8 ignore next 8 -- V8 coverage sees multiple branch paths that can't all be tested. */
679679 if ( afterColon . length !== trimmedAfterColon . length ) {
680680 // afterColon starts with slashes — find the authority section
681681 const authorityStart = StringPrototypeIndexOf ( afterColon , '//' ) + 2
@@ -697,11 +697,11 @@ class PackageURL {
697697 }
698698 }
699699 // The scheme is a constant with the value "pkg"
700- /* c8 ignore next -- Tested: colonIndex === -1 (url undefined) case, but V8 can't see both branches. */ if (
700+ /* v8 ignore next -- Tested: colonIndex === -1 (url undefined) case, but V8 can't see both branches. */ if (
701701 url ?. protocol !== 'pkg:'
702702 ) {
703703 throw new PurlError ( 'missing required "pkg" scheme component' )
704- /* c8 ignore next -- Unreachable code after throw. */
704+ /* v8 ignore next -- Unreachable code after throw. */
705705 }
706706 // A purl must NOT contain a URL Authority i.e. there is no support for
707707 // username, password, host and port components
@@ -723,14 +723,14 @@ class PackageURL {
723723
724724 let rawVersion : string | undefined
725725 // Both branches of this ternary are tested, but V8 reports phantom branch combinations
726- /* c8 ignore start -- npm vs non-npm path logic both tested but V8 sees extra branches. */
726+ /* v8 ignore start -- npm vs non-npm path logic both tested but V8 sees extra branches. */
727727 // Deviate from the specification to handle a special npm purl type case for
728728 // pnpm ids such as 'pkg:npm/next@14.2.10(react-dom@18.3.1(react@18.3.1))(react@18.3.1)'
729729 let atSignIndex =
730730 rawType === 'npm'
731731 ? StringPrototypeIndexOf ( pathname , '@' , firstSlashIndex + 2 )
732732 : StringPrototypeLastIndexOf ( pathname , '@' )
733- /* c8 ignore stop */
733+ /* v8 ignore stop */
734734 // When a forward slash ('/') is directly preceding an '@' symbol,
735735 // then the '@' symbol is NOT considered a version separator
736736 if (
@@ -790,7 +790,7 @@ class PackageURL {
790790 )
791791 // Use URLSearchParams#append to preserve plus signs
792792 // https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams#preserving_plus_signs
793- /* c8 ignore next -- URLSearchParams.append has internal V8 branches we can't control. */ searchParams . append (
793+ /* v8 ignore next -- URLSearchParams.append has internal V8 branches we can't control. */ searchParams . append (
794794 key ,
795795 value ,
796796 )
0 commit comments