Skip to content

Implement support for library schemas #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 120 commits into from
Aug 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
d729871
Implement remote library schema loading
happy5214 Jun 7, 2022
bb906d0
Initial implementation of library schema nickname parsing
happy5214 Jun 10, 2022
7e2a8cc
Make double quote an invalid character
happy5214 Jun 10, 2022
b3f5ba0
Revamp and simplify string parsing
happy5214 Jun 15, 2022
43f8bc2
Refactor ParsedHedTag conditional as array
happy5214 Jun 16, 2022
5471f18
Linter improvements
happy5214 Jun 16, 2022
0780295
Change BidsHedIssue file object for fallback schema failure to null
happy5214 Jun 16, 2022
f352dc6
Refactor value validation
happy5214 Jun 16, 2022
7864dcb
More linting improvements
happy5214 Jun 16, 2022
726dfa4
Use Set for invalidCharacters in splitHedString
happy5214 Jun 20, 2022
e3c7b08
Miscellaneous small fixes
happy5214 Jun 20, 2022
af9a4b0
Fix parsing issues and tests
happy5214 Jun 27, 2022
795f0c6
Rewrite string parser from scratch
happy5214 Jun 27, 2022
b021681
Add test for loading local library schemas
happy5214 Jul 1, 2022
0f96721
Improve buildSchema type documentation
happy5214 Jul 1, 2022
5233ddd
Improve code quality in schema tests
happy5214 Jul 1, 2022
92e181c
Move HED 2-specific implementation of takesValueFormattedTag getter t…
happy5214 Jul 1, 2022
cfde7ab
Fix remaining immediate issues with new parser implementation
happy5214 Jul 8, 2022
d41e88f
Add utility class
happy5214 Jul 8, 2022
596c237
End string splitting early on errors
happy5214 Jul 8, 2022
11c45bb
Add bounds and original tag back to ParsedHedGroup
happy5214 Jul 15, 2022
b827fc1
Skip failing tests
happy5214 Jul 15, 2022
34c4f56
Merge pull request #76 from hed-standard/rewrite-string-parser
happy5214 Jul 15, 2022
a0b1958
Replace custom flattenDeep implementation with lodash version
happy5214 Jul 22, 2022
d3816be
Promote tag group specs to local class
happy5214 Jul 22, 2022
e9b4f17
Refactor constant
happy5214 Jul 22, 2022
e461f5d
Refactor individual tag invalid character check into module-level fun…
happy5214 Jul 22, 2022
03f4ade
Flatten Schemas schema map and create schema spec type
happy5214 Jul 22, 2022
d825645
Offload check into property
happy5214 Jul 22, 2022
528b142
Merge pull request #77 from hed-standard/flat-schemas
happy5214 Jul 28, 2022
9fe2d0d
Add utility method to get the Schema object with a given nickname
happy5214 Jul 28, 2022
5ab2254
Update tests
happy5214 Jul 28, 2022
4b9ab16
Remove unused code and fix return type issue
happy5214 Jul 28, 2022
8f0131b
Use flat schema Map for HED 3 tag parsing and validation
happy5214 Jul 28, 2022
7d99c65
Add fluent SchemasSpec class for creating schema specs
happy5214 Jul 28, 2022
0f39eb7
Implement initial internal BIDS version parsing and other new fields
happy5214 Jul 28, 2022
81c0324
Add to the API
happy5214 Jul 28, 2022
0408e41
Add getter for sidecarData using old name
happy5214 Jul 28, 2022
c815380
Add missing slashFound reset
happy5214 Jul 28, 2022
4ac444c
Reordering issue data
happy5214 Aug 8, 2022
0d6f847
Replace JavaScript Error objects in schema parsing with regular HED I…
happy5214 Aug 8, 2022
b08ceb6
Merge Promise handlers
happy5214 Aug 9, 2022
a806896
Simplify anonymous functions
happy5214 Aug 9, 2022
e900eb6
Updated the bids.spec test case for libraries
VisLab Aug 9, 2022
eb938a0
Updated the bids-spec tests with objects for dataset descriptions
VisLab Aug 9, 2022
b3374c7
Updated the tests with libraries for bids-spec
VisLab Aug 9, 2022
f31256e
Updated version spec on one test case
VisLab Aug 9, 2022
e794a8e
Merge describe blocks
happy5214 Aug 9, 2022
63772bc
Normalize issue returns from schema load Promises in BIDS code
happy5214 Aug 9, 2022
35f9cfc
Corrected the split of nickname and schema version
VisLab Aug 9, 2022
0dac6c2
Added unit tests to bids.spec.js
VisLab Aug 9, 2022
fa98420
Updated the bids specs tests and up error in for missing event issue
VisLab Aug 11, 2022
54c9bc6
Merge pull request #78 from VisLab/library-schemas
VisLab Aug 11, 2022
d1c5fae
Refactor BIDS tests
happy5214 Aug 11, 2022
620572b
Added tests for bad schema formats
VisLab Aug 12, 2022
f53d5ab
Moved SchemaSpec and SchemasSpec
VisLab Aug 19, 2022
ef6b534
Reworked the schema representation by direct reading without fallbacks
VisLab Aug 21, 2022
dd4beb8
Fixed the generation computation for the Schemas
VisLab Aug 21, 2022
1a86148
Worked on dataset and event validation tests
VisLab Aug 22, 2022
65a299e
Tests for BIDS run except for 2G tests
VisLab Aug 22, 2022
938db2b
Updated the hed.js utility tests
VisLab Aug 22, 2022
ad56142
Fixed the convert tests
VisLab Aug 22, 2022
4a262b8
Updated the events tests for HED 2G - not all working
VisLab Aug 22, 2022
040ccca
Streamline export tables
happy5214 Aug 22, 2022
2f99372
Fix BIDS schema spec validation bug and move internal error BidsIssue…
happy5214 Aug 22, 2022
6448743
Simplify SchemaSpec and SchemasSpec
happy5214 Aug 22, 2022
440faa3
Split off and restructure BIDS schema spec parsing
happy5214 Aug 22, 2022
3a9c46f
Rename parsedString.js
happy5214 Aug 22, 2022
20d8716
Reimplement schema XML loading
happy5214 Aug 23, 2022
6ad820d
Add score library to test set
happy5214 Aug 23, 2022
ded1bcc
Schema type fixes
happy5214 Aug 23, 2022
abec195
Update tests
happy5214 Aug 23, 2022
7b825fd
Marking last converter function as deprecated
happy5214 Aug 23, 2022
c112bb0
Restoring commented-out tests that were skipped for testing purposes
happy5214 Aug 23, 2022
735c00c
Updated the schema-checking tests
VisLab Aug 23, 2022
54a2162
Merged the tests for library schema
VisLab Aug 23, 2022
df11eaf
Updated the tests for schema loading
VisLab Aug 24, 2022
01d254d
Added tests for bad schema formats
VisLab Aug 12, 2022
bdaf4bd
Add SchemaSpec tests
happy5214 Aug 24, 2022
bffc5c5
Updated the tests for bad schema specifications
VisLab Aug 24, 2022
e3d95e2
Updated the tests
VisLab Aug 24, 2022
4c66b87
Updated the tests
VisLab Aug 24, 2022
816480b
Delete v7.2.0 schema
happy5214 Aug 24, 2022
b4b79e8
Fix issue messages
happy5214 Aug 24, 2022
3a1f207
Improve BIDS schema spec validation and tests
happy5214 Aug 24, 2022
5eec875
Improve schema tests
happy5214 Aug 24, 2022
be83a94
Docstring fix
happy5214 Aug 24, 2022
4eb07ef
Updated the tests
VisLab Aug 24, 2022
d10055c
Merge branch 'library-schemas-vislab' into library-schemas
happy5214 Aug 24, 2022
450b05c
Fixed some of the tests in bids spec
VisLab Aug 24, 2022
b406247
Updated the external schemas spec tests
VisLab Aug 24, 2022
a3d9975
Merge pull request #81 from VisLab/library-schemas
happy5214 Aug 25, 2022
c2ec4b7
Merge branch 'library-schemas' of github.com:hed-standard/hed-javascr…
happy5214 Aug 25, 2022
40eb303
Merge commented-out code with live code
happy5214 Aug 25, 2022
ec39a05
Docstring and assertion search/replace fixes
happy5214 Aug 25, 2022
4191144
Add docstrings and assertions to test functions
happy5214 Aug 25, 2022
3ec65cc
Standardize tests
happy5214 Aug 25, 2022
3f6caf7
Standardize tests (again)
happy5214 Aug 25, 2022
a5326f1
Added additional test data to bids.spec
VisLab Aug 25, 2022
62aedb6
Merge branch 'library-schemas' of https://github.com/hed-standard/hed…
VisLab Aug 25, 2022
6a4d37c
Fix issues validating definitions without a base schema
happy5214 Aug 25, 2022
ddccd93
Clean up tests
happy5214 Aug 25, 2022
dc4ac90
Updated the tests for def and libraries
VisLab Aug 25, 2022
78d73b0
Merging the tests for def with libraries
VisLab Aug 25, 2022
b59fd13
Updated the tests for BIDS datasets with libraries including definitions
VisLab Aug 25, 2022
d709168
Merge pull request #82 from VisLab/library-schemas
happy5214 Aug 25, 2022
1addc3b
Restructure ParsedHedSubstring family and fix definition issues
happy5214 Aug 25, 2022
15b805c
Revert erroneous edit to readme
happy5214 Aug 25, 2022
3539133
Fix array-related issues
happy5214 Aug 25, 2022
499f8ce
Fix BIDS schema issue bugs
happy5214 Aug 25, 2022
f4491a0
Configuration path resolution started
VisLab Aug 25, 2022
871eab0
Initial attempt at esbuild config
happy5214 Aug 26, 2022
8c97806
Fix build config and replace local schema list with require map
happy5214 Aug 26, 2022
7531eb4
Fix remaining esbuild issues
happy5214 Aug 26, 2022
e259165
Configure esbuild-runner and downgrade jest due to incompatibility
happy5214 Aug 27, 2022
fb8285d
Allow XML to be used in Jest tests
happy5214 Aug 27, 2022
af47e72
Use older String.replace function for backwards compatibility
happy5214 Aug 27, 2022
56a7d10
Replace newlines with escape sequence to allow for normal double quotes
happy5214 Aug 27, 2022
88d6f73
Tags are only equivalent if they are in the same schema
happy5214 Aug 28, 2022
6343e6d
Add v8.1.0 schema copy
happy5214 Aug 29, 2022
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
12 changes: 11 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
"no-console": ["error", { "allow": ["warn"] }],
"linebreak-style": ["error", "unix"],
"guard-for-in": "error",
"max-len": "off"
"max-len": "off",
"no-var": "error",
"prefer-const": "error",
"array-callback-return": "error",
"no-constant-binary-expression": "error",
"no-constructor-return": "error",
"no-self-compare": "error",
"no-template-curly-in-string": "error",
"no-unmodified-loop-condition": "error",
"no-unreachable": "error",
"prefer-arrow-callback": ["error", { "allowUnboundThis": false }]
}
}
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ The HED annotation strategy is very general and a standardized vocabulary in the
[HED schema](https://github.com/hed-standard/hed-specification) enables
annotation of events in an understandable, machine-actionable format.

Additional [library schemas](https://github.com/hed-standard/hed-schema-library)
Additional [library schemas](https://github.com/hed-standard/hed-schema-library)
with specialized vocabularies needed for particular subfields are under development.

HED validation occurs at several levels.
Syntactic validation checks that HED strings comply with the required syntax,
but not whether tags comply with the additional requirements of a HED schema.

Semantic validation verifies validity at many levels:

1. **Tag-level validation** checks that tags are in the schema
and have correct units and value type.
2. **String-level validation** performs additional checks for correctness.
Expand Down Expand Up @@ -78,8 +79,9 @@ const dataset = new hedValidator.validator.BidsDataset(eventData, sidecarData)
}
}
```

The `schemaDefinition` object follows a similar format as the BIDS `HEDVersion` object,
but with local `path` values pre-parsed to use the fully qualified path name.

The primary objects needed for HED validation can be found in
The primary objects needed for HED validation can be found in
[validator/bids/types.js](https://github.com/hed-standard/hed-javascript/blob/master/validator/bids/types.js).
157 changes: 104 additions & 53 deletions common/issues/data.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
const { stringTemplate } = require('../../utils/string')

const issueData = {
// Syntax issues
parentheses: {
hedCode: 'HED_PARENTHESES_MISMATCH',
level: 'error',
message: stringTemplate`Number of opening and closing parentheses are unequal. ${'opening'} opening parentheses. ${'closing'} closing parentheses.`,
},
invalidTag: {
hedCode: 'HED_TAG_INVALID',
unopenedParentheses: {
hedCode: 'HED_PARENTHESES_MISMATCH',
level: 'error',
message: stringTemplate`Invalid tag - "${'tag'}"`,
message: stringTemplate`Closing parenthesis at index ${'index'} of string "${'string'}" does not have a corresponding opening parenthesis.`,
},
unclosedParentheses: {
hedCode: 'HED_PARENTHESES_MISMATCH',
level: 'error',
message: stringTemplate`Opening parenthesis at index ${'index'} of string "${'string'}" does not have a corresponding closing parenthesis.`,
},
extraDelimiter: {
hedCode: 'HED_TAG_EMPTY',
Expand All @@ -26,16 +32,27 @@ const issueData = {
level: 'error',
message: stringTemplate`Duplicate tag at indices (${0}, ${1}) - "${'tag'}"`,
},
invalidCharacter: {
hedCode: 'HED_CHARACTER_INVALID',
level: 'error',
message: stringTemplate`Invalid character "${'character'}" at index ${'index'} of string "${'string'}"`,
},
// Common semantic validation issues
invalidTag: {
hedCode: 'HED_TAG_INVALID',
level: 'error',
message: stringTemplate`Invalid tag - "${'tag'}"`,
},
extraCommaOrInvalid: {
hedCode: 'HED_TAG_INVALID',
level: 'error',
message: stringTemplate`Either "${'previousTag'}" contains a comma when it should not or "${'tag'}" is not a valid tag`,
},
multipleUniqueTags: {
hedCode: 'HED_TAG_NOT_UNIQUE',
level: 'error',
message: stringTemplate`Multiple unique tags with prefix - "${'tag'}"`,
},
tooManyTildes: {
hedCode: 'HED_TILDES_UNSUPPORTED',
level: 'error',
message: stringTemplate`Too many tildes - group "${'tagGroup'}"`,
},
childRequired: {
hedCode: 'HED_TAG_REQUIRES_CHILD',
level: 'error',
Expand All @@ -56,75 +73,51 @@ const issueData = {
level: 'error',
message: stringTemplate`Invalid unit - "${'tag'}" - valid units are "${'unitClassUnits'}"`,
},
extraCommaOrInvalid: {
hedCode: 'HED_TAG_INVALID',
level: 'error',
message: stringTemplate`Either "${'previousTag'}" contains a comma when it should not or "${'tag'}" is not a valid tag`,
},
invalidCharacter: {
hedCode: 'HED_CHARACTER_INVALID',
invalidValue: {
hedCode: 'HED_VALUE_INVALID',
level: 'error',
message: stringTemplate`Invalid character "${'character'}" at index ${'index'} of string "${'string'}"`,
},
extension: {
hedCode: 'HED_TAG_EXTENDED',
level: 'warning',
message: stringTemplate`Tag extension found - "${'tag'}"`,
message: stringTemplate`Invalid placeholder value for tag "${'tag'}"`,
},
invalidPlaceholder: {
hedCode: 'HED_PLACEHOLDER_INVALID',
level: 'error',
message: stringTemplate`Invalid placeholder - "${'tag'}"`,
},
invalidPlaceholderInDefinition: {
hedCode: 'HED_PLACEHOLDER_INVALID',
level: 'error',
message: stringTemplate`Invalid placeholder in definition - "${'definition'}"`,
},
missingPlaceholder: {
hedCode: 'HED_PLACEHOLDER_INVALID',
level: 'error',
message: stringTemplate`HED value string "${'string'}" is missing a required placeholder.`,
},
invalidValue: {
hedCode: 'HED_VALUE_INVALID',
level: 'error',
message: stringTemplate`Invalid placeholder value for tag "${'tag'}"`,
},
invalidParentNode: {
hedCode: 'HED_VALUE_IS_NODE',
level: 'error',
message: stringTemplate`"${'tag'}" appears as "${'parentTag'}" and cannot be used as an extension. Indices (${0}, ${1}).`,
},
emptyTagFound: {
hedCode: 'HED_NODE_NAME_EMPTY',
level: 'error',
message: stringTemplate`Empty tag cannot be converted.`,
extension: {
hedCode: 'HED_TAG_EXTENDED',
level: 'warning',
message: stringTemplate`Tag extension found - "${'tag'}"`,
},
duplicateTagsInSchema: {
hedCode: 'HED_GENERIC_ERROR',
// HED 3-specific validation issues
invalidPlaceholderInDefinition: {
hedCode: 'HED_PLACEHOLDER_INVALID',
level: 'error',
message: stringTemplate`Source HED schema is invalid as it contains duplicate tags.`,
message: stringTemplate`Invalid placeholder in definition - "${'definition'}"`,
},
illegalDefinitionGroupTag: {
nestedDefinition: {
hedCode: 'HED_DEFINITION_INVALID',
level: 'error',
message: stringTemplate`Illegal tag "${'tag'}" in tag group for definition "${'definition'}"`,
message: stringTemplate`Illegal nested definition in tag group for definition "${'definition'}"`,
},
nestedDefinition: {
duplicateDefinition: {
hedCode: 'HED_DEFINITION_INVALID',
level: 'error',
message: stringTemplate`Illegal nested definition in tag group for definition "${'definition'}"`,
message: stringTemplate`Definition "${'definition'}" is declared multiple times. This instance's tag group is "${'tagGroup'}"`,
},
multipleTagGroupsInDefinition: {
hedCode: 'HED_DEFINITION_INVALID',
level: 'error',
message: stringTemplate`Multiple inner tag groups found in definition "${'definition'}"`,
},
duplicateDefinition: {
illegalDefinitionGroupTag: {
hedCode: 'HED_DEFINITION_INVALID',
level: 'error',
message: stringTemplate`Definition "${'definition'}" is declared multiple times. This instance's tag group is "${'tagGroup'}"`,
message: stringTemplate`Illegal tag "${'tag'}" in tag group for definition "${'definition'}"`,
},
invalidTopLevelTagGroupTag: {
hedCode: 'HED_TAG_GROUP_ERROR',
Expand All @@ -141,20 +134,78 @@ const issueData = {
level: 'error',
message: stringTemplate`Tag "${'tag'}" is only allowed inside of a tag group.`,
},
requestedSchemaLoadFailed: {
// Tag conversion issues
invalidParentNode: {
hedCode: 'HED_VALUE_IS_NODE',
level: 'error',
message: stringTemplate`"${'tag'}" appears as "${'parentTag'}" and cannot be used as an extension. Indices (${0}, ${1}).`,
},
emptyTagFound: {
hedCode: 'HED_NODE_NAME_EMPTY',
level: 'error',
message: stringTemplate`Empty tag cannot be converted.`,
},
duplicateTagsInSchema: {
hedCode: 'HED_GENERIC_ERROR',
level: 'error',
message: stringTemplate`Source HED schema is invalid as it contains duplicate tags.`,
},
// Schema issues
invalidSchemaNickname: {
hedCode: 'HED_SCHEMA_LOAD_FAILED',
level: 'error',
message: stringTemplate`The prefix nickname "${'nickname'}" in specification "${'spec'}" is duplicated or invalid.`,
},
invalidSchemaSpecification: {
hedCode: 'HED_SCHEMA_LOAD_FAILED',
level: 'error',
message: stringTemplate`The supplied schema specification is invalid. Specification: ${'spec'}`,
},
requestedSchemaLoadFailedFallbackUsed: {
hedCode: 'HED_SCHEMA_LOAD_FAILED',
level: 'warning',
message: stringTemplate`The requested schema "${'schemaDefinition'}" failed to load. The error given was "${'error'}". The fallback schema bundled with this validator will be used instead.`,
message: stringTemplate`The requested schema failed to load. The fallback schema bundled with this validator will be used instead. Specification: ${'spec'}`,
},
requestedSchemaLoadFailedNoFallbackUsed: {
hedCode: 'HED_SCHEMA_LOAD_FAILED',
level: 'error',
message: stringTemplate`The requested schema failed to load. The validator did not attempt to load a fallback schema. Specification: ${'spec'}`,
},
fallbackSchemaLoadFailed: {
hedCode: 'HED_SCHEMA_LOAD_FAILED',
level: 'error',
message: stringTemplate`The fallback schema bundled with this validator failed to load. The error given was "${'error'}". No HED validation was performed.`,
message: stringTemplate`The fallback schema bundled with this validator failed to load. No HED validation was performed.`,
},
bundledSchemaLoadFailed: {
hedCode: 'HED_SCHEMA_LOAD_FAILED',
level: 'error',
message: stringTemplate`Could not load HED schema for spec "${'spec'}" from bundled copy - "${'error'}".`,
},
localSchemaLoadFailed: {
hedCode: 'HED_SCHEMA_LOAD_FAILED',
level: 'error',
message: stringTemplate`Could not load HED schema from path "${'path'}" - "${'error'}".`,
},
remoteSchemaLoadFailed: {
hedCode: 'HED_SCHEMA_LOAD_FAILED',
level: 'error',
message: stringTemplate`Could not load HED schema "${'spec'}" from remote repository - "${'error'}".`,
},
unmatchedBaseSchema: {
hedCode: 'HED_LIBRARY_UNMATCHED',
level: 'error',
message: stringTemplate`Tag "${'tag'}" is declared to use a base schema in the dataset's schema listing, but no such schema was defined.`,
},
unmatchedLibrarySchema: {
hedCode: 'HED_LIBRARY_UNMATCHED',
level: 'error',
message: stringTemplate`Tag "${'tag'}" is declared to use a library schema nicknamed "${'library'}" in the dataset's schema listing, but no such schema was found.`,
},
// Generic errors
genericError: {
hedCode: 'HED_GENERIC_ERROR',
level: 'error',
message: stringTemplate`Unknown HED error "${'internalCode'}".`,
message: stringTemplate`Unknown HED error "${'internalCode'}" - parameters: "${'parameters'}".`,
},
}

Expand Down
12 changes: 8 additions & 4 deletions common/issues/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Issue {
* Also the internal error code.
*
* TODO: This is kept for backward compatibility until the next major version bump.
* @deprecated
* @type {string}
*/
this.code = internalCode
Expand All @@ -46,20 +47,23 @@ class Issue {
* Generate a new issue object.
*
* @param {string} internalCode The internal error code.
* @param {object<string, (string|number[])>} parameters The error string parameters.
* @param {Object<string, (string|number[])>} parameters The error string parameters.
* @return {Issue} An object representing the issue.
*/
const generateIssue = function (internalCode, parameters) {
const issueCodeData = issueData[internalCode] || issueData.genericError
const { hedCode, level, message } = issueCodeData
const bounds = parameters.bounds || []
parameters.internalCode = internalCode
if (issueCodeData === issueData.genericError) {
parameters.internalCode = internalCode
parameters.parameters = 'Issue parameters: ' + JSON.stringify(parameters)
}
const parsedMessage = message(...bounds, parameters)

return new Issue(internalCode, hedCode, level, parsedMessage)
}

module.exports = {
generateIssue: generateIssue,
Issue: Issue,
generateIssue,
Issue,
}
15 changes: 13 additions & 2 deletions common/schema/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
/** Path to the fallback HED schema. */

const localSchemaList = new Map([
['HED8.0.0', require('../../data/HED8.0.0.xml')],
['HED8.1.0', require('../../data/HED8.1.0.xml')],
['HED_testlib_1.0.2', require('../../data/HED_testlib_1.0.2.xml')],
])

// TODO: Delete in 4.0.0.
const fallbackFilePath = 'data/HED8.0.0.xml'

module.exports = {
/** Path to the fallback HED schema. */
fallbackFilePath: 'data/HED8.0.0.xml',
fallbackFilePath,
localSchemaList,
}
8 changes: 4 additions & 4 deletions common/schema/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const loadSchema = require('./loader')
const { Schema, Schemas } = require('./types')

module.exports = {
loadSchema: loadSchema,
Schema: Schema,
Schemas: Schemas,
config: config,
loadSchema,
Schema,
Schemas,
config,
}
Loading