Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 8 additions & 24 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ Source code is plain JavaScript (`.js`) in `src/`. TypeScript type declarations
- `utils/` — General utilities
- `array.js`, `string.js`, `files.js`, `paths.js`, `hedStrings.js`, `memoizer.js`, `xml.js`

**Browser App** (`browser/`):

- A separate Vite/React app for browser-based HED validation. Has its own `package.json` and `vite.config.js`.

## Common commands

```powershell
Expand All @@ -75,14 +71,6 @@ npm run clear_jest_cache # Clear Jest cache
npx jest tests/otherTests/hed.spec.js
```

**Browser app (separate package):**

```powershell
cd browser ; npm install ; npm test # Run browser (Vitest) tests
cd browser ; npm run build # Build browser app
cd browser ; npm run preview # Serve browser app locally
```

## Testing structure

```
Expand All @@ -96,8 +84,6 @@ tests/
spec_tests/
jsonTests.spec.js # Runs the HED spec test suite
javascriptTests.json
browser/
vitest.config.js # Separate Vitest suite for browser components
```

Jest is configured via `jest.config.js` and `babel.config.js`. Note: `jest.config.js` has a
Expand All @@ -120,7 +106,6 @@ do not remove it or those imports will fail in tests.
- `tests/` — Jest test suite
- `spec_tests/` — HED spec-level tests
- `types/` — TypeScript type declarations (`index.d.ts`, `test.ts`)
- `browser/` — Vite/React browser demo app
- `dist/` — Compiled output, generated by `npm run build` (not committed)
- `scripts/` — Helper scripts for type testing
- `esbuild.mjs` — Build configuration
Expand All @@ -130,15 +115,14 @@ do not remove it or those imports will fail in tests.

CI runs on every push/PR to `main`. Replicate these locally before opening a PR:

| Workflow | Command | Notes |
| --------------------- | --------------------------------------------------- | -------------------------------------------------- |
| `tests.yml` | `npm ci ; npm test` | Runs `tests/` suite on Node 22, lts/\*, latest |
| `tests.yml` | `npm ci ; npm run testSpecs` | Runs `spec_tests/` suite |
| `tests.yml` (browser) | `cd browser ; npm install ; npm test` | Separate Vitest browser suite |
| `test-types.yml` | `npm ci ; npm run build ; npm pack` then type-check | **Build required before type check** |
| `codeql.yml` | automatic | CodeQL security scan (JavaScript) |
| `codespell.yaml` | automatic | Spell check source files |
| `links.yml` | automatic | Lychee link checker (configured via `lychee.toml`) |
| Workflow | Command | Notes |
| ---------------- | --------------------------------------------------- | -------------------------------------------------- |
| `tests.yml` | `npm ci ; npm test` | Runs `tests/` suite on Node 22, lts/\*, latest |
| `tests.yml` | `npm ci ; npm run testSpecs` | Runs `spec_tests/` suite |
| `test-types.yml` | `npm ci ; npm run build ; npm pack` then type-check | **Build required before type check** |
| `codeql.yml` | automatic | CodeQL security scan (JavaScript) |
| `codespell.yaml` | automatic | Spell check source files |
| `links.yml` | automatic | Lychee link checker (configured via `lychee.toml`) |

**Type-check locally (without packing):**

Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,34 +55,3 @@ jobs:
run: npm ci
- name: Run JSON spec tests with Node.js ${{ matrix.node-version }}
run: npm run testSpecs

Browser-tests:
runs-on: ubuntu-latest

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

steps:
- name: Check out the code
uses: actions/checkout@v6
- name: Set up with Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Print Node.js version and CI environment
run: |
echo "Node.js version: $(node -v)"
echo "Environment: CI=${{ env.CI }}"
- name: Download root dependencies
run: npm ci
- name: Clean browser dependencies
working-directory: ./browser
run: |
rm -rf package-lock.json node_modules
- name: Install browser dependencies
working-directory: ./browser
run: npm install
- name: Run browser tests with Node.js ${{ matrix.node-version }}
working-directory: ./browser
run: npm test
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ A sample of current `hed-validator` usage in BIDS can be found in the BIDS valid
## Online validation

A browser-based validator that uses this package is available at
[www.hedtags.org/hed-javascript](https://www.hedtags.org/hed-javascript).
[www.hedtags.org/hed-web](https://www.hedtags.org/hed-web/).
This online validator allows users to validate HED annotations in a web
browser without needing to install any software or upload files to a server.
The API documentation for this package is available at
[www.hedtags.org/hed-javascript/docs](https://www.hedtags.org/hed-javascript/docs).
[www.hedtags.org/hed-javascript](https://www.hedtags.org/hed-javascript/).

A number of tools for HED, including validation are also available in a Python-based
[online validator](https://hedtools.org/hed).
Expand Down Expand Up @@ -68,8 +68,11 @@ be done as PRs (pull requests) to the `main` branch.

### Running the browser locally

The browser app has moved to the [hed-web](https://github.com/hed-standard/hed-web) repository.

```code
cd browser
git clone https://github.com/hed-standard/hed-web
cd hed-web
npm install
npm run build
npm run preview
Expand Down
30 changes: 0 additions & 30 deletions browser/index.html

This file was deleted.

Loading
Loading