Skip to content

Commit 8bae350

Browse files
authored
Merge pull request #220 from happy5214/bump-hed-validator-4.1.0
chore(deps): Bump hed-validator dependency to 4.1.4
2 parents 49ab4e4 + 72e4a24 commit 8bae350

File tree

5 files changed

+69
-130
lines changed

5 files changed

+69
-130
lines changed

build.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
import * as esbuild from 'https://deno.land/x/[email protected]/mod.js'
88
import { parse } from 'https://deno.land/[email protected]/flags/mod.ts'
9-
import { denoPlugins } from "jsr:@luca/esbuild-[email protected]"
9+
import { denoPlugin } from "jsr:@deno/esbuild-[email protected]";
1010
import * as path from "https://deno.land/[email protected]/path/mod.ts"
1111
import { getVersion } from './src/version.ts'
1212

@@ -51,7 +51,7 @@ const result = await esbuild.build({
5151
target: ['chrome109', 'firefox109', 'safari16'],
5252
plugins: [
5353
versionPlugin,
54-
...denoPlugins({
54+
denoPlugin({
5555
configPath: path.join(dir, 'deno.json'),
5656
}),
5757
],

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"@bids/schema": "jsr:@bids/[email protected]",
3232
"@cliffy/command": "jsr:@effigies/[email protected]",
3333
"@cliffy/table": "jsr:@effigies/[email protected]",
34-
"@hed/validator": "npm:hed-validator@4.0.1",
34+
"@hed/validator": "npm:hed-validator@4.1.4",
3535
"@ignore": "npm:[email protected]",
3636
"@libs/xml": "jsr:@libs/[email protected]",
3737
"@mango/nifti": "npm:@bids/[email protected]",

deno.lock

Lines changed: 57 additions & 125 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/schema/context.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import type {
99
Subjects,
1010
Tiff,
1111
} from '@bids/schema/context'
12+
import type { Schemas as HedSchemas } from '@hed/validator'
1213
import type { Schema } from '../types/schema.ts'
1314
import type { BIDSFile } from '../types/filetree.ts'
1415
import { FileTree } from '../types/filetree.ts'
@@ -41,7 +42,7 @@ export class BIDSContextDataset implements Dataset {
4142
opaqueDirectories: Set<string>
4243

4344
// Opaque object for HED validator
44-
hedSchemas: object | undefined | null = undefined
45+
hedSchemas: HedSchemas | undefined | null = undefined
4546

4647
constructor(
4748
args: Partial<BIDSContextDataset>,

src/validators/hed.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,14 @@ async function setHedSchemas(dataset: BIDSContextDataset): Promise<HedIssue[]> {
3030
datasetDescriptionData,
3131
)
3232
return [] as HedIssue[]
33-
} catch (issueError) {
33+
} catch (error) {
3434
dataset.hedSchemas = null
35+
let issueError: Error
36+
if (error instanceof Error) {
37+
issueError = error
38+
} else {
39+
issueError = new Error('unknown error')
40+
}
3541
return hedValidator.BidsHedIssue.fromHedIssues(
3642
issueError,
3743
datasetDescriptionData.file,

0 commit comments

Comments
 (0)