Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
fff7693
Update tsconfig.json
happy5214 Aug 11, 2025
dd4e8b1
First working TypeScript conversion
happy5214 Aug 11, 2025
9a239b3
Enable CI on typescript branch
happy5214 Aug 11, 2025
5d7401d
Fix linter errors
happy5214 Aug 11, 2025
23a0beb
Fix remaining linter error
happy5214 Aug 11, 2025
4182859
Merge pull request #1 from hed-standard/first-modules
happy5214 Aug 11, 2025
4d5e19b
Refactor/rename schema classes and port to TypeScript
happy5214 Aug 11, 2025
173a2b5
Fix linter error
happy5214 Aug 11, 2025
adc15b6
Implement Copilot suggestions
happy5214 Aug 13, 2025
4bd670a
Test constants instead of yet-to-be-assigned object fields
happy5214 Aug 13, 2025
99e2ac3
Port schema merging and entries to TypeScript
happy5214 Aug 13, 2025
cfdeb92
Remove full property modeling
happy5214 Aug 13, 2025
6261d22
Merge pull request #2 from hed-standard/more-schema-types
happy5214 Aug 13, 2025
ba30bbc
Merge pull request #3 from hed-standard/main
happy5214 Aug 21, 2025
d3f6f2c
Modify tag manager field instead of definition map
happy5214 Aug 21, 2025
c9bd261
Port schema parser to TypeScript
happy5214 Aug 21, 2025
9285f21
Fixing linter and other issues
happy5214 Aug 27, 2025
d3f0eed
Mark versionDefinitions as read-only
happy5214 Aug 27, 2025
32236bc
Merge pull request #4 from hed-standard/port-schema-parser
happy5214 Aug 27, 2025
fe487e0
Port XML loading code to TypeScript
happy5214 Sep 6, 2025
1f71bc0
Reformat two config files
happy5214 Sep 6, 2025
9f0fcce
Port schema config module to TypeScript
happy5214 Sep 6, 2025
fec4311
Merge pull request #5 from hed-standard/remaining-schema-modules
happy5214 Sep 6, 2025
83ff1c6
Merge branch 'main' into typescript
happy5214 Oct 20, 2025
733d186
Fix issue with Qlty config
happy5214 Oct 24, 2025
93173bc
Merge pull request #7 from hed-standard/fix-qlty-lint
happy5214 Oct 24, 2025
6c772e8
Port array utiilty function to TypeScript
happy5214 Sep 6, 2025
7d491d9
Delete memoizer class
happy5214 Oct 20, 2025
ddfd26e
Port two easy utility modules to TypeScript
happy5214 Oct 20, 2025
4558294
Port string utilities and HED issue code to TypeScript
happy5214 Oct 22, 2025
cec3ea3
Improve issue parameter setting interface
happy5214 Oct 22, 2025
b00f78f
Port path utilities to TypeScript
happy5214 Oct 24, 2025
3056fa8
Minor formatting changes
happy5214 Oct 24, 2025
76d60a1
Refactor part of the path utilities
happy5214 Oct 24, 2025
6a8b150
Further streamline path utilities
happy5214 Oct 24, 2025
43a63f7
Refactor individual path organization into a separate function
happy5214 Oct 24, 2025
3c36995
Refactor BIDS path organization into class
happy5214 Oct 24, 2025
f714656
Port BIDS schema entry point and TSV parser to TypeScript
happy5214 Oct 28, 2025
f2e0a09
Fix issues flagged by AI
happy5214 Oct 28, 2025
949fd54
Merge pull request #6 from hed-standard/start-port-of-utils
happy5214 Oct 28, 2025
cc04223
Create codeql.yml
happy5214 Oct 28, 2025
11e7a8f
Bump @babel/core from 7.28.4 to 7.28.5
dependabot[bot] Oct 28, 2025
fc579fc
Bump @types/node from 24.8.1 to 24.9.2
dependabot[bot] Oct 28, 2025
4e32c40
Bump eslint from 9.37.0 to 9.38.0
dependabot[bot] Oct 28, 2025
c42da09
Bump @babel/preset-env from 7.28.3 to 7.28.5
dependabot[bot] Oct 28, 2025
aae6668
Fix permissions on type test workflow
happy5214 Oct 28, 2025
fc85c14
Merge pull request #8 from hed-standard/dependabot/npm_and_yarn/main/…
happy5214 Oct 28, 2025
7edac61
Bump vite from 6.3.6 to 6.4.1 in /browser
dependabot[bot] Oct 28, 2025
22a1cab
Merge pull request #9 from hed-standard/dependabot/npm_and_yarn/main/…
happy5214 Oct 28, 2025
18cef6f
Merge pull request #12 from hed-standard/dependabot/npm_and_yarn/brow…
happy5214 Oct 28, 2025
7803931
Merge pull request #11 from hed-standard/dependabot/npm_and_yarn/main…
happy5214 Oct 28, 2025
f570b79
Merge pull request #10 from hed-standard/dependabot/npm_and_yarn/main…
happy5214 Oct 28, 2025
09a13ef
Merge branch 'hed-standard:main' into typescript
happy5214 Oct 28, 2025
a98e4ab
Merge pull request #13 from hed-standard/main
happy5214 Oct 28, 2025
e130a1f
Fix permissions in CodeQL action
happy5214 Oct 28, 2025
14455f4
Delete unnecessary quotes in YAML files
happy5214 Oct 28, 2025
b0c0cc2
Port BIDS TSV and base file types to TypeScript
happy5214 Oct 28, 2025
1d9c16f
Port BIDS issue module to TypeScript
happy5214 Oct 30, 2025
3b89e59
Port BIDS validator classes and reorganize more issue code
happy5214 Oct 30, 2025
54f1862
Simplify code based on suggestions
happy5214 Nov 1, 2025
681eabe
Port BIDS dataset to TypeScript
happy5214 Nov 4, 2025
549c804
Merge branch 'typescript' into main
happy5214 Nov 17, 2025
ccba161
Merge pull request #20 from hed-standard/main
happy5214 Nov 17, 2025
179ae1b
Bump actions/checkout from 4 to 5
dependabot[bot] Nov 17, 2025
29f0a72
Bump @babel/preset-typescript from 7.27.1 to 7.28.5
dependabot[bot] Nov 17, 2025
bf9e397
Bump @types/semver from 7.7.0 to 7.7.1
dependabot[bot] Nov 17, 2025
9a49449
Bump js-yaml from 3.14.1 to 3.14.2
dependabot[bot] Nov 18, 2025
1f73f77
Merge pull request #24 from hed-standard/dependabot/npm_and_yarn/js-y…
happy5214 Nov 19, 2025
076b6de
Merge pull request #23 from hed-standard/dependabot/npm_and_yarn/main…
happy5214 Nov 19, 2025
656612a
Merge pull request #22 from hed-standard/dependabot/npm_and_yarn/main…
happy5214 Nov 19, 2025
b34a37a
Merge pull request #21 from hed-standard/dependabot/github_actions/ma…
happy5214 Nov 19, 2025
2f6c23a
Merge pull request #25 from hed-standard/main
happy5214 Nov 19, 2025
81e5b09
Bump glob from 10.4.5 to 10.5.0
dependabot[bot] Nov 19, 2025
796e7c6
Merge pull request #26 from hed-standard/dependabot/npm_and_yarn/glob…
happy5214 Nov 19, 2025
0ac57f7
Merge branch 'hed-standard:main' into typescript
happy5214 Nov 19, 2025
431b82d
Merge branch 'hed-standard:main' into main
happy5214 Nov 19, 2025
cd08649
Port BIDS JSON types
happy5214 Nov 21, 2025
076c748
Port BIDS dataset parser
happy5214 Nov 21, 2025
107a3b7
Port top-level BIDS module
happy5214 Nov 21, 2025
2d8da9a
Re-add TypeScript files to coverage testing
happy5214 Nov 21, 2025
e7f0688
Merge pull request #14 from hed-standard/port-bids-types
happy5214 Nov 21, 2025
756301c
Remove obsolete types and tests inherited from hed-javascript
happy5214 Nov 21, 2025
164b6ae
Merge pull request #27 from hed-standard/remove-obsolete-types
happy5214 Nov 21, 2025
ebc5d8d
Documentation fix
happy5214 Nov 21, 2025
b178fdd
Bump @types/lodash from 4.17.20 to 4.17.21
dependabot[bot] Nov 24, 2025
3ccf4a0
Bump core-js-pure from 3.46.0 to 3.47.0
dependabot[bot] Nov 24, 2025
beaf3e2
Bump actions/checkout from 5 to 6
dependabot[bot] Nov 24, 2025
4d89948
Bump prettier from 3.6.2 to 3.7.3
dependabot[bot] Dec 1, 2025
a3e99a3
Bump @eslint/eslintrc from 3.3.1 to 3.3.3
dependabot[bot] Dec 1, 2025
2b44ee7
Bump ts-jest from 29.4.5 to 29.4.6
dependabot[bot] Dec 1, 2025
9d1dd67
Merge pull request #33 from hed-standard/dependabot/npm_and_yarn/main…
happy5214 Feb 11, 2026
f1b893f
Merge pull request #32 from hed-standard/dependabot/npm_and_yarn/main…
happy5214 Feb 11, 2026
37ac4db
Merge pull request #31 from hed-standard/dependabot/npm_and_yarn/main…
happy5214 Feb 11, 2026
e6fd3a5
Merge pull request #30 from hed-standard/dependabot/github_actions/ma…
happy5214 Feb 11, 2026
8a8e223
Merge pull request #29 from hed-standard/dependabot/npm_and_yarn/main…
happy5214 Feb 11, 2026
9ddbe98
Merge pull request #28 from hed-standard/dependabot/npm_and_yarn/main…
happy5214 Feb 11, 2026
cacd613
Merge branch 'main' of github.com:hed-standard/hed-javascript
happy5214 Feb 11, 2026
a221803
Merge branch 'main' into typescript
happy5214 Feb 11, 2026
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
32 changes: 16 additions & 16 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
target-branch: 'main'
- package-ecosystem: github-actions
directory: /
target-branch: main
schedule:
interval: 'weekly'
- package-ecosystem: 'npm'
directory: '/'
target-branch: 'main'
interval: weekly
- package-ecosystem: npm
directory: /
target-branch: main
schedule:
interval: 'weekly'
interval: weekly
ignore:
- dependency-name: 'chai'
- dependency-name: chai
update-types:
- 'version-update:semver-major'
- dependency-name: 'esbuild'
- version-update:semver-major
- dependency-name: esbuild
update-types:
- 'version-update:semver-minor'
- package-ecosystem: 'gitsubmodule'
directory: '/'
target-branch: 'main'
- version-update:semver-minor
- package-ecosystem: gitsubmodule
directory: /
target-branch: main
schedule:
interval: 'daily'
interval: daily
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ permissions:

