Skip to content

Commit f825b1f

Browse files
committed
Merge remote-tracking branch 'upstream/main' into dev
2 parents 13fffbf + abb54ae commit f825b1f

File tree

21 files changed

+102
-72
lines changed

21 files changed

+102
-72
lines changed

.github/workflows/deno_tests.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,25 @@ jobs:
9595
deno-version: v2.x
9696
- run: deno publish --dry-run
9797

98+
publish:
99+
runs-on: ubuntu-latest
100+
needs: [test, publish-dry-run]
101+
if: github.ref_type == 'tag'
102+
permissions:
103+
contents: read
104+
id-token: write
105+
attestations: write
106+
steps:
107+
- uses: actions/checkout@v4
108+
- name: Check tag matches ${{ github.ref_name }}
109+
run: jq -e ".version[:1] != \"v\" and .version==\"$TAG\"" deno.json
110+
env:
111+
TAG: ${{ github.ref_name }}
112+
- uses: denoland/setup-deno@v2
113+
with:
114+
deno-version: v2.x
115+
- run: deno publish
116+
98117
deploy:
99118
needs: [build]
100119
runs-on: ubuntu-latest

.github/workflows/web_build.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: Web validator
33

44
on:
55
push:
6-
branches: [main, stable]
6+
branches: [main, dev]
77
pull_request:
8-
branches: [main, stable]
8+
branches: [main, dev]
99
release:
1010
types: [published]
1111
workflow_dispatch:
@@ -42,24 +42,25 @@ jobs:
4242
- name: Checkout release/target
4343
uses: actions/checkout@v4
4444
with:
45-
# Use the implicit ref, assuming it's stable
45+
# Stable is whatever we're releasing. Should generally
46+
# be the last release, but can be main.
4647
path: stable
47-
- name: Checkout main
48+
- name: Checkout dev
4849
uses: actions/checkout@v4
4950
with:
50-
ref: main
51-
path: main
51+
ref: dev
52+
path: dev
5253
- uses: denoland/setup-deno@v2
5354
with:
5455
deno-version: v2.x
5556
- name: Build release/target
5657
run: deno task build
5758
working-directory: stable/web
58-
- name: Build main
59+
- name: Build dev
5960
run: deno task build
60-
working-directory: main/web
61-
- name: Nest main inside stable
62-
run: mv main/web/dist stable/web/dist/dev
61+
working-directory: dev/web
62+
- name: Nest dev inside stable
63+
run: mv dev/web/dist stable/web/dist/dev
6364
- name: Upload GitHub Pages artifact
6465
uses: actions/upload-pages-artifact@v3
6566
with:

deno.json

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bids/validator",
3-
"version": "2.0.0-dev",
3+
"version": "2.1.0-dev",
44
"exports": {
55
".": "./src/bids-validator.ts",
66
"./main": "./src/main.ts",
@@ -9,17 +9,21 @@
99
"./options": "./src/setup/options.ts",
1010
"./issues": "./src/issues/datasetIssues.ts"
1111
},
12+
"exclude": [
13+
"docs/",
14+
"tools/",
15+
"web/",
16+
".*",
17+
"CITATION.cff",
18+
"Dockerfile",
19+
"build.ts",
20+
"local-run"
21+
],
1222
"publish": {
1323
"exclude": [
1424
"**/tests/",
15-
"tools/",
16-
"web/",
17-
".*",
1825
"**/*.test.ts",
19-
"Dockerfile",
20-
"build.ts",
21-
"deno.lock",
22-
"local-run"
26+
"deno.lock"
2327
]
2428
},
2529
"imports": {
@@ -47,6 +51,8 @@
4751
"semiColons": false,
4852
"singleQuote": true,
4953
"proseWrap": "preserve",
50-
"include": ["src/"]
54+
"include": [
55+
"src/"
56+
]
5157
}
5258
}

deno.lock

Lines changed: 21 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/files/deno.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { assert, assertEquals, assertRejects } from '@std/assert'
22
import { readAll, readerFromStreamReader } from '@std/io'
33
import { basename, dirname, fromFileUrl, join } from '@std/path'
44
import { EOL } from '@std/fs'
5-
import { FileTree } from '../types/filetree.ts'
5+
import type { FileTree } from '../types/filetree.ts'
66
import { BIDSFileDeno, readFileTree, UnicodeDecodeError } from './deno.ts'
77
import { requestReadPermission } from '../setup/requestPermissions.ts'
88
import { FileIgnoreRules } from './ignore.ts'

src/files/dwi.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { parseBvalBvec } from './dwi.ts'
44

55
Deno.test('Test bval/bvec parsing', async (t) => {
66
await t.step('Load 3 bvals', async () => {
7-
const bvals = parseBvalBvec('0 1 2 \n') // Typically ends with " \n"
7+
const bvals = parseBvalBvec('0 1 2 \n') // Typically ends with " \n"
88
assertEquals(bvals, [['0', '1', '2']])
99
})
1010
await t.step('Load 3 bvals - missing newline', async () => {
@@ -32,4 +32,3 @@ Deno.test('Test bval/bvec parsing', async (t) => {
3232
assertEquals(bvecs, [['0', '1', '2'], ['0', '1', '2'], ['0', '1', '2']])
3333
})
3434
})
35-

src/files/filetree.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { assert, assertEquals } from '@std/assert'
2-
import { FileIgnoreRules } from './ignore.ts'
3-
import { FileTree } from '../types/filetree.ts'
2+
import type { FileIgnoreRules } from './ignore.ts'
3+
import type { FileTree } from '../types/filetree.ts'
44
import { filesToTree, pathsToTree } from './filetree.ts'
55

66
Deno.test('FileTree generation', async (t) => {

src/files/filetree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { parse, SEPARATOR_PATTERN } from '@std/path'
22
import * as posix from '@std/path/posix'
3-
import { BIDSFile, FileTree } from '../types/filetree.ts'
3+
import { type BIDSFile, FileTree } from '../types/filetree.ts'
44

55
const nullFile = {
66
size: 0,

src/files/gzip.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
* GZIP
33
* Module for extracting gzip metadata from a file
44
*/
5-
import { Gzip } from '@bids/schema/context'
6-
import { BIDSFile } from '../types/filetree.ts'
5+
import type { Gzip } from '@bids/schema/context'
6+
import type { BIDSFile } from '../types/filetree.ts'
77

88
/**
99
* Parse a gzip header from a file

src/files/tiff.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
* TIFF
33
* Module for extracting Tiff metadata
44
*/
5-
import { Ome, Tiff } from '@bids/schema/context'
5+
import type { Ome, Tiff } from '@bids/schema/context'
66
import * as XML from '@libs/xml'
7-
import { BIDSFile } from '../types/filetree.ts'
7+
import type { BIDSFile } from '../types/filetree.ts'
88

99
function getImageDescription(
1010
dataview: DataView,

0 commit comments

Comments
 (0)