From ddc23b34f8bd542f021b1584d3ddc65a285c834f Mon Sep 17 00:00:00 2001 From: Alexander Jones Date: Sat, 24 Feb 2024 10:55:44 -0600 Subject: [PATCH] Use generic TSV file class from hed-validator package The previously used classes, BidsEventFile and BidsTabularFile, have been deprecated. The parameter order is slightly different between the respective constructors, so that has been tweaked. Fixes #1868 --- bids-validator/validators/hed.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/bids-validator/validators/hed.js b/bids-validator/validators/hed.js index 63d9e11ee..35fbda299 100644 --- a/bids-validator/validators/hed.js +++ b/bids-validator/validators/hed.js @@ -52,18 +52,12 @@ function constructTsvData(tsvFiles, jsonContents) { potentialSidecars, jsonContents, ) - let TsvFileClass - if (tsvFile.file.relativePath.endsWith('_events.tsv')) { - TsvFileClass = hedValidator.bids.BidsEventFile - } else { - TsvFileClass = hedValidator.bids.BidsTabularFile - } - return new TsvFileClass( + return new hedValidator.bids.BidsTsvFile( tsvFile.path, - potentialSidecars, - mergedDictionary, tsvFile.contents, tsvFile.file, + potentialSidecars, + mergedDictionary, ) }) }