Skip to content

Commit 8a44726

Browse files
authored
Merge pull request #1902 from bids-standard/fix/deno-214
fix(dep): Handle deprecations in deno>=0.214.0
2 parents a943a61 + 5f1f015 commit 8a44726

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

bids-validator/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"imports": {
3-
"std/": "https://deno.land/std@0.214.0/"
3+
"std/": "https://deno.land/std@0.217.0/"
44
},
55
"tasks": {
66
"test": "deno test -A src/tests/"

bids-validator/src/deps/logger.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
export {
2+
ConsoleHandler,
23
critical,
34
debug,
45
error,
56
getLogger,
67
info,
78
Logger,
9+
LogLevelNames,
810
LogLevels,
911
setup,
10-
warning,
12+
warn,
1113
} from "std/log/mod.ts"
12-
export { ConsoleHandler } from "std/log/console_handler.ts"
13-
export { LogLevelNames } from "std/log/levels.ts"
1414
export type { LevelName } from "std/log/mod.ts"

bids-validator/src/deps/path.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ export {
77
extname,
88
fromFileUrl,
99
parse,
10+
SEPARATOR,
1011
} from 'std/path/mod.ts'
11-
export { SEP } from 'std/path/separator.ts'

bids-validator/src/deps/stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
export {
22
readAll,
33
readerFromStreamReader,
4-
} from 'std/streams/mod.ts'
4+
} from 'std/io/mod.ts'

bids-validator/src/files/browser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { BIDSFile } from '../types/file.ts'
22
import { FileTree } from '../types/filetree.ts'
33
import { FileIgnoreRules } from './ignore.ts'
4-
import { parse, join, SEP } from '../deps/path.ts'
4+
import { parse, join, SEPARATOR } from '../deps/path.ts'
55

66
/**
77
* Browser implement of BIDSFile wrapping native File/FileList types
@@ -60,7 +60,7 @@ export function fileListToTree(files: File[]): Promise<FileTree> {
6060
// Top level file
6161
tree.files.push(file)
6262
} else {
63-
const levels = fPath.dir.split(SEP).slice(1)
63+
const levels = fPath.dir.split(SEPARATOR).slice(1)
6464
let currentLevelTree = tree
6565
for (const level of levels) {
6666
const exists = currentLevelTree.directories.find(

bids-validator/src/utils/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const loggerProxyHandler = {
4040
const callerLocation = parseStack(stack)
4141
logger.debug(`Logger invoked at "${callerLocation}"`)
4242
}
43-
const logFunc = logger[prop] as typeof logger.warning
43+
const logFunc = logger[prop] as typeof logger.warn
4444
return logFunc.bind(logger)
4545
},
4646
}

bids-validator/src/validators/filenameIdentify.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* object in the schema for reference.
1313
*/
1414
// @ts-nocheck
15-
import { SEP } from '../deps/path.ts'
15+
import { SEPARATOR } from '../deps/path.ts'
1616
import { GenericSchema, Schema } from '../types/schema.ts'
1717
import { BIDSContext } from '../schema/context.ts'
1818
import { lookupModality } from '../schema/modalities.ts'
@@ -71,7 +71,7 @@ export async function datatypeFromDirectory(schema, context) {
7171
const subFormat = schema.objects.formats[subEntity.format]
7272
const sesEntity = schema.objects.entities.session.name
7373
const sesFormat = schema.objects.formats[sesEntity.format]
74-
const parts = context.file.path.split(SEP)
74+
const parts = context.file.path.split(SEPARATOR)
7575
let datatypeIndex = 2
7676
if (parts[0] !== '') {
7777
// we assume paths have leading '/'

bids-validator/src/validators/filenameValidate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { CheckFunction, RuleCheckFunction } from '../types/check.ts'
22
import { DatasetIssues } from '../issues/datasetIssues.ts'
33
import { BIDSContext } from '../schema/context.ts'
44
import { GenericSchema, Schema, Entity, Format } from '../types/schema.ts'
5-
import { SEP } from '../deps/path.ts'
5+
import { SEPARATOR } from '../deps/path.ts'
66
import { hasProp } from '../utils/objectPathHandler.ts'
77

88
const sidecarExtensions = ['.json', '.tsv', '.bvec', '.bval']
@@ -25,7 +25,7 @@ export async function filenameValidate(
2525
}
2626

2727
export function isAtRoot(context: BIDSContext) {
28-
if (context.file.path.split(SEP).length !== 2) {
28+
if (context.file.path.split(SEPARATOR).length !== 2) {
2929
return false
3030
}
3131
return true

bids-validator/src/validators/isBidsy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* derivatives to have the lowest common denomenator of bids like file names.
44
*/
55
// @ts-nocheck
6-
import { SEP } from '../deps/path.ts'
6+
import { SEPARATOR } from '../deps/path.ts'
77
import { BIDSContext } from '../schema/context.ts'
88
import { CheckFunction } from '../../types/check.ts'
99
import { BIDSFile } from '../types/file.ts'

0 commit comments

Comments
 (0)