From 0d54858e7c618bef63853ee89e20b3ad581e1479 Mon Sep 17 00:00:00 2001 From: Ross Blair Date: Tue, 15 Oct 2024 15:30:33 -0500 Subject: [PATCH 1/2] fix typing on schem validation error object, remove isBidsy.ts --- bids-validator/deno.json | 2 +- bids-validator/src/utils/errors.ts | 3 ++- bids-validator/src/validators/isBidsy.ts | 14 -------------- 3 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 bids-validator/src/validators/isBidsy.ts diff --git a/bids-validator/deno.json b/bids-validator/deno.json index c1f9d14c4..10fbc36c3 100644 --- a/bids-validator/deno.json +++ b/bids-validator/deno.json @@ -1,6 +1,6 @@ { "name": "@bids/validator", - "version": "1.14.13", + "version": "1.14.14", "exports": { ".": "./src/bids-validator.ts", "./main": "./src/main.ts", diff --git a/bids-validator/src/utils/errors.ts b/bids-validator/src/utils/errors.ts index 66445113b..e5a99e934 100644 --- a/bids-validator/src/utils/errors.ts +++ b/bids-validator/src/utils/errors.ts @@ -1,5 +1,6 @@ export class SchemaStructureError extends Error { - constructor(schemaPath) { + schemaPath: string + constructor(schemaPath: string) { super(`Validator attempted to access ${schemaPath}, but it wasn't there.`) this.name = 'SchemaStructureError' this.schemaPath = schemaPath diff --git a/bids-validator/src/validators/isBidsy.ts b/bids-validator/src/validators/isBidsy.ts deleted file mode 100644 index 73e02ff0c..000000000 --- a/bids-validator/src/validators/isBidsy.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Not sure if we want this yet. Would be to create issues for non standard - * derivatives to have the lowest common denomenator of bids like file names. - */ -// @ts-nocheck -import type { BIDSContext } from '../schema/context.ts' -import type { ContextCheckFunction } from '../../types/check.ts' -import type { BIDSFile } from '../types/filetree.ts' -import type { Schema } from '../types/schema.ts' - -export const isBidsyFilename: ContextCheckFunction = (schema, context) => { - // every '.', '-', '_' followed by an alnum - // only contains '.', '-', '_' and alnum -} From ba32614b7379b66b435c0bbedcf8d5953a80b8af Mon Sep 17 00:00:00 2001 From: Ross Blair Date: Tue, 15 Oct 2024 16:19:33 -0500 Subject: [PATCH 2/2] rollback deno esbuild plugin --- bids-validator/build.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bids-validator/build.ts b/bids-validator/build.ts index ead89ab0a..863ecd85b 100755 --- a/bids-validator/build.ts +++ b/bids-validator/build.ts @@ -1,4 +1,4 @@ -#!/usr/bin/env -S deno run --allow-read --allow-write --allow-env --allow-net --allow-run +#!/usr/bin/env -S deno run --allow-read --allow-write --allow-env --allow-net --allow-run --reload /** * Build the schema based validator for distribution (web and npm), targets browser compatible ESM * @@ -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 { denoPlugins } from "jsr:@luca/esbuild-deno-loader@0.10.3" import * as path from "https://deno.land/std@0.223.0/path/mod.ts" import { getVersion } from './src/version.ts'