diff --git a/eslint.config.mjs b/eslint.config.mjs index 3475c28b91..6117e9abd0 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -78,7 +78,6 @@ export default tseslint.config( }, ], - '@typescript-eslint/no-deprecated': 'off', 'react-refresh/only-export-components': 'warn', 'react/no-unescaped-entities': 'off', 'react/prop-types': 'off', diff --git a/package.json b/package.json index c5b95bc27c..d6562d4f54 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,8 @@ "@emotion/cache": "^11.7.1", "@emotion/react": "^11.9.0", "@emotion/styled": "^11.8.1", - "@mui/material": "^5.10.17", - "@mui/system": "^5.14.4", + "@mui/material": "^6.0.0", + "@mui/system": "^6.0.0", "@mui/x-data-grid": "^7.0.0", "@node-oauth/express-oauth-server": "^4.0.0", "@oclif/core": "^4.0.0", diff --git a/packages/app-core/package.json b/packages/app-core/package.json index aab850037c..e789ab0f7e 100644 --- a/packages/app-core/package.json +++ b/packages/app-core/package.json @@ -43,8 +43,8 @@ "dependencies": { "@babel/runtime": "^7.16.3", "@jbrowse/product-core": "^2.14.0", - "@mui/icons-material": "^5.0.0", - "@mui/material": "^5.10.17", + "@mui/icons-material": "^6.0.0", + "@mui/material": "^6.0.0", "copy-to-clipboard": "^3.3.1", "react-error-boundary": "^4.0.3" }, diff --git a/packages/app-core/src/ui/App/ViewMenu.tsx b/packages/app-core/src/ui/App/ViewMenu.tsx index 77c71d8349..1cae5d9906 100644 --- a/packages/app-core/src/ui/App/ViewMenu.tsx +++ b/packages/app-core/src/ui/App/ViewMenu.tsx @@ -101,7 +101,11 @@ const ViewMenu = observer(function ({ }, ] : []), - ...model.menuItems(), + + // old plugins use menuItems as a function + ...(typeof model.menuItems === 'function' + ? model.menuItems() + : model.menuItems), ]} popupState={popupState} /> diff --git a/packages/core/BaseFeatureWidget/BaseFeatureDetail/index.tsx b/packages/core/BaseFeatureWidget/BaseFeatureDetail/index.tsx index d76c77d1df..38ccfff2a8 100644 --- a/packages/core/BaseFeatureWidget/BaseFeatureDetail/index.tsx +++ b/packages/core/BaseFeatureWidget/BaseFeatureDetail/index.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react' +import React from 'react' import { ErrorBoundary } from 'react-error-boundary' import { Accordion, @@ -45,7 +45,7 @@ const useStyles = makeStyles()(theme => ({ display: 'block', padding: theme.spacing(1), }, - expandIcon: { + icon: { color: theme.palette.tertiary.contrastText || '#fff', }, })) @@ -56,23 +56,9 @@ export function BaseCard({ defaultExpanded = true, }: BaseCardProps) { const { classes } = useStyles() - const [expanded, setExpanded] = useState(defaultExpanded) return ( - { - setExpanded(s => !s) - }} - slotProps={{ - transition: { - unmountOnExit: true, - timeout: 150, - }, - }} - > - } - > + + }> {title} diff --git a/packages/core/BaseFeatureWidget/__snapshots__/index.test.tsx.snap b/packages/core/BaseFeatureWidget/__snapshots__/index.test.tsx.snap index 9ac140134c..f0cf7b8cac 100644 --- a/packages/core/BaseFeatureWidget/__snapshots__/index.test.tsx.snap +++ b/packages/core/BaseFeatureWidget/__snapshots__/index.test.tsx.snap @@ -3,56 +3,61 @@ exports[`open up a widget 1`] = `
-
- -
-
- +
+
+ +
-
+

Core details