on:
push:
branches: [main]
branches: [typescript]
pull_request:
branches: [main]
branches: [typescript]
schedule:
- cron: 26 6 * * 5

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Test coverage

on:
push:
branches: [main]
branches: [main, typescript]
pull_request:
branches: [main, typescript]

permissions:
contents: read
Expand All @@ -22,7 +24,7 @@ jobs:
- name: Download dependencies
run: npm ci
- name: Generate coverage report
run: ./node_modules/.bin/jest --coverage
run: npm run coverage
- name: Upload coverage to Quality
uses: qltysh/qlty-action/coverage@v2
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ name: Deploy Vite App to GitHub Pages
on:
push:
branches:
- main
- typescript

# Allow only one concurrent deployment, cancelling any previously running ones.
concurrency:
group: 'pages'
group: pages
cancel-in-progress: true

permissions: {}
Expand All @@ -28,9 +28,9 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 22
node-version: lts/*
# Cache npm dependencies to speed up future builds
cache: 'npm'
cache: npm
cache-dependency-path: |
package-lock.json
browser/package-lock.json
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v6
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
node-version: lts/*
registry-url: https://registry.npmjs.org
- name: Update npm
run: npm install -g npm@latest
- run: npm ci
Expand Down
66 changes: 0 additions & 66 deletions .github/workflows/test-types.yml

This file was deleted.

16 changes: 8 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ name: Tests

on:
push:
branches: [main]
branches: [main, typescript]
pull_request:
branches: [main]
branches: [main, typescript]

permissions:
contents: read

jobs:
Build:
Main:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x, lts/*, 'node']
node-version: [22.x, lts/*, node]

steps:
- name: Check out the code
Expand All @@ -33,12 +33,12 @@ jobs:
- name: Test with Node.js ${{ matrix.node-version }}
run: npm test

JSON-spec-tests:
JSON:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x, lts/*, 'node']
node-version: [22.x, lts/*, node]

steps:
- name: Check out the code
Expand All @@ -56,12 +56,12 @@ jobs:
- name: Run JSON spec tests with Node.js ${{ matrix.node-version }}
run: npm run testSpecs

Browser-tests:
Browser:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x, lts/*, 'node']
node-version: [22.x, lts/*, node]

steps:
- name: Check out the code
Expand Down
18 changes: 10 additions & 8 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
module.exports = {
export default {
presets: [
['@babel/preset-env', {
targets: {
node: '22'
[
'@babel/preset-env',
{
targets: {
node: '22',
},
},
modules: 'commonjs'
}]
],
'@babel/preset-typescript',
],
plugins: []
plugins: [],
}

9 changes: 4 additions & 5 deletions browser/src/bids/BidsWebAccessor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BidsFileAccessor } from '../../../src/bids/datasetParser.js'
import { buildSchemasFromVersion } from '../schema/init.js'
import { BidsHedIssue } from '../../../src/bids/types/issues.js'
import { BidsFileAccessor } from '../../../src/bids/datasetParser'
import { buildSchemasFromVersion } from '../schema/init'
import { BidsHedIssue } from '../../../src/bids/types/issues'

/**
* Build HED schemas from a dataset description for the browser environment.
Expand Down Expand Up @@ -90,8 +90,7 @@ export class BidsWebAccessor extends BidsFileAccessor {
* @private
*/
constructor(datasetRootDirectory, fileMap) {
super(datasetRootDirectory, fileMap)
this.schemaBuilder = buildBidsSchemas
super(datasetRootDirectory, fileMap, buildBidsSchemas)
}

