Releases: hed-standard/hed-javascript
hed-validator v3.15.5
This release, which is nominally a patch release because it really contains no new user-facing features, is filled with a massive amount of bug fixes and code improvements. Highlights include:
- The tag parsing code above the tokenizer has been refactored into two classes.
- The
Memoizer
mixin was simplified back into a plain superclass. - JSON spec testing was added.
- Most of the plain
Error
objects thrown throughout the code have been replaced withIssueError
objects. - Validation of the
requireChild
schema attribute now occurs during tag conversion for HED 3 data. - Several other bugs were fixed.
- The CI was simplified.
What's Changed
- Streamline commands in package.json by @happy5214 in #166
- Fix XML file transformation by @happy5214 in #167
- Use commaMissing issue for missing comma before tag group by @happy5214 in #170
- Added codespell to the repository by @VisLab in #172
- Corrected COMMA MISSING hedCode to be COMMA_MISSING by @VisLab in #174
- Updated the NODE VERSION to latest for CI by @VisLab in #181
- Check if extension tag has valid name (allow UTF-8) by @VisLab in #185
- Initial commit of the spec testing by @VisLab in #186
- Separated the spec-tests into separate github action by @VisLab in #187
- Added Score 2.0.0 to the internal data by @VisLab in #188
- Started the implementation of special tag handling by @VisLab in #189
- Updated spec and corrected syntax error by @VisLab in #191
- Fix duplicate tag check by @happy5214 in #192
- Fix sidecar syntax issues by @happy5214 in #193
- Fix bug with tag group equivalence that was causing tests to fail by @happy5214 in #194
- Update spec -- corrected several tests and update JSON regex for value validation by @VisLab in #195
- Add isError method to Issue class by @happy5214 in #197
- Convert Memoizer back to plain class by @happy5214 in #199
- Move all throws of IssueError to new static method by @happy5214 in #201
- Throw errors from ParsedHedTag constructors instead of using field by @happy5214 in #200
- Move HED 3 requireChild testing to TagConverter and refactor that class by @happy5214 in #202
- Rewrite HED string parsing and splitting as classes by @happy5214 in #203
Full Changelog: v3.15.4...v3.15.5
hed-validator v3.15.4
This release revamps the internal error reporting by using a standard HED issue with the code internalError
(HED code GENERIC_ERROR
). This should help downstream users fix bugs.
The CI actions were also updated in a development-only fix.
What's Changed
- Update CI config by @happy5214 in #165
- Use BidsHedIssue and Issue for internal error reporting by @happy5214 in #164
Full Changelog: v3.15.3...v3.15.4
hed-validator v3.15.3
There are two small changes in this release. Almost all remaining direct uses of promises in the tests have been replaced with async
/await
syntax. Also, a type-checking bug in the BidsTsvFile
constructor preventing the direct use of Map
s as TSV data has been fixed.
What's Changed
- Replace remaining possible uses of promises with async/await by @happy5214 in #162
- Fix type-checking bug in BidsTsvFile constructor by @happy5214 in #163
Full Changelog: v3.15.2...v3.15.3
hed-validator v3.15.2
The main feature of this release is a complete rewrite of the tag conversion code, merging it with the main parsing modules. A few bugs related to parsing were also fixed.
What's Changed
- Rewrite short/long converter by @happy5214 in #157
Full Changelog: v3.15.1...v3.15.2
hed-validator v3.15.1
This version contains no substantive changes to the code. An indirect dependency was bumped to satisfy npm audit
, and a GitHub Action was added to (hopefully) directly publish GitHub releases to npm. This should also remove an extraneous testing module that was left in several prior releases, which bloated their sizes.
What's Changed
- Bump get-func-name dependency to fix npm audit hit by @happy5214 in #160
- Publish npm releases from GitHub Actions by @happy5214 in #161
Full Changelog: v3.15.0...v3.15.1
hed-validator v3.15.0
This version introduces a revamped interface for BIDS dataset validation. The recommended method of validating BIDS data is now as follows:
- Construct a
BidsJsonFile
object fordataset_description.json
. - Construct a
Schemas
object withbuildBidsSchema()
. - For each file to be validated, construct a
BidsSidecar
orBidsTsvFile
(as appropriate) and call itsvalidate()
method.
Version 8.3.0 of the HED standard schema is now bundled with this validator.
What's Changed
- More async usage by @happy5214 in #154
- Add dataset_description.json as file for certain internal errors by @happy5214 in #155
- Bump braces from 3.0.2 to 3.0.3 by @dependabot in #156
- Add to BIDS interface by @happy5214 in #158
- Add HED standard v8.3.0 schema by @happy5214 in #159
Full Changelog: v3.14.0...v3.15.0
hed-validator v3.14.0
This release includes support for lazily merging partnered schemas into a single Schema
object.
Several interfaces related to schema loading that were deprecated in version 3.13.5 have been removed. The only official method of directly building a Schemas
object is now by passing a SchemasSpec
object to hedValidator.validator.buildSchemas()
and resolving the resulting Promise
. A Schemas
object is also generated internally by hedValidator.bids.validateBidsDataset()
, using either a SchemasSpec
object passed as the second parameter to that function or the "HEDVersion"
field of the BidsDataset
object's "dataset_description.json"
BidsJsonFile
.
HED-2G support is officially deprecated with this release, and it will be removed in version 4. Any aspect of HED-2G that was unused "in the field" may be removed earlier at the development team's discretion.
What's Changed
- Implement support for merging lazy partnered schemas by @happy5214 in #147
- Remove experimental schema loading code by @happy5214 in #152
Full Changelog: v3.13.5...v3.14.0
hed-validator v3.13.5
This is an intermediate release while the lazy partnered schema functionality (planned for version 3.14.0) is being finished. Features include the inclusion of line numbers for most issues in BIDS TSV files (fixing a long-lived request), fixing downloads of remotely loaded schemas from GitHub (ones which aren't bundled with the validator itself or loaded from a local file), and various other small fixes. The dependency list has been comprehensively updated, with all dependencies now referring to their latest versions except ESLint and Chai (which are incompatible with the minimum Node version for this validator).
As of this release, all interfaces related to schema loading that do not correspond to the current HED 3 specification, which were all provisional and unofficial, are now deprecated and will be removed in 3.14.0.
What's Changed
- Add TSV line numbers to TSV-related issue messages by @happy5214 in #144
- Switch HTTP requests from then-request to Fetch API by @happy5214 in #148
- Various fixes ported from the lazy partnered schemas branch by @happy5214 in #149
Full Changelog: v3.13.4...v3.13.5
hed-validator v3.13.4
The main feature in this release is a remodeling of the parsed BIDS TSV data, which now comprises event-based objects with one or more row objects. These new classes derive from ParsedHedString
, making them drop-in replacements for that type throughout the validation code. A new container class was also created to represent sidecar key HED data.
The interim value validation was refactored, with the existing HED 3 value regex (which was recognized to be a general rule for parsed HED strings) moved to the post-parsing stage. Full value class-based validation will be implemented in a future release.
A bug in ParsedHedTag
related to several methods referring to an undefined schema
field has been fixed using optional chaining operators. This bug was causing several failed tests throughout the BIDS/HED ecosystem, and had earlier been temporarily bypassed in v3.13.2.
Two functions in the BIDS schema specification parsing module which ended up not being used were deleted.
What's Changed
- Create new classes for TSV rows and sidecar keys by @happy5214 in #132
- Refactor interim value validation by @happy5214 in #133
- Fix unescaped schema references and documentation in ParsedHedTag by @happy5214 in #139
- Delete unused functions related to BIDS schema spec parsing by @happy5214 in #142
- Make TSV validation event-based by @happy5214 in #143
Full Changelog: v3.13.3...v3.13.4
hed-validator v3.13.3
This release fixes a bug with pluralizing non-SI unit names (#129). All HED 3 units that are not unit symbols now correctly have plural forms generated.
What's Changed
- Fix plural units in HED 3 code by @happy5214 in #130
Full Changelog: v3.13.2...v3.13.3