Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
import * as esbuild from 'https://deno.land/x/esbuild@v0.24.0/mod.js'
import { parse } from 'https://deno.land/std@0.223.0/flags/mod.ts'
import { denoPlugins } from "jsr:@luca/esbuild-deno-loader@0.11.0"
import { denoPlugin } from "jsr:@deno/esbuild-plugin@1.1.5";
import * as path from "https://deno.land/std@0.223.0/path/mod.ts"
import { getVersion } from './src/version.ts'

Expand Down Expand Up @@ -51,7 +51,7 @@ const result = await esbuild.build({
target: ['chrome109', 'firefox109', 'safari16'],
plugins: [
versionPlugin,
...denoPlugins({
denoPlugin({
configPath: path.join(dir, 'deno.json'),
}),
],
Expand Down
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@bids/schema": "jsr:@bids/schema@1.0.4",
"@cliffy/command": "jsr:@effigies/cliffy-command@1.0.0-dev.8",
"@cliffy/table": "jsr:@effigies/cliffy-table@1.0.0-dev.5",
"@hed/validator": "npm:hed-validator@4.0.1",
"@hed/validator": "npm:hed-validator@4.1.4",
"@ignore": "npm:ignore@7.0.3",
"@libs/xml": "jsr:@libs/xml@6.0.4",
"@mango/nifti": "npm:@bids/nifti-reader-js@0.6.9",
Expand Down
182 changes: 57 additions & 125 deletions deno.lock

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

3 changes: 2 additions & 1 deletion src/schema/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type {
Subjects,
Tiff,
} from '@bids/schema/context'
import type { Schemas as HedSchemas } from '@hed/validator'
import type { Schema } from '../types/schema.ts'
import type { BIDSFile } from '../types/filetree.ts'
import { FileTree } from '../types/filetree.ts'
Expand Down Expand Up @@ -41,7 +42,7 @@ export class BIDSContextDataset implements Dataset {
opaqueDirectories: Set<string>

// Opaque object for HED validator
hedSchemas: object | undefined | null = undefined
hedSchemas: HedSchemas | undefined | null = undefined

constructor(
args: Partial<BIDSContextDataset>,
Expand Down
8 changes: 7 additions & 1 deletion src/validators/hed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,14 @@ async function setHedSchemas(dataset: BIDSContextDataset): Promise<HedIssue[]> {
datasetDescriptionData,
)
return [] as HedIssue[]
} catch (issueError) {
} catch (error) {
dataset.hedSchemas = null
let issueError: Error
if (error instanceof Error) {
issueError = error
} else {
issueError = new Error('unknown error')
}
return hedValidator.BidsHedIssue.fromHedIssues(
issueError,
datasetDescriptionData.file,
Expand Down
Loading