Skip to content

Commit 65ad49d

Browse files
committed
Update JBrowse version and React
1 parent 74cc872 commit 65ad49d

File tree

12 files changed

+5392
-11656
lines changed

12 files changed

+5392
-11656
lines changed

jbrowse/package-lock.json

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

jbrowse/package.json

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@
55
"scripts": {
66
"setup": "npm ci",
77
"build": "npm run build-dev",
8-
"start": "cross-env NODE_ENV=development webpack-dev-server --config ./config/watch.config.js",
8+
"start": "cross-env NODE_ENV=development webpack serve --config ./config/watch.config.js",
99
"build-no-pkg": "npm run clean && cross-env NODE_ENV=development webpack --config ./config/dev.config.js --progress --profile",
1010
"build-dev": "npm run build-no-pkg",
1111
"build-prod": "npm run clean && cross-env NODE_ENV=production PROD_SOURCE_MAP=source-map webpack --config ./config/prod.config.js --progress --profile",
12-
"clean": "rimraf resources/web/gen && rimraf resources/web/jbrowse/gen && rimraf resources/views/gen && rimraf resources/views/browser*",
13-
"test": "cross-env NODE_ENV=test jest",
12+
"clean": "rimraf resources/web/gen && rimraf resources/web/jbrowse/gen && rimraf resources/views/gen",
1413
"prepareCli": "rimraf ./buildCli && rimraf ./resources/external/jb-cli && npm install @jbrowse/cli@1.7.4 --prefix ./buildCli",
1514
"jb-pkg": "npm run prepareCli && npx pkg --outdir=./resources/external/jb-cli ./buildCli/node_modules/@jbrowse/cli && rimraf ./buildCli"
1615
},
1716
"dependencies": {
1817
"@gmod/vcf": "^5.0.10",
19-
"@jbrowse/core": "^2.14.0",
20-
"@jbrowse/plugin-linear-genome-view": "^2.14.0",
21-
"@jbrowse/plugin-svg": "^2.14.0",
22-
"@jbrowse/plugin-variants": "^2.14.0",
23-
"@jbrowse/react-linear-genome-view": "^2.14.0",
24-
"@labkey/api": "^1.25.0",
25-
"@labkey/components": "^2.0.0",
18+
"@jbrowse/core": "2.15.0",
19+
"@jbrowse/plugin-linear-genome-view": "2.15.0",
20+
"@jbrowse/plugin-svg": "2.15.0",
21+
"@jbrowse/plugin-variants": "2.15.0",
22+
"@jbrowse/react-linear-genome-view": "2.15.0",
23+
"@labkey/api": "^1.35.0",
24+
"@labkey/components": "^5.0.0",
2625
"@mui/x-data-grid": "^7.0.0",
26+
"@yao-pkg/pkg": "^5.12.0",
2727
"assert": "^2.0.0",
2828
"browserify-zlib": "^0.2.0",
2929
"buffer": "^6.0.3",
@@ -34,31 +34,25 @@
3434
"jspdf-autotable": "^3.5.31",
3535
"node-polyfill-webpack-plugin": "2.0.1",
3636
"path-browserify": "^1.0.1",
37-
"pkg": "^5.8.1",
38-
"react-data-grid": "7.0.0-beta.10",
37+
"react": "^18.0.0",
38+
"react-data-grid": "7.0.0-beta.46",
39+
"react-dom": "^18.0.0",
3940
"react-google-charts": "^4.0.1",
40-
"react-hot-loader": "^4.13.1",
41-
"react-select": "^5.7.4",
41+
"react-select": "^5.8.0",
4242
"regenerator-runtime": "^0.13.11",
4343
"stream-browserify": "^3.0.0",
44-
"typescript": "^5.1.6",
4544
"util": "^0.12.5",
4645
"uuid": "^9.0.0",
4746
"vm-browserify": "^1.1.2"
4847
},
4948
"devDependencies": {
50-
"@labkey/build": "6.16.0",
51-
"@types/jest": "^29.0.0",
49+
"@labkey/build": "7.6.0",
5250
"@types/jexl": "^2.3.1",
5351
"@types/jquery": "^3.0.0",
5452
"@types/node": "^18.17.1",
55-
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
56-
"enzyme": "^3.11.0",
57-
"jest": "^29.0.0",
58-
"jest-cli": "^29.0.0",
59-
"jest-environment-jsdom": "^29.7.0",
60-
"jest-mock": "^29.0.0",
53+
"@types/react": "^18.0.0",
54+
"@types/react-dom": "^18.0.0",
6155
"rimraf": "^3.0.2",
62-
"ts-jest": "^29.0.0"
56+
"typescript": "^5.0.0"
6357
}
6458
}
Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import { AppContainer } from 'react-hot-loader';
43

54
import View from './Browser';
65

76
const render = () => {
8-
ReactDOM.render(
9-
<AppContainer>
10-
<View />
11-
</AppContainer>,
12-
document.getElementById('app')
13-
)
7+
ReactDOM.render(<View />, document.getElementById('app'));
148
};
159

16-
declare const module: any;
17-
18-
if (module.hot) {
19-
module.hot.accept();
20-
}
21-
2210
render();

jbrowse/src/client/JBrowse/Browser/plugins/ExtendedVariantPlugin/ExtendedVariantAdapter/VcfTabixAdapter.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { TabixIndexedFile } from '@gmod/tabix'
1010
import VcfParser from '@gmod/vcf'
1111
import { VcfFeature } from '@jbrowse/plugin-variants';
1212

