Skip to content

Commit

Permalink
Updated the index values and the package number
Browse files Browse the repository at this point in the history
  • Loading branch information
VisLab committed Dec 23, 2024
1 parent e6b558d commit 2dccbff
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 81 deletions.
8 changes: 3 additions & 5 deletions bids/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import buildBidsSchemas from './schema'
import validateBidsDataset from './validate'
import { BidsJsonFile, BidsSidecar } from './types/json'
import { BidsEventFile, BidsTabularFile, BidsTsvFile } from './types/tsv'
import { BidsTabularFile, BidsTsvFile } from './types/tsv'
import BidsDataset from './types/dataset'
import { BidsHedIssue, BidsIssue } from './types/issues'
import BidsHedSidecarValidator from './validator/sidecarValidator'
Expand All @@ -10,7 +10,6 @@ import BidsHedTsvValidator from './validator/tsvValidator'
export {
BidsDataset,
BidsTsvFile,
BidsEventFile,
BidsTabularFile,
BidsJsonFile,
BidsSidecar,
Expand All @@ -25,14 +24,13 @@ export {
export default {
BidsDataset,
BidsTsvFile,
BidsEventFile,
BidsTabularFile,
BidsJsonFile,
BidsSidecar,
BidsIssue,
BidsHedIssue,
BidsHedSidecarValidator: BidsHedSidecarValidator,
BidsHedTsvValidator: BidsHedTsvValidator,
BidsHedSidecarValidator,
BidsHedTsvValidator,
buildBidsSchemas,
validateBidsDataset,
}
28 changes: 0 additions & 28 deletions bids/types/tsv.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,34 +157,6 @@ export class BidsTsvRow extends BidsTsvElement {
}
}

/**
* An event in a BIDS TSV file.
*/
export class BidsTsvEvent extends BidsTsvElement {
/**
* The TSV rows making up this event.
* @type {BidsTsvRow[]}
*/
tsvRows

/**
* Constructor.
*
* @param {BidsTsvFile} tsvFile The file this row belongs to.
* @param {BidsTsvRow[]} tsvRows The TSV rows making up this event.
*/
constructor(tsvFile, tsvRows) {
const hedString = tsvRows.map((tsvRow) => tsvRow.hedString).join(', ')
const tsvLine = tsvRows
.map((tsvRow) => tsvRow.tsvLine)
.flat()
.join(', ')
const onset = tsvRows[0].onset ? tsvRows[0].onset : undefined
super(hedString, tsvFile, onset, tsvLine)
this.tsvRows = tsvRows
}
}

/**
* A BIDS events.tsv file.
*
Expand Down
6 changes: 1 addition & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import bids from './bids'
import converter from './converter'
import validator from './validator'

export { bids, converter, validator }
export { bids }

export default {
bids,
converter,
validator,
}
30 changes: 16 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hed-validator",
"version": "3.15.5",
"version": "4.0.0",
"description": "A JavaScript validator for HED (Hierarchical Event Descriptor) strings.",
"main": "./dist/commonjs/index.js",
"exports": {
Expand Down
56 changes: 28 additions & 28 deletions validator/index.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import { BidsDataset, BidsEventFile, BidsJsonFile, BidsSidecar, validateBidsDataset } from '../bids'
import { validateHedDataset } from './dataset'
import { validateHedEvent, validateHedString } from './event'
import { buildSchemas } from '../schema/init'

export {
BidsDataset,
BidsEventFile,
BidsJsonFile,
BidsSidecar,
validateBidsDataset,
validateHedDataset,
validateHedEvent,
validateHedString,
buildSchemas,
}

export default {
BidsDataset,
BidsEventFile,
BidsJsonFile,
BidsSidecar,
validateBidsDataset,
validateHedDataset,
validateHedEvent,
validateHedString,
buildSchemas,
}
// import { BidsDataset, BidsEventFile, BidsJsonFile, BidsSidecar, validateBidsDataset } from '../bids'
// import { validateHedDataset } from './dataset'
// import { validateHedEvent, validateHedString } from './event'
// import { buildSchemas } from '../schema/init'
//
// export {
// BidsDataset,
// BidsEventFile,
// BidsJsonFile,
// BidsSidecar,
// validateBidsDataset,
// validateHedDataset,
// validateHedEvent,
// validateHedString,
// buildSchemas,
// }
//
// export default {
// BidsDataset,
// BidsEventFile,
// BidsJsonFile,
// BidsSidecar,
// validateBidsDataset,
// validateHedDataset,
// validateHedEvent,
// validateHedString,
// buildSchemas,
// }

0 comments on commit 2dccbff

Please sign in to comment.