Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
axelboc committed Oct 27, 2022
1 parent b335eb5 commit df9906f
Show file tree
Hide file tree
Showing 11 changed files with 1,960 additions and 2,162 deletions.
15 changes: 5 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,16 @@ pnpm start
1. Read the changelogs and release notes of the dependencies you'd like to
upgrade. Look for potential breaking changes, and for bug fixes and new
features that may help improve the codebase.
1. Run `pnpm up -rL <pkg-name>` to update a dependency to the latest version in
1. Run `pnpm up -rL <pkg-name>` to upgrade a dependency to the latest version in
all projects. Alternatively, you can either replace `-r` with `--filter` to
target specific projects, or edit the relevant `package.json` file(s)
manually and run `pnpm install` (but make sure to specify an exact dependency
version rather than a range - i.e. don't prefix the version with a caret or a
tilde).

Beware of the following versioning requirements:

- The major version number of `@types/node` must match the version of Node
specified in the `engine` field of `package.json`.
- The major version numbers of
[DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) packages
must match the major version numbers of their corresponding dependencies (e.g.
`@types/jest@27` for `jest@27`).
1. Run `pnpm up -r @types/node @types/react @types/react-dom @types/jest` to
upgrade [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped)
packages that must remain in sync with the major versions of the libraries
they provide types for.