@@ -87,10 +92,10 @@ exports[`open up a widget 1`] = `

Attributes

@@ -115,27 +120,24 @@ exports[`open up a widget 1`] = ` class="css-57ilie-container" >
diff --git a/packages/core/data_adapters/BaseAdapter.test.ts b/packages/core/data_adapters/BaseAdapter.test.ts index a8dfe93d94..277e39fd4d 100644 --- a/packages/core/data_adapters/BaseAdapter.test.ts +++ b/packages/core/data_adapters/BaseAdapter.test.ts @@ -4,6 +4,7 @@ import { ObservableCreate } from '../util/rxjs' import SimpleFeature, { Feature } from '../util/simpleFeature' import { Region } from '../util/types' import { ConfigurationSchema } from '../configuration/configurationSchema' +import { firstValueFrom } from 'rxjs' describe('base data adapter', () => { it('properly propagates errors in feature fetching', async () => { @@ -27,10 +28,11 @@ describe('base data adapter', () => { start: 0, end: 20000, }) - const featuresArray = features.pipe(toArray()).toPromise() - - // eslint-disable-next-line @typescript-eslint/no-floating-promises - expect(featuresArray).rejects.toThrow(/something blew up/) + try { + await firstValueFrom(features.pipe(toArray())) + } catch (e) { + expect(`${e}`).toMatch(/something blew up/) + } }) it('retrieves features', async () => { @@ -64,7 +66,7 @@ describe('base data adapter', () => { start: 0, end: 20000, }) - const featuresArray = await features.pipe(toArray()).toPromise() + const featuresArray = await firstValueFrom(features.pipe(toArray())) expect(featuresArray).toMatchSnapshot() const features2 = adapter.getFeatures({ @@ -73,7 +75,7 @@ describe('base data adapter', () => { start: 0, end: 20000, }) - const featuresArray2 = await features2.pipe(toArray()).toPromise() + const featuresArray2 = await firstValueFrom(features2.pipe(toArray())) expect(featuresArray2).toMatchSnapshot() }) }) diff --git a/packages/core/data_adapters/BaseAdapter/BaseAdapter.ts b/packages/core/data_adapters/BaseAdapter/BaseAdapter.ts index 1ebcc8fc47..92ee1ad83b 100644 --- a/packages/core/data_adapters/BaseAdapter/BaseAdapter.ts +++ b/packages/core/data_adapters/BaseAdapter/BaseAdapter.ts @@ -32,7 +32,8 @@ export abstract class BaseAdapter { /** * Same as `readConfObject(this.config, arg)`. - * @deprecated Does not offer the same TS type checking as `readConfObject`, consider using that instead. + * Note: Does not offer the same TS type checking as `readConfObject`, + * consider using that instead. */ getConf(arg: string | string[]) { return readConfObject(this.config, arg) diff --git a/packages/core/package.json b/packages/core/package.json index 0787576f96..33439bb7d0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -34,7 +34,7 @@ "@gmod/abortable-promise-cache": "^2.0.0", "@gmod/bgzf-filehandle": "^1.4.3", "@gmod/http-range-fetcher": "^3.0.4", - "@mui/icons-material": "^5.0.1", + "@mui/icons-material": "^6.0.0", "@mui/x-data-grid": "^7.0.0", "@types/clone": "^2.0.0", "canvas-sequencer": "^3.1.0", @@ -60,7 +60,7 @@ "svg-path-generator": "^1.1.0" }, "peerDependencies": { - "@mui/material": "^5.0.0", + "@mui/material": "^6.0.0", "mobx": "^6.0.0", "mobx-react": "^9.0.0", "mobx-state-tree": "^5.0.0", diff --git a/packages/core/pluggableElementTypes/renderers/RpcRenderedSvgGroup.tsx b/packages/core/pluggableElementTypes/renderers/RpcRenderedSvgGroup.tsx index bc87c695d4..a154263186 100644 --- a/packages/core/pluggableElementTypes/renderers/RpcRenderedSvgGroup.tsx +++ b/packages/core/pluggableElementTypes/renderers/RpcRenderedSvgGroup.tsx @@ -69,6 +69,7 @@ const OldHydrate = observer(function OldHydrate(props: Props) { function doHydrate() { if (domNode && html) { if (domNode.innerHTML) { + // eslint-disable-next-line @typescript-eslint/no-deprecated unmountComponentAtNode(domNode) } @@ -80,6 +81,7 @@ const OldHydrate = observer(function OldHydrate(props: Props) { // hydration for when we have some free time. helps keep the // framerate up. rIC(() => { + // eslint-disable-next-line @typescript-eslint/no-deprecated hydrate(, domNode) }) } @@ -87,6 +89,7 @@ const OldHydrate = observer(function OldHydrate(props: Props) { doHydrate() return () => { if (domNode) { + // eslint-disable-next-line @typescript-eslint/no-deprecated unmountComponentAtNode(domNode) } } diff --git a/packages/core/pluggableElementTypes/renderers/ServerSideRenderedContent.tsx b/packages/core/pluggableElementTypes/renderers/ServerSideRenderedContent.tsx index 235696b940..8566a33769 100644 --- a/packages/core/pluggableElementTypes/renderers/ServerSideRenderedContent.tsx +++ b/packages/core/pluggableElementTypes/renderers/ServerSideRenderedContent.tsx @@ -82,10 +82,12 @@ const OldHydrate = observer(function ({ const domNode = ref.current function doHydrate() { if (domNode) { + // eslint-disable-next-line @typescript-eslint/no-deprecated unmountComponentAtNode(domNode) domNode.innerHTML = html rIC(() => { + // eslint-disable-next-line @typescript-eslint/no-deprecated hydrate( @@ -100,6 +102,7 @@ const OldHydrate = observer(function ({ return () => { if (domNode) { + // eslint-disable-next-line @typescript-eslint/no-deprecated unmountComponentAtNode(domNode) } } diff --git a/packages/core/ui/theme.ts b/packages/core/ui/theme.ts index f9266ad036..83106bccf8 100644 --- a/packages/core/ui/theme.ts +++ b/packages/core/ui/theme.ts @@ -267,8 +267,11 @@ export function createJBrowseBaseTheme(theme?: ThemeOptions): ThemeOptions { MuiAccordion: { defaultProps: { disableGutters: true, - TransitionProps: { - timeout: 150, + slotProps: { + transition: { + timeout: 150, + unmountOnExit: true, + }, }, }, }, diff --git a/packages/core/util/aborting.ts b/packages/core/util/aborting.ts index 062618752d..781a2cf3a4 100644 --- a/packages/core/util/aborting.ts +++ b/packages/core/util/aborting.ts @@ -57,7 +57,7 @@ export function makeAbortError() { export function observeAbortSignal(signal?: AbortSignal): Observable { if (!signal) { - return Observable.create() + return new Observable() } return fromEvent(signal, 'abort') } diff --git a/packages/core/util/index.ts b/packages/core/util/index.ts index c4d98d790e..92aadc9209 100644 --- a/packages/core/util/index.ts +++ b/packages/core/util/index.ts @@ -1456,6 +1456,7 @@ export function renderToStaticMarkup( if (createRootFn) { createRootFn(div).render(node) } else { + // eslint-disable-next-line @typescript-eslint/no-deprecated render(node, div) } }) diff --git a/packages/core/util/rxjs.ts b/packages/core/util/rxjs.ts index eb503fd917..04309595dd 100644 --- a/packages/core/util/rxjs.ts +++ b/packages/core/util/rxjs.ts @@ -11,17 +11,15 @@ export function ObservableCreate( func: (arg: Observer) => void | Promise, signal?: AbortSignal, ): Observable { - return Observable.create((observer: Observer) => { + return new Observable((observer: Observer) => { try { const ret = func(observer) - // catch async errors if (ret?.catch) { ret.catch((error: unknown) => { observer.error(error) }) } } catch (error) { - // catch sync errors observer.error(error) } }).pipe(takeUntil(observeAbortSignal(signal))) diff --git a/packages/embedded-core/package.json b/packages/embedded-core/package.json index 01804aa69e..d480dd1565 100644 --- a/packages/embedded-core/package.json +++ b/packages/embedded-core/package.json @@ -44,8 +44,8 @@ "@babel/runtime": "^7.16.3", "@jbrowse/core": "^2.14.0", "@jbrowse/product-core": "^2.14.0", - "@mui/icons-material": "^5.0.0", - "@mui/material": "^5.10.17", + "@mui/icons-material": "^6.0.0", + "@mui/material": "^6.0.0", "copy-to-clipboard": "^3.3.1", "react-error-boundary": "^4.0.3" }, diff --git a/packages/product-core/package.json b/packages/product-core/package.json index 3bd4dcbde4..3c731b64e8 100644 --- a/packages/product-core/package.json +++ b/packages/product-core/package.json @@ -44,8 +44,8 @@ "dependencies": { "@babel/runtime": "^7.16.3", "@jbrowse/core": "^2.14.0", - "@mui/icons-material": "^5.0.0", - "@mui/material": "^5.10.17", + "@mui/icons-material": "^6.0.0", + "@mui/material": "^6.0.0", "copy-to-clipboard": "^3.3.1", "librpc-web-mod": "^1.0.0", "react-error-boundary": "^4.0.3", diff --git a/packages/text-indexing/src/types/common.test.ts b/packages/text-indexing/src/types/common.test.ts index 524b3ca9d7..34fb643ead 100644 --- a/packages/text-indexing/src/types/common.test.ts +++ b/packages/text-indexing/src/types/common.test.ts @@ -33,6 +33,6 @@ describe('utils for text indexing', () => { expect(conf3.adapter?.type).toBe('VcfTabixAdapter') expect(() => { guessAdapterFromFileName(unsupported) - }).toThrowError(`Unsupported file type ${unsupported}`) + }).toThrow(`Unsupported file type ${unsupported}`) }) }) diff --git a/packages/web-core/package.json b/packages/web-core/package.json index 2c8175908f..9dca10050b 100644 --- a/packages/web-core/package.json +++ b/packages/web-core/package.json @@ -44,8 +44,8 @@ "@babel/runtime": "^7.16.3", "@jbrowse/app-core": "^2.14.0", "@jbrowse/product-core": "^2.14.0", - "@mui/icons-material": "^5.0.0", - "@mui/material": "^5.10.17", + "@mui/icons-material": "^6.0.0", + "@mui/material": "^6.0.0", "clone": "^2.0.0", "copy-to-clipboard": "^3.3.1", "react-error-boundary": "^4.0.3" diff --git a/plugins/alignments/package.json b/plugins/alignments/package.json index ca7bb1f6e4..476e7ee9aa 100644 --- a/plugins/alignments/package.json +++ b/plugins/alignments/package.json @@ -38,7 +38,7 @@ "dependencies": { "@gmod/bam": "^2.0.0", "@gmod/cram": "^3.0.3", - "@mui/icons-material": "^5.0.1", + "@mui/icons-material": "^6.0.0", "canvas2svg": "^1.0.16", "clone": "^2.1.2", "copy-to-clipboard": "^3.3.1", @@ -49,7 +49,7 @@ "@jbrowse/core": "^2.0.0", "@jbrowse/plugin-linear-genome-view": "^2.0.0", "@jbrowse/plugin-wiggle": "^2.0.0", - "@mui/material": "^5.0.0", + "@mui/material": "^6.0.0", "mobx": "^6.0.0", "mobx-react": "^9.0.0", "mobx-state-tree": "^5.0.0", diff --git a/plugins/alignments/src/AlignmentsFeatureDetail/__snapshots__/index.test.tsx.snap b/plugins/alignments/src/AlignmentsFeatureDetail/__snapshots__/index.test.tsx.snap index f7b4831ad4..6bb599ff74 100644 --- a/plugins/alignments/src/AlignmentsFeatureDetail/__snapshots__/index.test.tsx.snap +++ b/plugins/alignments/src/AlignmentsFeatureDetail/__snapshots__/index.test.tsx.snap @@ -3,62 +3,68 @@ exports[`open up a widget 1`] = `
-
- - ctgA_3_555_0:0:0_2:0... - match - -
-
-
+
- - + +
-
+

Core details

@@ -125,10 +131,10 @@ exports[`open up a widget 1`] = `

Attributes

@@ -283,27 +289,24 @@ exports[`open up a widget 1`] = ` class="css-57ilie-container" >
diff --git a/plugins/alignments/src/MismatchParser/index.ts b/plugins/alignments/src/MismatchParser/index.ts index 87b960e0ba..362b82cf62 100644 --- a/plugins/alignments/src/MismatchParser/index.ts +++ b/plugins/alignments/src/MismatchParser/index.ts @@ -78,7 +78,7 @@ export function cigarToMismatches( }) } else if (op === 'X') { const r = seq?.slice(soffset, soffset + len) || [] - const q = qual?.slice(soffset, soffset + len) || [] + const q = qual?.subarray(soffset, soffset + len) || [] for (let j = 0; j < len; j++) { mismatches.push({ diff --git a/plugins/arc/package.json b/plugins/arc/package.json index 8491ab20b1..1f493b1cac 100644 --- a/plugins/arc/package.json +++ b/plugins/arc/package.json @@ -39,7 +39,7 @@ "@jbrowse/core": "^2.0.0", "@jbrowse/plugin-linear-genome-view": "^2.0.0", "@jbrowse/plugin-wiggle": "^2.0.0", - "@mui/material": "^5.0.0", + "@mui/material": "^6.0.0", "mobx": "^6.0.0", "mobx-react": "^9.0.0", "mobx-state-tree": "^5.0.0", diff --git a/plugins/authentication/package.json b/plugins/authentication/package.json index 8066be6549..d9af14a8ea 100644 --- a/plugins/authentication/package.json +++ b/plugins/authentication/package.json @@ -41,7 +41,7 @@ }, "peerDependencies": { "@jbrowse/core": "^2.0.0", - "@mui/material": "^5.0.0", + "@mui/material": "^6.0.0", "mobx": "^6.0.0", "mobx-react": "^9.0.0", "mobx-state-tree": "^5.0.0", diff --git a/plugins/breakpoint-split-view/package.json b/plugins/breakpoint-split-view/package.json index 58953ed6a9..44ccddf35d 100644 --- a/plugins/breakpoint-split-view/package.json +++ b/plugins/breakpoint-split-view/package.json @@ -37,14 +37,14 @@ }, "dependencies": { "@gmod/vcf": "^5.0.9", - "@mui/icons-material": "^5.0.1", + "@mui/icons-material": "^6.0.0", "@types/file-saver": "^2.0.1", "file-saver": "^2.0.0" }, "peerDependencies": { "@jbrowse/core": "^2.0.0", "@jbrowse/plugin-linear-genome-view": "^2.0.0", - "@mui/material": "^5.0.0", + "@mui/material": "^6.0.0", "mobx": "^6.0.0", "mobx-react": "^9.0.0", "mobx-state-tree": "^5.0.0", diff --git a/plugins/circular-view/package.json b/plugins/circular-view/package.json index d21c997dde..7f6e160f9a 100644 --- a/plugins/circular-view/package.json +++ b/plugins/circular-view/package.json @@ -36,14 +36,14 @@ "clean": "rimraf dist esm *.tsbuildinfo" }, "dependencies": { - "@mui/icons-material": "^5.0.1", + "@mui/icons-material": "^6.0.0", "@types/file-saver": "^2.0.0", "clone": "^2.1.2", "file-saver": "^2.0.0" }, "peerDependencies": { "@jbrowse/core": "^2.0.0", - "@mui/material": "^5.0.0", + "@mui/material": "^6.0.0", "mobx": "^6.0.0", "mobx-react": "^9.0.0", "mobx-state-tree": "^5.0.0", diff --git a/plugins/comparative-adapters/package.json b/plugins/comparative-adapters/package.json index a16745a8aa..99f26e948d 100644 --- a/plugins/comparative-adapters/package.json +++ b/plugins/comparative-adapters/package.json @@ -44,7 +44,7 @@ "@jbrowse/core": "^2.0.0", "@jbrowse/plugin-alignments": "^2.0.0", "@jbrowse/plugin-linear-genome-view": "^2.0.0", - "@mui/material": "^5.0.0", + "@mui/material": "^6.0.0", "mobx": "^6.0.0", "mobx-react": "^9.0.0", "mobx-state-tree": "^5.0.0", diff --git a/plugins/comparative-adapters/src/ChainAdapter/util.ts b/plugins/comparative-adapters/src/ChainAdapter/util.ts index 435cd4e6bc..c39c335b7a 100644 --- a/plugins/comparative-adapters/src/ChainAdapter/util.ts +++ b/plugins/comparative-adapters/src/ChainAdapter/util.ts @@ -73,7 +73,7 @@ export function paf_chain2paf(buffer: Buffer) { if (n === -1) { break } - const b = buffer.slice(blockStart, n) + const b = buffer.subarray(blockStart, n) const l = (decoder?.decode(b) || b.toString()).trim() blockStart = n + 1 const l_tab = l.replaceAll(' ', '\t') // There are CHAIN files with space-separated fields diff --git a/plugins/comparative-adapters/src/DeltaAdapter/util.ts b/plugins/comparative-adapters/src/DeltaAdapter/util.ts index 786987908d..8b2e3e3869 100644 --- a/plugins/comparative-adapters/src/DeltaAdapter/util.ts +++ b/plugins/comparative-adapters/src/DeltaAdapter/util.ts @@ -53,7 +53,7 @@ export function paf_delta2paf(buffer: Buffer) { if (n === -1) { break } - const b = buffer.slice(blockStart, n) + const b = buffer.subarray(blockStart, n) const line = (decoder?.decode(b) || b.toString()).trim() blockStart = n + 1 i++ diff --git a/plugins/comparative-adapters/src/util.ts b/plugins/comparative-adapters/src/util.ts index 598cb1ab58..b7f6abf91a 100644 --- a/plugins/comparative-adapters/src/util.ts +++ b/plugins/comparative-adapters/src/util.ts @@ -52,7 +52,7 @@ export function parseLineByLine( if (n === -1) { break } - const b = buffer.slice(blockStart, n) + const b = buffer.subarray(blockStart, n) const line = (decoder?.decode(b) || b.toString()).trim() if (line) { entries.push(cb(line)) diff --git a/plugins/config/package.json b/plugins/config/package.json index b117b3fbc7..413992bbd5 100644 --- a/plugins/config/package.json +++ b/plugins/config/package.json @@ -36,12 +36,12 @@ "clean": "rimraf dist esm *.tsbuildinfo" }, "dependencies": { - "@mui/icons-material": "^5.0.1", + "@mui/icons-material": "^6.0.0", "pluralize": "^8.0.0" }, "peerDependencies": { "@jbrowse/core": "^2.0.0", - "@mui/material": "^5.0.0", + "@mui/material": "^6.0.0", "mobx": "^6.0.0", "mobx-react": "^9.0.0", "mobx-state-tree": "^5.0.0", diff --git a/plugins/config/src/ConfigurationEditorWidget/components/__snapshots__/ConfigurationEditor.test.tsx.snap b/plugins/config/src/ConfigurationEditorWidget/components/__snapshots__/ConfigurationEditor.test.tsx.snap index 97d65775e8..c0dbb7e0a6 100644 --- a/plugins/config/src/ConfigurationEditorWidget/components/__snapshots__/ConfigurationEditor.test.tsx.snap +++ b/plugins/config/src/ConfigurationEditorWidget/components/__snapshots__/ConfigurationEditor.test.tsx.snap @@ -3,68 +3,74 @@ exports[`renders all the different types of built-in slots 1`] = `
-
-

- Configuration -

-
-
-
+
- - + +
-
+

stringArrayTest

@@ -322,42 +315,44 @@ exports[`renders all the different types of built-in slots 1`] = ` />
key1

Values associated with entry key1

stringArrayMapTest

@@ -549,16 +533,17 @@ exports[`renders all the different types of built-in slots 1`] = ` />