@@ -5,7 +5,7 @@ import { describe, test } from "node:test";
55import assert from "node:assert" ;
66
77// Import Third-party Dependencies
8- import { CollectableSet , warnings , type Warning } from "@nodesecure/js-x-ray" ;
8+ import { DefaultCollectableSet , warnings , type Warning } from "@nodesecure/js-x-ray" ;
99import { ManifestManager } from "@nodesecure/mama" ;
1010
1111type SourceArrayLocation = [ [ number , number ] , [ number , number ] ] ;
@@ -26,7 +26,7 @@ describe("NpmTarball", () => {
2626 test ( "it should have a shady-link warning when a hostname resolve a private ip address with collectables" , async ( ) => {
2727 const mama = await ManifestManager . fromPackageJSON ( path . join ( kFixturePath , "shady-link" , "package.json" ) ) ;
2828 const npmTarball = new NpmTarball ( mama ) ;
29- const hostnameSet = new CollectableSet ( "hostname" ) ;
29+ const hostnameSet = new DefaultCollectableSet ( "hostname" ) ;
3030
3131 const result = await npmTarball . scanFiles ( {
3232 collectables : [ hostnameSet ]
@@ -101,7 +101,7 @@ describe("NpmTarball", () => {
101101 const npmTarball = new NpmTarball ( mama ) ;
102102
103103 const result = await npmTarball . scanFiles ( {
104- collectables : [ new CollectableSet ( "url" ) , new CollectableSet ( "ip" ) ]
104+ collectables : [ new DefaultCollectableSet ( "url" ) , new DefaultCollectableSet ( "ip" ) ]
105105 } ) ;
106106
107107 assert . deepEqual (
@@ -136,7 +136,7 @@ describe("NpmTarball", () => {
136136 test ( "it should add the spec to collectables" , async ( ) => {
137137 const mama = await ManifestManager . fromPackageJSON ( path . join ( kFixturePath , "shady-link" , "package.json" ) ) ;
138138 const npmTarball = new NpmTarball ( mama ) ;
139- const hostnameSet = new CollectableSet < Metadata > ( "hostname" ) ;
139+ const hostnameSet = new DefaultCollectableSet < Metadata > ( "hostname" ) ;
140140
141141 await npmTarball . scanFiles ( {
142142 collectables : [ hostnameSet ]
@@ -146,7 +146,7 @@ describe("NpmTarball", () => {
146146 } ) ;
147147} ) ;
148148
149- function extractSpecs ( collectableSet : CollectableSet < Metadata > ) {
149+ function extractSpecs ( collectableSet : DefaultCollectableSet < Metadata > ) {
150150 return Array . from ( collectableSet )
151151 . flatMap ( ( { locations } ) => locations . flatMap ( ( { metadata } ) => metadata ?. spec ?? [ ] ) ) ;
152152}
0 commit comments