Skip to content

Commit 47e96c6

Browse files
authored
Merge pull request #471 from Kitware/vite-8
2 parents 8c87cef + d2cbfaa commit 47e96c6

65 files changed

Lines changed: 426 additions & 242 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,28 @@
11
name: CI
22
on:
33
pull_request:
4-
# types: [opened, synchronize]
5-
# TODO: why is this here?
64
push:
75
branches:
86
- "main"
97
permissions:
108
contents: read
119
jobs:
12-
lint-node:
13-
strategy:
14-
fail-fast: false
15-
matrix:
16-
linter: [eslint, typescript]
17-
name: Lint [${{ matrix.linter }}]
10+
lint-client:
1811
runs-on: ubuntu-latest
1912
steps:
2013
- name: Checkout repository
2114
uses: actions/checkout@v6
22-
- name: Setup Node environment
15+
- name: Install npm
2316
uses: actions/setup-node@v6
2417
with:
18+
node-version: 24.14.0
2519
cache: npm
2620
cache-dependency-path: client/package-lock.json
2721
- name: Install packages
2822
run: npm ci
2923
working-directory: client
30-
- name: Run ${{ matrix.linter }}
31-
run: npm run lint:${{ matrix.linter }}
24+
- name: Run client tests
25+
run: npm run test
3226
working-directory: client
3327
test-python:
3428
name: Test Python

client/package-lock.json

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

client/package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
8-
"build": "vite build",
98
"preview": "vite preview",
9+
"build": "vite build",
1010
"format": "eslint --fix src",
11-
"lint:eslint": "eslint src",
12-
"lint": "eslint src && vue-tsc --noEmit",
13-
"lint:typescript": "vue-tsc --noEmit"
11+
"test:lint": "eslint --no-fix src",
12+
"test:type": "vue-tsc --build",
13+
"test": "npm-run-all test:lint test:type"
1414
},
1515
"dependencies": {
1616
"@jamescoyle/vue-icon": "0.1.2",
@@ -31,12 +31,16 @@
3131
},
3232
"devDependencies": {
3333
"@sentry/vite-plugin": "5.1.1",
34+
"@tsconfig/node24": "^24.0.4",
3435
"@types/geojson": "7946.0.16",
3536
"@types/lodash": "4.17.24",
37+
"@types/node": "^25.5.0",
3638
"@vitejs/plugin-vue": "6.0.5",
3739
"@vue/eslint-config-typescript": "14.7.0",
40+
"@vue/tsconfig": "^0.9.0",
3841
"eslint": "10.1.0",
3942
"eslint-plugin-vue": "10.8.0",
43+
"npm-run-all2": "^8.0.4",
4044
"sass-embedded": "1.98.0",
4145
"typescript": "5.9.3",
4246
"vite": "8.0.3",

client/src/api/NABatApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { axiosInstance, FileAnnotation, FileAnnotationDetails, ProcessingTask, Spectrogram, UpdateFileAnnotation } from "./api";
1+
import { axiosInstance, type FileAnnotation, type FileAnnotationDetails, type ProcessingTask, type Spectrogram, type UpdateFileAnnotation } from "./api";
22

33
export interface NABatRecordingCompleteResponse {
44
error?: string;

client/src/api/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import axios from "axios";
22
import { AxiosError } from "axios";
3-
import { SpectroInfo } from "@components/geoJS/geoJSUtils";
3+
import type { SpectroInfo } from "@components/geoJS/geoJSUtils";
44
import type { FeatureCollection, Point } from "geojson";
55

66
export interface Recording {

client/src/components/AnnotationEditor.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script lang="ts">
2-
import { computed, defineComponent, PropType, ref, Ref, watch } from "vue";
3-
import { SpectroInfo } from './geoJS/geoJSUtils';
4-
import { deleteAnnotation, deleteSequenceAnnotation, patchAnnotation, patchSequenceAnnotation, Species, SpectrogramAnnotation, SpectrogramSequenceAnnotation } from "../api/api";
2+
import { computed, defineComponent, type PropType, ref, type Ref, watch } from "vue";
3+
import type { SpectroInfo } from './geoJS/geoJSUtils';
4+
import { deleteAnnotation, deleteSequenceAnnotation, patchAnnotation, patchSequenceAnnotation, type Species, type SpectrogramAnnotation, type SpectrogramSequenceAnnotation } from "../api/api";
55
import useState from "@use/useState";
66
import SpeciesInfo from "./SpeciesInfo.vue";
77
export default defineComponent({

client/src/components/AnnotationList.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<script lang="ts">
2-
import { computed, defineComponent, PropType, CSSProperties } from "vue";
3-
import { SpectroInfo } from './geoJS/geoJSUtils';
2+
import { computed, defineComponent, type PropType, type CSSProperties } from "vue";
3+
import type { SpectroInfo } from './geoJS/geoJSUtils';
44
import useState from "@use/useState";
55
import { watch, ref } from "vue";
66
import AnnotationEditor from "./AnnotationEditor.vue";
7-
import { Species, SpectrogramAnnotation, SpectrogramSequenceAnnotation } from "../api/api";
7+
import type { Species, SpectrogramAnnotation, SpectrogramSequenceAnnotation } from "../api/api";
88
import RecordingAnnotations from "./RecordingAnnotations.vue";
99
export default defineComponent({
1010
name: "AnnotationList",

client/src/components/BatchRecordingElement.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts">
2-
import { computed, defineComponent, PropType, ref, Ref, watch } from "vue";
2+
import { computed, defineComponent, type PropType, ref, type Ref, watch } from "vue";
33
import { RecordingMimeTypes } from "../constants";
44
import { getCellLocation, getCellfromLocation, getGuanoMetadata } from "../api/api";
55
import MapLocation from "./MapLocation.vue";

client/src/components/BatchUploadRecording.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<script lang="ts">
2-
import { computed, defineComponent, ref, Ref, watch } from 'vue';
2+
import { computed, defineComponent, ref, type Ref, watch } from 'vue';
33
import { RecordingMimeTypes } from '../constants';
44
import useRequest from '@use/useRequest';
5-
import { UploadLocation, uploadRecordingFile, getCellLocation, RecordingFileParameters, getGuanoMetadata } from '../api/api';
6-
import BatchRecordingElement, { BatchRecording } from './BatchRecordingElement.vue';
5+
import { type UploadLocation, uploadRecordingFile, getCellLocation, type RecordingFileParameters, getGuanoMetadata } from '../api/api';
6+
import BatchRecordingElement, { type BatchRecording } from './BatchRecordingElement.vue';
77
import { cloneDeep } from 'lodash';
88
import { extractDateTimeComponents, getCurrentTime } from '@use/useUtils';
99
import useState from '@use/useState';

0 commit comments

Comments
 (0)