async getFileContent(relativePath) {
Expand Down
2 changes: 1 addition & 1 deletion browser/src/bids/BidsWebAccessor.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { describe, it, expect } from 'vitest'
import { BidsWebAccessor } from './BidsWebAccessor.js'
import { BidsWebAccessor } from './BidsWebAccessor'

// Mock File object for BidsWebAccessor tests
const MockFile = class {
Expand Down
18 changes: 7 additions & 11 deletions browser/src/schema/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
import zip from 'lodash/zip'

import { loadSchema } from './loader'
import { setParent } from '../../../src/utils/xml.js'

import SchemaParser from '../../../src/schema/parser'
import PartneredSchemaMerger from '../../../src/schema/schemaMerger'
import { Schema, Schemas } from '../../../src/schema/containers'
import { Schema, HedSchemas } from '../../../src/schema/containers'
import { IssueError } from '../../../src/issues/issues'
import { splitStringTrimAndRemoveBlanks } from '../../../src/utils/string'
import { SchemasSpec } from '../../../src/schema/specs'
Expand All @@ -20,20 +18,18 @@ import { SchemasSpec } from '../../../src/schema/specs'
* Build a single schema container object from an XML file.
*
* @param {Object} xmlData The schema's XML data
* @returns {Schema} The HED schema object.
* @returns {HedSchema} The HED schema object.
*/
const buildSchemaObject = function (xmlData) {
const rootElement = xmlData.HED
setParent(rootElement, null)
const schemaEntries = new SchemaParser(rootElement).parse()
const schemaEntries = new SchemaParser(xmlData.HED).parse()
return new Schema(xmlData, schemaEntries)
}

/**
* Build a single merged schema container object from one or more XML files.
*
* @param {Object[]} xmlData The schemas' XML data.
* @returns {Schema} The HED schema object.
* @returns {HedSchema} The HED schema object.
*/
const buildSchemaObjects = function (xmlData) {
const schemas = xmlData.map((data) => buildSchemaObject(data))
Expand All @@ -48,7 +44,7 @@ const buildSchemaObjects = function (xmlData) {
* Build a schema collection object from a schema specification.
*
* @param {SchemasSpec} schemaSpecs The description of which schemas to use.
* @returns {Promise<Schemas>} The schema container object and any issues found.
* @returns {Promise<HedSchemas>} The schema container object and any issues found.
*/
export async function buildSchemas(schemaSpecs) {
const schemaPrefixes = Array.from(schemaSpecs.data.keys())
Expand All @@ -62,14 +58,14 @@ export async function buildSchemas(schemaSpecs) {
)
const schemaObjects = schemaXmlData.map(buildSchemaObjects)
const schemas = new Map(zip(schemaPrefixes, schemaObjects))
return new Schemas(schemas)
return new HedSchemas(schemas)
}

/**
* Build HED schemas from a version specification string.
*
* @param {string} hedVersionString The HED version specification string (can contain comma-separated versions).
* @returns {Promise<Schemas>} A Promise that resolves to the built schemas.
* @returns {Promise<HedSchemas>} A Promise that resolves to the built schemas.
* @throws {IssueError} If the schema specification is invalid or schemas cannot be built.
*/
export async function buildSchemasFromVersion(hedVersionString) {
Expand Down
4 changes: 2 additions & 2 deletions browser/src/schema/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

/* Imports */
import { IssueError } from '../../../src/issues/issues'
import { parseSchemaXML } from '../../../src/utils/xml.js'
import { schemaData } from './vite-importer.js'
import parseSchemaXML from '../../../src/utils/xml.js'
import { schemaData } from './vite-importer'

/**
* Load schema XML data from a schema version or path description.
Expand Down
4 changes: 2 additions & 2 deletions browser/src/schema/loader.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, it, expect } from 'vitest'
import { loadSchema } from './loader.js'
import { SchemaSpec } from '../../../src/schema/specs.js'
import { loadSchema } from './loader'
import { SchemaSpec } from '../../../src/schema/specs.ts'

describe('Browser Schema Loader', () => {
it('should return undefined when loading a bundled schema in test environment', async () => {
Expand Down
8 changes: 4 additions & 4 deletions browser/src/utils/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import { IssueError } from '../../../src/issues/issues'
* @throws {IssueError} Always throws since local file reading is not supported in browsers.
*/
export async function readFile(fileName) {
IssueError.generateAndThrow('fileReadError', {
fileName: fileName,
message: 'Local file reading is not supported in browser environment'
IssueError.generateAndThrow('fileReadError', {
fileName: fileName,
message: 'Local file reading is not supported in browser environment',
})
}

Expand All @@ -26,7 +26,7 @@ export async function readHTTPSFile(url) {
if (!response.ok) {
IssueError.generateAndThrow('networkReadError', {
url: url,
statusCode: response.status,
statusCode: response.status.toString(),
statusText: response.statusText,
})
}
Expand Down
6 changes: 3 additions & 3 deletions browser/src/validate_dataset.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { createRoot } from 'react-dom/client'
import { FolderInput } from './components/FolderInput'
import { ErrorDisplay } from './components/ErrorDisplay'
import { BidsWebAccessor } from './bids/BidsWebAccessor.js'
import { BidsDataset } from '@hed-javascript-root/src/bids/types/dataset.js'
import { IssueError } from '@hed-javascript-root/src/issues/issues.js'
import { BidsHedIssue } from '@hed-javascript-root/src/bids/types/issues.js'
import { BidsDataset } from '@hed-javascript-root/src/bids/types/dataset'
import { IssueError } from '@hed-javascript-root/src/issues/issues'
import { BidsHedIssue } from '@hed-javascript-root/src/bids/types/issues'

// --- Add TailwindCSS to the document head for immediate styling ---
;(() => {
Expand Down
Loading
Loading