Note that `pnpm` offers multiple solutions for dealing with peer dependency
version conflicts and other package resolution issues:
Expand Down
24 changes: 12 additions & 12 deletions apps/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@
"dependencies": {
"@h5web/app": "workspace:*",
"@h5web/h5wasm": "workspace:*",
"axios": "0.27.2",
"axios-hooks": "3.1.5",
"axios": "1.1.3",
"axios-hooks": "4.0.0",
"normalize.css": "8.0.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-dropzone": "14.2.2",
"react-icons": "4.4.0",
"react-dropzone": "14.2.3",
"react-icons": "4.6.0",
"react-router-dom": "6.3.0"
},
"devDependencies": {
"@types/node": "16.11.7",
"@types/react": "17.0.39",
"@types/react-dom": "17.0.11",
"@types/node": "^16.18.2",
"@types/react": "^17.0.51",
"@types/react-dom": "^17.0.17",
"@types/react-router-dom": "5.3.3",
"@vitejs/plugin-react": "2.1.0",
"eslint": "8.23.1",
"eslint-config-galex": "4.2.2",
"typescript": "4.8.3",
"vite": "3.1.3",
"@vitejs/plugin-react": "2.2.0",
"eslint": "8.25.0",
"eslint-config-galex": "4.3.1",
"typescript": "4.8.4",
"vite": "3.2.0",
"vite-plugin-checker": "0.5.1",
"vite-plugin-eslint": "1.8.1"
}
Expand Down
30 changes: 15 additions & 15 deletions apps/storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,30 @@
"normalize.css": "8.0.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-icons": "4.4.0",
"react-icons": "4.6.0",
"react-suspense-fetch": "0.4.1",
"three": "0.141.0"
},
"devDependencies": {
"@babel/core": "7.18.5",
"@storybook/addon-docs": "6.5.12",
"@storybook/addon-essentials": "6.5.12",
"@storybook/addon-links": "6.5.12",
"@storybook/builder-webpack5": "6.5.12",
"@storybook/manager-webpack5": "6.5.12",
"@storybook/react": "6.5.12",
"@babel/core": "7.19.6",
"@storybook/addon-docs": "6.5.13",
"@storybook/addon-essentials": "6.5.13",
"@storybook/addon-links": "6.5.13",
"@storybook/builder-webpack5": "6.5.13",
"@storybook/manager-webpack5": "6.5.13",
"@storybook/react": "6.5.13",
"@types/d3-format": "3.0.1",
"@types/lodash": "4.14.185",
"@types/lodash": "4.14.186",
"@types/ndarray": "1.0.11",
"@types/node": "16.11.7",
"@types/react": "17.0.39",
"@types/react-dom": "17.0.11",
"@types/node": "^16.18.2",
"@types/react": "^17.0.51",
"@types/react-dom": "^17.0.17",
"@types/three": "0.141.0",
"babel-loader": "8.2.5",
"eslint": "8.23.1",
"eslint-config-galex": "4.2.2",
"eslint": "8.25.0",
"eslint-config-galex": "4.3.1",
"storybook-css-modules-preset": "1.1.1",
"typescript": "4.8.3",
"typescript": "4.8.4",
"webpack": "5.74.0"
},
"browserslist": {
Expand Down
3 changes: 3 additions & 0 deletions eslint.shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ module.exports = {

// DOM dataset API is confusing since we deal with HDF5 datasets
'unicorn/prefer-dom-node-dataset': 'off',

// The point of `switch` is to be less verbose than if/else if/else
'unicorn/switch-case-braces': ['warn', 'avoid'],
},
overrides: [
createReactOverride({
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@
"devDependencies": {
"@testing-library/cypress": "8.0.3",
"@types/cypress-image-snapshot": "3.1.6",
"@types/jest": "27.5.1",
"@types/node": "16.11.7",
"@types/jest": "^27.5.2",
"@types/node": "^16.18.2",
"cypress": "9.5.0",
"cypress-image-snapshot": "4.0.1",
"cypress-wait-for-stable-dom": "0.1.0",
"eslint": "8.23.1",
"eslint-config-galex": "4.2.2",
"eslint": "8.25.0",
"eslint-config-galex": "4.3.1",
"identity-obj-proxy": "3.0.0",
"jest": "27.5.1",
"jest-transform-stub": "2.0.0",
"npm-run-all": "4.1.5",
"prettier": "2.7.1",
"ts-jest": "27.1.3",
"typescript": "4.8.3"
"typescript": "4.8.4"
},
"pnpm": {
"overrides": {
Expand Down
28 changes: 14 additions & 14 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,45 +44,45 @@
"@h5web/lib": "workspace:*",
"@react-hookz/web": "14.2.2",
"@react-three/fiber": "7.0.26",
"axios": "0.27.2",
"axios": "1.1.3",
"d3-format": "3.1.0",
"lodash": "4.17.21",
"ndarray": "1.0.19",
"ndarray-ops": "1.2.2",
"react-error-boundary": "3.1.4",
"react-icons": "4.4.0",
"react-icons": "4.6.0",
"react-reflex": "4.0.9",
"react-slider": "2.0.4",
"react-suspense-fetch": "0.4.1",
"react-use": "17.4.0",
"three": "0.141.0",
"zustand": "4.1.1"
"zustand": "4.1.3"
},
"devDependencies": {
"@h5web/shared": "workspace:*",
"@rollup/plugin-alias": "3.1.9",
"@rollup/plugin-alias": "4.0.2",
"@testing-library/dom": "8.13.0",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "12.1.5",
"@testing-library/user-event": "14.2.0",
"@types/d3-format": "3.0.1",
"@types/lodash": "4.14.185",
"@types/lodash": "4.14.186",
"@types/ndarray": "1.0.11",
"@types/node": "16.11.7",
"@types/react": "17.0.39",
"@types/react-dom": "17.0.11",
"@types/node": "^16.18.2",
"@types/react": "^17.0.51",
"@types/react-dom": "^17.0.17",
"@types/react-slider": "1.3.1",
"@types/testing-library__jest-dom": "5.14.5",
"concat": "1.0.3",
"eslint": "8.23.1",
"eslint-config-galex": "4.2.2",
"eslint": "8.25.0",
"eslint-config-galex": "4.3.1",
"jest": "27.5.1",
"npm-run-all": "4.1.5",
"react": "17.0.2",
"react-dom": "17.0.2",
"rollup": "2.79.1",
"rollup-plugin-dts": "4.2.2",
"typescript": "4.8.3",
"vite": "3.1.3"
"rollup": "3.2.3",
"rollup-plugin-dts": "5.0.0",
"typescript": "4.8.4",
"vite": "3.2.0"
}
}
11 changes: 6 additions & 5 deletions packages/app/src/providers/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import type {
} from '@h5web/shared';
import type {
AxiosInstance,
AxiosProgressEvent,
AxiosRequestConfig,
AxiosResponse,
CancelTokenSource,
Expand Down Expand Up @@ -81,12 +82,12 @@ export abstract class DataProviderApi {
this.valueRequests.clear();
}

protected async cancellableFetchValue<T>(
protected async cancellableFetchValue<T, R = AxiosResponse<T>>(
endpoint: string,
storeParams: ValuesStoreParams,
queryParams: Record<string, string | boolean | undefined>,
responseType?: ResponseType
): Promise<AxiosResponse<T>> {
): Promise<R> {
const cancelSource = axios.CancelToken.source();
const request = { storeParams, cancelSource };
this.valueRequests.add(request);
Expand All @@ -96,12 +97,12 @@ export abstract class DataProviderApi {

try {
const { token: cancelToken } = cancelSource;
return await this.client.get<T>(endpoint, {
return await this.client.get<T, R>(endpoint, {
cancelToken,
params: queryParams,
responseType,
onDownloadProgress: (evt: ProgressEvent) => {
if (evt.lengthComputable) {
onDownloadProgress: (evt: AxiosProgressEvent) => {
if (evt.total !== undefined && evt.total > 0) {
this.progress.set(storeParams, evt.loaded / evt.total);
this.notifyProgressChange();
}
Expand Down
18 changes: 9 additions & 9 deletions packages/h5wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@
"devDependencies": {
"@h5web/app": "workspace:*",
"@h5web/shared": "workspace:*",
"@rollup/plugin-alias": "3.1.9",
"@types/node": "16.11.7",
"@types/react": "17.0.39",
"eslint": "8.23.1",
"eslint-config-galex": "4.2.2",
"@rollup/plugin-alias": "4.0.2",
"@types/node": "^16.18.2",
"@types/react": "^17.0.51",
"eslint": "8.25.0",
"eslint-config-galex": "4.3.1",
"react": "17.0.2",
"rollup": "2.79.1",
"rollup-plugin-dts": "4.2.2",
"typescript": "4.8.3",
"vite": "3.1.3"
"rollup": "3.2.3",
"rollup-plugin-dts": "5.0.0",
"typescript": "4.8.4",
"vite": "3.2.0"
}
}
30 changes: 15 additions & 15 deletions packages/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
},
"dependencies": {
"@react-hookz/web": "14.2.2",
"@visx/axis": "2.12.2",
"@visx/axis": "2.14.0",
"@visx/grid": "2.12.2",
"@visx/scale": "2.2.2",
"@visx/shape": "2.12.2",
"@visx/tooltip": "2.10.0",
"@visx/tooltip": "2.16.0",
"d3-array": "3.2.0",
"d3-color": "3.1.0",
"d3-format": "3.1.0",
Expand All @@ -59,45 +59,45 @@
"ndarray": "1.0.19",
"ndarray-ops": "1.2.2",
"react-aria-menubutton": "7.0.3",
"react-icons": "4.4.0",
"react-icons": "4.6.0",
"react-keyed-flatten-children": "1.3.0",
"react-measure": "2.5.2",
"react-slider": "2.0.4",
"react-use": "17.4.0",
"react-window": "1.8.7",
"zustand": "4.1.1"
"zustand": "4.1.3"
},
"devDependencies": {
"@h5web/shared": "workspace:*",
"@react-three/fiber": "7.0.26",
"@rollup/plugin-alias": "3.1.9",
"@rollup/plugin-alias": "4.0.2",
"@types/d3-array": "3.0.3",
"@types/d3-color": "3.1.0",
"@types/d3-format": "3.0.1",
"@types/d3-interpolate": "3.0.1",
"@types/d3-scale": "4.0.2",
"@types/d3-scale-chromatic": "3.0.0",
"@types/lodash": "4.14.185",
"@types/lodash": "4.14.186",
"@types/ndarray": "1.0.11",
"@types/node": "16.11.7",
"@types/react": "17.0.39",
"@types/node": "^16.18.2",
"@types/react": "^17.0.51",
"@types/react-aria-menubutton": "6.2.9",
"@types/react-dom": "17.0.11",
"@types/react-dom": "^17.0.17",
"@types/react-measure": "2.0.8",
"@types/react-slider": "1.3.1",
"@types/react-window": "1.8.5",
"@types/three": "0.141.0",
"concat": "1.0.3",
"eslint": "8.23.1",
"eslint-config-galex": "4.2.2",
"eslint": "8.25.0",
"eslint-config-galex": "4.3.1",
"jest": "27.5.1",
"npm-run-all": "4.1.5",
"react": "17.0.2",
"react-dom": "17.0.2",
"rollup": "2.79.1",
"rollup-plugin-dts": "4.2.2",
"rollup": "3.2.3",
"rollup-plugin-dts": "5.0.0",
"three": "0.141.0",
"typescript": "4.8.3",
"vite": "3.1.3"
"typescript": "4.8.4",
"vite": "3.2.0"
}
}
12 changes: 6 additions & 6 deletions packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@
},
"devDependencies": {
"@types/d3-format": "3.0.1",
"@types/lodash": "4.14.185",
"@types/lodash": "4.14.186",
"@types/ndarray": "1.0.11",
"@types/ndarray-ops": "1.2.4",
"@types/node": "16.11.7",
"@types/react": "17.0.39",
"@types/node": "^16.18.2",
"@types/react": "^17.0.51",
"d3-format": "3.1.0",
"eslint": "8.23.1",
"eslint-config-galex": "4.2.2",
"eslint": "8.25.0",
"eslint-config-galex": "4.3.1",
"jest": "27.5.1",
"lodash": "4.17.21",
"ndarray": "1.0.19",
"ndarray-ops": "1.2.2",
"react": "17.0.2",
"typescript": "4.8.3"
"typescript": "4.8.4"
}
}

0 comments on commit df9906f

Please sign in to comment.