Skip to content

Commit

Permalink
chore: update dependencies (#791)
Browse files Browse the repository at this point in the history
  • Loading branch information
targos authored Nov 21, 2024
1 parent c902ef1 commit c27f8af
Show file tree
Hide file tree
Showing 84 changed files with 1,392 additions and 2,829 deletions.
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import react from 'eslint-config-zakodium/react';
import ts from 'eslint-config-zakodium/ts';
import unicorn from 'eslint-config-zakodium/unicorn';
import storybook from 'eslint-plugin-storybook';

export default [
{
Expand All @@ -19,6 +20,7 @@ export default [
...ts,
...react,
...unicorn,
...storybook.configs['flat/recommended'],
{
rules: {
'react/no-unknown-property': ['error', { ignore: ['css'] }],
Expand Down
3,593 changes: 1,105 additions & 2,488 deletions package-lock.json

Large diffs are not rendered by default.

55 changes: 28 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"test-only": "vitest run --coverage "
},
"volta": {
"node": "22.9.0"
"node": "22.11.0"
},
"overrides": {
"react": "^18.3.1",
Expand All @@ -53,15 +53,15 @@
"react-dom": ">=18.0.0"
},
"dependencies": {
"@blueprintjs/select": "^5.2.5",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@blueprintjs/select": "^5.3.4",
"@emotion/react": "^11.13.5",
"@emotion/styled": "^11.13.5",
"@lukeed/uuid": "^2.0.1",
"@popperjs/core": "^2.11.8",
"@radix-ui/react-collapsible": "^1.1.1",
"@radix-ui/react-radio-group": "^1.2.1",
"@radix-ui/react-select": "^2.1.2",
"@tanstack/react-query": "^5.59.16",
"@tanstack/react-query": "^5.61.0",
"@tanstack/react-table": "^8.20.5",
"biologic-converter": "^0.6.0",
"cheminfo-types": "^1.8.1",
Expand All @@ -72,45 +72,46 @@
"lodash": "^4.17.21",
"ml-gsd": "^12.1.8",
"ml-peak-shape-generator": "^4.1.4",
"ml-signal-processing": "^1.1.1",
"ml-spectra-processing": "^14.6.0",
"ms-spectrum": "^3.6.8",
"ml-signal-processing": "^1.2.0",
"ml-spectra-processing": "^14.6.2",
"ms-spectrum": "^3.6.10",
"netcdfjs": "^3.0.0",
"react-d3-utils": "^2.0.0",
"react-dropzone": "14.2.10",
"react-d3-utils": "^3.0.0",
"react-dropzone": "14.3.5",
"react-icons": "^5.3.0",
"react-inspector": "^6.0.2",
"react-plot": "^3.0.0",
"react-popper": "^2.3.0",
"spc-parser": "^1.0.0",
"tinycolor2": "^1.6.0",
"ts-pattern": "^5.5.0",
"use-resize-observer": "^9.1.0",
"wdf-parser": "^0.3.0"
},
"devDependencies": {
"@blueprintjs/core": "^5.13.1",
"@blueprintjs/icons": "^5.13.0",
"@playwright/experimental-ct-react": "^1.48.2",
"@playwright/test": "^1.48.2",
"@storybook/addon-essentials": "^8.3.6",
"@storybook/addon-storysource": "^8.3.6",
"@storybook/blocks": "^8.3.6",
"@storybook/react": "^8.3.6",
"@storybook/react-vite": "^8.3.6",
"@blueprintjs/core": "^5.15.0",
"@blueprintjs/icons": "^5.14.0",
"@playwright/experimental-ct-react": "^1.49.0",
"@playwright/test": "^1.49.0",
"@storybook/addon-essentials": "^8.4.5",
"@storybook/addon-storysource": "^8.4.5",
"@storybook/blocks": "^8.4.5",
"@storybook/react": "^8.4.5",
"@storybook/react-vite": "^8.4.5",
"@types/babel__core": "^7.20.5",
"@types/d3-scale-chromatic": "^3.0.3",
"@types/lodash": "^4.17.12",
"@types/lodash": "^4.17.13",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react-inspector": "^4.0.6",
"@types/tinycolor2": "^1.4.6",
"@vitejs/plugin-react": "^4.3.3",
"@vitest/coverage-v8": "^2.1.4",
"@vitest/coverage-v8": "^2.1.5",
"cheminfo-font": "^1.13.1",
"cross-env": "^7.0.3",
"eslint": "^9.13.0",
"eslint-config-zakodium": "^13.0.0",
"eslint-plugin-storybook": "^0.10.1",
"eslint": "^9.15.0",
"eslint-config-zakodium": "^14.0.0",
"eslint-plugin-storybook": "^0.11.1",
"fifo-logger": "^1.0.0",
"prettier": "^3.3.3",
"react": "^18.3.1",
Expand All @@ -119,10 +120,10 @@
"react-kbs": "^2.1.1",
"react-ocl": "^7.0.2",
"rimraf": "^6.0.1",
"storybook": "^8.3.6",
"storybook": "^8.4.5",
"typescript": "^5.6.3",
"vite": "^5.4.10",
"vitest": "^2.1.4"
"vite": "^5.4.11",
"vitest": "^2.1.5"
},
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion playwright-base.config.mts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { devices, type PlaywrightTestConfig } from '@playwright/test';
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';

const config: PlaywrightTestConfig = {
forbidOnly: !!process.env.CI,
Expand Down
2 changes: 1 addition & 1 deletion src/app-data/kinds/ir/__tests__/getIrMeasurement.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getTestFileCollection } from '../../../../test-utils.js';
import type { IrMeasurement } from '../../../index.js';
import {
getIrAutoPeakPickingEnhancer,
type IrMeasurement,
irMeasurementEnhancer,
jcampLoader,
loadMeasurements,
Expand Down
3 changes: 2 additions & 1 deletion src/app-data/kinds/ir/irAutoPeakPickingEnhancer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { gsd, type GSDOptions } from 'ml-gsd';
import type { GSDOptions } from 'ml-gsd';
import { gsd } from 'ml-gsd';
import type { Shape1D } from 'ml-peak-shape-generator';
import { xMinMaxValues } from 'ml-spectra-processing';

Expand Down
15 changes: 4 additions & 11 deletions src/app-data/loaders/loadMeasurements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@ import type { FifoLogger } from 'fifo-logger';
import type { FileCollection } from 'filelist-utils';
import { xMinMaxValues } from 'ml-spectra-processing';

import {
enhance,
type Enhancers,
type MeasurementBase,
type Measurements,
} from '../index.js';
import type { Enhancers, MeasurementBase, Measurements } from '../index.js';
import { enhance } from '../index.js';

import {
type MeasurementsLoader,
mergeMeasurements,
type ParserLog,
} from './utility/index.js';
import type { MeasurementsLoader, ParserLog } from './utility/index.js';
import { mergeMeasurements } from './utility/index.js';

export interface LoadOptions {
loaders?: MeasurementsLoader[];
Expand Down
7 changes: 2 additions & 5 deletions src/app-data/loaders/proprietary/agilent/cary500Loader.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import type { FifoLogger } from 'fifo-logger';
import type { FileCollection, FileCollectionItem } from 'filelist-utils';

import {
getMeasurementInfoFromFile,
type MeasurementBase,
type Measurements,
} from '../../../index.js';
import type { MeasurementBase, Measurements } from '../../../index.js';
import { getMeasurementInfoFromFile } from '../../../index.js';

export async function cary500Loader(
fileCollection: FileCollection,
Expand Down
3 changes: 2 additions & 1 deletion src/app-data/loaders/wdfLoader.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import type { MeasurementVariable } from 'cheminfo-types';
import type { FifoLogger } from 'fifo-logger';
import type { FileCollection } from 'filelist-utils';
import { parse, type Wdf } from 'wdf-parser';
import type { Wdf } from 'wdf-parser';
import { parse } from 'wdf-parser';

import type { MeasurementBase, Measurements } from '../index.js';

Expand Down
10 changes: 5 additions & 5 deletions src/app-data/state/app_state.actions.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { type AppState } from './app_state.js';
import {
type MeasurementKind,
type MeasurementKindAndId,
type Measurements,
import type { AppState } from './app_state.js';
import type {
MeasurementKind,
MeasurementKindAndId,
Measurements,
} from './data/index.js';
import type { MeasurementAppView, Plot2DZoom } from './view/index.js';

Expand Down
3 changes: 2 additions & 1 deletion src/app-data/state/app_state.provider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type ReactNode, useReducer } from 'react';
import type { ReactNode } from 'react';
import { useReducer } from 'react';

import {
appDispatchContext,
Expand Down
14 changes: 9 additions & 5 deletions src/app-data/state/app_state.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { produce } from 'immer';
import { createContext, type Dispatch, useContext } from 'react';
import type { Dispatch } from 'react';
import { createContext, useContext } from 'react';

import { type AppStateAction } from './app_state.actions.js';
import { type AppData, getEmptyAppData } from './data/index.js';
import type { AppStateAction } from './app_state.actions.js';
import type { AppData } from './data/index.js';
import { getEmptyAppData } from './data/index.js';
import { appStateProducer } from './producers/index.js';
import { type AppSettings, getEmptyAppSettings } from './settings/index.js';
import { type AppView, getEmptyAppView } from './view/index.js';
import type { AppSettings } from './settings/index.js';
import { getEmptyAppSettings } from './settings/index.js';
import type { AppView } from './view/index.js';
import { getEmptyAppView } from './view/index.js';

export interface AppState {
load: AppLoad;
Expand Down
6 changes: 3 additions & 3 deletions src/app-data/state/producers/app_state_producer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type Draft } from 'immer';
import type { Draft } from 'immer';

import { type AppStateAction } from '../app_state.actions.js';
import { type AppState } from '../app_state.js';
import type { AppStateAction } from '../app_state.actions.js';
import type { AppState } from '../app_state.js';

import { addMeasurements } from './measurements/addMeasurements.js';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { assert, defaultColorPalette } from '../../../../components/index.js';
import { getPreferredVariable, mergeMeasurements } from '../../../index.js';
import type { MeasurementKind } from '../../index.js';
import {
getFirstMeasurementOrFail,
iterateMeasurementEntries,
kindLabels,
type MeasurementKind,
} from '../../index.js';
import { resetZoom, updateZoom } from '../plot-view/helpers/zoom.js';
import type { AppStateProducer } from '../types.js';
Expand Down
12 changes: 6 additions & 6 deletions src/app-data/state/producers/plot-view/helpers/zoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import {
getPreferredVariable,
getVariableByLabel,
} from '../../../../helpers/index.js';
import {
type AppState,
iterateKindMeasurementsAndView,
type MeasurementBase,
type MeasurementKind,
type Plot2DZoom,
import type {
AppState,
MeasurementBase,
MeasurementKind,
Plot2DZoom,
} from '../../../index.js';
import { iterateKindMeasurementsAndView } from '../../../index.js';

export function getInitialZoom(): Plot2DZoom {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/app-data/state/settings/get_empty_app_settings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type AppSettings } from './app_settings.js';
import type { AppSettings } from './app_settings.js';

export function getEmptyAppSettings(): AppSettings {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/app-data/state/view/app_view.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type GradientScaleName } from '../../../components/index.js';
import type { GradientScaleName } from '../../../components/index.js';
import type { MeasurementKind } from '../index.js';

export interface AppView {
Expand Down
2 changes: 1 addition & 1 deletion src/app-data/state/view/get_empty_app_view.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type AppView } from './app_view.js';
import type { AppView } from './app_view.js';

export function getEmptyAppView(): AppView {
return {
Expand Down
2 changes: 1 addition & 1 deletion src/app/about/AboutDialogToolbarButton.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Dialog, DialogBody } from '@blueprintjs/core';
import type { IconName } from '@blueprintjs/icons';
import { type ReactElement, type ReactNode } from 'react';
import type { ReactElement, ReactNode } from 'react';

import { Toolbar, useOnOff } from '../../components/index.js';

Expand Down
15 changes: 6 additions & 9 deletions src/app/explorer/ExplorerPlotView.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { match } from 'ts-pattern';

import { useAppView } from '../../app-data/index.js';
import { assertNotNull } from '../../components/index.js';
import { IvPlotView, MassPlotView } from '../index.js';
Expand All @@ -8,13 +10,8 @@ export function ExplorerPlotView() {
const appView = useAppView();
const selectedKind = appView.selectedKind;
assertNotNull(selectedKind);
switch (selectedKind) {
case 'mass':
return <MassPlotView />;
case 'iv':
return <IvPlotView />;
default: {
return <MeasurementExplorerWithState />;
}
}
return match(selectedKind)
.with('mass', () => <MassPlotView />)
.with('iv', () => <IvPlotView />)
.otherwise(() => <MeasurementExplorerWithState />);
}
6 changes: 2 additions & 4 deletions src/app/explorer/MeasurementExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ import styled from '@emotion/styled';
import { useMemo, useState } from 'react';
import { FaArrowsAltH, FaExchangeAlt } from 'react-icons/fa';

import {
MeasurementPlot,
type MeasurementPlotProps,
} from '../helpers/index.js';
import type { MeasurementPlotProps } from '../helpers/index.js';
import { MeasurementPlot } from '../helpers/index.js';

export type MeasurementExplorerProps = Omit<
MeasurementPlotProps,
Expand Down
3 changes: 2 additions & 1 deletion src/app/helpers/react-plot.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import styled from '@emotion/styled';
import { type ReactNode, useMemo } from 'react';
import type { ReactNode } from 'react';
import { useMemo } from 'react';
import { ResponsiveChart } from 'react-d3-utils';
import {
Annotations,
Expand Down
10 changes: 5 additions & 5 deletions src/app/helpers/splitEntries.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
type AppState,
iterateKindMeasurementsAndView,
type MeasurementAndView,
type MeasurementKind,
import type {
AppState,
MeasurementAndView,
MeasurementKind,
} from '../../app-data/index.js';
import { iterateKindMeasurementsAndView } from '../../app-data/index.js';

export function splitEntries<Kind extends MeasurementKind>(
appState: AppState,
Expand Down
9 changes: 6 additions & 3 deletions src/app/hooks/file-loading.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { useQuery, type UseQueryResult } from '@tanstack/react-query';
import type { UseQueryResult } from '@tanstack/react-query';
import { useQuery } from '@tanstack/react-query';
import type { FifoLogger } from 'fifo-logger';
import { FileCollection, fileCollectionFromWebSource } from 'filelist-utils';
import type { FileCollection } from 'filelist-utils';
import { fileCollectionFromWebSource } from 'filelist-utils';
import { useCallback } from 'react';

import { type AppDispatch, useAppDispatch } from '../../app-data/index.js';
import type { AppDispatch } from '../../app-data/index.js';
import { useAppDispatch } from '../../app-data/index.js';
import { useFifoLogger, useHashSearchParams } from '../../components/index.js';

type LoadFn = (
Expand Down
7 changes: 2 additions & 5 deletions src/app/kinds/iv/plot-view/IvSeries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ import { xyToXYObject } from 'ml-spectra-processing';
import { useMemo } from 'react';
import { LineSeries } from 'react-plot';

import {
type ColorConfig,
getVariableByLabel,
type IvMeasurement,
} from '../../../../app-data/index.js';
import type { ColorConfig, IvMeasurement } from '../../../../app-data/index.js';
import { getVariableByLabel } from '../../../../app-data/index.js';
import { getColorFromConfig } from '../../../helpers/index.js';

interface IvSeriesProps {
Expand Down
Loading

0 comments on commit c27f8af

Please sign in to comment.