13-
export default class extends BaseFeatureDataAdapter {
13+
export default class VcfTabixAdapter extends BaseFeatureDataAdapter {
1414
private configured?: Promise<{
1515
vcf: TabixIndexedFile
1616
parser: VcfParser
@@ -28,8 +28,7 @@ export default class extends BaseFeatureDataAdapter {
2828
filehandle,
2929
csiFilehandle: isCSI ? openLocation(location, pm) : undefined,
3030
tbiFilehandle: !isCSI ? openLocation(location, pm) : undefined,
31-
chunkCacheSize: 50 * 2 ** 20,
32-
chunkSizeLimit: 1000000000,
31+
chunkCacheSize: 50 * 2 ** 20
3332
})
3433

3534
const header = await vcf.getHeader()
Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import { AppContainer } from 'react-hot-loader';
43
import { App } from '@labkey/api';
54

65
import StandaloneSearch from '../StandaloneSearch';
76

8-
App.registerApp<any>('jbrowseSearchWebpart', (target: string, sessionId: string) => {
9-
ReactDOM.render(
10-
<AppContainer>
11-
<StandaloneSearch sessionId={sessionId} />
12-
</AppContainer>,
13-
document.getElementById(target)
14-
);
15-
}, true /* hot */);
7+
const render = (target: string, sessionId: string) => {
8+
ReactDOM.render(<StandaloneSearch sessionId={sessionId} />, document.getElementById(target));
9+
};
1610

17-
declare const module: any;
11+
App.registerApp<any>('jbrowseSearchWebpart', render, true /* hot */);

jbrowse/src/client/JBrowse/VariantSearch/components/ErrorBoundary.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ import ErrorPage from './ErrorPage';
55

66
interface ErrorBoundaryState {
77
error: Error | undefined;
8-
errorInfo: ErrorInfo | undefined;
8+
errorInfo?: ErrorInfo | undefined;
99
stackTrace: string | undefined;
10-
devMode: boolean | undefined,
10+
devMode?: boolean | undefined,
1111
}
1212

13-
export class ErrorBoundary extends React.PureComponent<{}, ErrorBoundaryState> {
13+
export class ErrorBoundary extends React.Component<any, ErrorBoundaryState> {
1414
constructor(props) {
1515
super(props);
1616

@@ -30,14 +30,15 @@ export class ErrorBoundary extends React.PureComponent<{}, ErrorBoundaryState> {
3030
this.setState(() => ({
3131
error,
3232
errorInfo,
33-
stackTrace: error?.stack ? error.stack : undefined,
33+
stackTrace: error?.stack ? error.stack : undefined
3434
}));
3535

3636
if (Mothership) {
3737
// process stack trace against available source maps
3838
Mothership.processStackTrace(error, stackTrace => {
3939
this.setState(state => ({
40-
stackTrace: stackTrace || state.stackTrace,
40+
error: error,
41+
stackTrace: stackTrace || state.stackTrace
4142
}));
4243
});
4344

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import { AppContainer } from 'react-hot-loader';
43

54
import VariantTable from './VariantTable';
65

76
const render = () => {
8-
ReactDOM.render(
9-
<AppContainer>
10-
<VariantTable />
11-
</AppContainer>,
12-
document.getElementById('app')
13-
)
7+
ReactDOM.render(<VariantTable />, document.getElementById('app'));
148
};
159

16-
declare const module: any;
17-
18-
if (module.hot) {
19-
module.hot.accept();
20-
}
21-
2210
render();

jbrowse/src/client/JBrowse/VariantTable/VariantTable.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import LoadingIndicator from './components/LoadingIndicator';
1414
import JBrowseFilterPanel from '../Browser/components/JBrowseFilterPanel';
1515
import { ErrorBoundary } from '../VariantSearch/components/ErrorBoundary';
1616
import { Assembly } from '@jbrowse/core/assemblyManager/assembly';
17+
import { Theme } from 'react-select';
1718

1819
const nativePlugins = [ExtendedVariantPlugin, LogSession];
1920

@@ -34,7 +35,7 @@ function VariantTable() {
3435

3536
const [session, setSession] = useState(null);
3637
const [state, setState] = useState(null);
37-
const [theme, setTheme] = useState(null);
38+
const [theme, setTheme] = useState<Partial<Theme>>(null);
3839
const [view, setView] = useState(null);
3940
const [parsedLocString, setParsedLocString] = useState(null)
4041
const [pluginManager, setPluginManager] = useState(null);
Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,10 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import { AppContainer } from 'react-hot-loader';
43

54
import VariantTable from './VariantTable';
65

76
const render = () => {
8-
ReactDOM.render(
9-
<AppContainer>
10-
<VariantTable />
11-
</AppContainer>,
12-
document.getElementById('app')
13-
)
7+
ReactDOM.render(<VariantTable />, document.getElementById('app'));
148
};
159

16-
declare const module: any;
17-
18-
if (module.hot) {
19-
module.hot.accept();
20-
}
21-
2210
render();

jbrowse/src/client/JBrowse/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
getGridNumericOperators,
77
GridCellParams,
88
GridColDef,
9+
GridColType,
910
GridComparatorFn,
1011
GridFilterItem,
1112
GridFilterOperator
@@ -506,7 +507,7 @@ export class FieldModel {
506507
return this.label ?? this.name
507508
}
508509

509-
getMuiType(): string {
510+
getMuiType(): GridColType {
510511
let muiFieldType;
511512

512513
switch (this.type) {

0 commit comments

Comments
 (0)