Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update deps #419

Merged
merged 4 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,944 changes: 1,897 additions & 5,047 deletions package-lock.json

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"check:spelling": "cspell --cache --no-progress '**/*'",
"testonly": "npm run build:demo && npm pack && docker compose up --abort-on-container-exit --build test",
"declarations": "tsc --emitDeclarationOnly -p tsconfig.lib.json",
"update-snapshots": "docker compose up --build update-snapshots"
"update-snapshots": "npm run build:demo && npm pack && docker compose up --build update-snapshots"
},
"peerDependencies": {
"graphql": ">=16.5.0",
Expand All @@ -46,46 +46,46 @@
"dependencies": {
"@emotion/react": "11.13.3",
"@emotion/styled": "11.13.0",
"@mui/icons-material": "5.16.7",
"@mui/icons-material": "6.1.1",
"@mui/lab": "5.0.0-alpha.169",
"@mui/material": "5.16.7",
"commonmark": "0.30.0",
"@mui/material": "6.1.1",
"commonmark": "0.31.2",
"svg-pan-zoom": "3.6.1"
},
"devDependencies": {
"@playwright/test": "1.32.0",
"@svgr/webpack": "6.5.1",
"@types/commonmark": "0.27.5",
"@types/node": "20.4.8",
"@types/react": "18.3.8",
"@playwright/test": "1.47.2",
"@svgr/webpack": "8.1.0",
"@types/commonmark": "0.27.9",
"@types/node": "22.7.4",
"@types/react": "18.3.10",
"@types/react-dom": "18.3.0",
"@types/webpack-node-externals": "3.0.0",
"@typescript-eslint/eslint-plugin": "7.8.0",
"@typescript-eslint/parser": "7.8.0",
"@types/webpack-node-externals": "3.0.4",
"@typescript-eslint/eslint-plugin": "8.7.0",
"@typescript-eslint/parser": "8.7.0",
"cspell": "6.2.3",
"css-loader": "6.7.1",
"eslint": "8.57.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-playwright": "1.6.0",
"eslint-plugin-react": "7.34.1",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-simple-import-sort": "12.1.0",
"graphql": "16.5.0",
"mini-css-extract-plugin": "2.6.0",
"css-loader": "7.1.2",
"eslint": "8.57.1",
"eslint-plugin-import": "2.30.0",
"eslint-plugin-playwright": "1.6.2",
"eslint-plugin-react": "7.37.0",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-simple-import-sort": "12.1.1",
"graphql": "16.9.0",
"mini-css-extract-plugin": "2.9.1",
"postcss-cssnext": "3.1.1",
"postcss-import": "12.0.1",
"postcss-loader": "3.0.0",
"postcss-import": "16.1.0",
"postcss-loader": "8.1.1",
"postcss-variables-loader": "6.0.0",
"prettier": "3.0.1",
"prettier": "3.3.3",
"raw-loader": "4.0.2",
"react": "18.3.1",
"react-dom": "18.3.1",
"style-loader": "0.23.1",
"style-loader": "4.0.0",
"svg-as-symbol-loader": "1.2.4",
"ts-loader": "5.3.3",
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
"typescript": "4.9.5",
"webpack": "5.94.0",
"typescript": "5.5.4",
"webpack": "5.95.0",
"webpack-cli": "5.1.4",
"webpack-dev-server": "5.1.0",
"webpack-node-externals": "3.0.0"
Expand Down
4 changes: 2 additions & 2 deletions src/components/IntrospectionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import Button from '@mui/material/Button';
import Dialog from '@mui/material/Dialog';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import Grid from '@mui/material/Grid2';
import Stack from '@mui/material/Stack';
import Tab from '@mui/material/Tab';
import TextField from '@mui/material/TextField';
import Tooltip from '@mui/material/Tooltip';
import Typography from '@mui/material/Typography';
import Grid from '@mui/material/Unstable_Grid2';
import { buildClientSchema } from 'graphql/utilities';
import { useState } from 'react';

Expand Down Expand Up @@ -179,7 +179,7 @@ function PresetsTab(props: PresetsTabProps) {
return (
<Grid container spacing={4}>
{presetNames.map((name) => (
<Grid xs={12} sm={6} key={name}>
<Grid size={{ xs: 12, sm: 6 }} key={name}>
<Button
fullWidth
variant="outlined"
Expand Down
13 changes: 6 additions & 7 deletions src/graph/graphviz-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class VizWorker {
maxSize: 10,
});
private _worker: Worker;
private _listeners: Array<(result: RenderResult) => void> = [];
private _listeners: Map<number, (result: RenderResult) => void> = new Map();

constructor() {
const blob = new Blob([VizWorkerSource], {
Expand All @@ -28,8 +28,8 @@ export class VizWorker {
this._worker.addEventListener('message', (event) => {
const { id, result } = event.data as RenderResponse;

this._listeners[id](result);
delete this._listeners[id];
this._listeners.get(id)?.(result);
this._listeners.delete(id);
});
}

Expand Down Expand Up @@ -67,9 +67,9 @@ export class VizWorker {

_renderString(src: string): Promise<string> {
return new Promise((resolve, reject) => {
const id = this._listeners.length;
const id = this._listeners.size;

this._listeners.push(function (result): void {
this._listeners.set(id, function (result): void {
if ('error' in result) {
const { error } = result;
const e = new Error(error.message);
Expand All @@ -94,7 +94,6 @@ async function decompressFromDataURL(dataURL: string): Promise<string> {
const blob = await response.blob();
switch (blob.type) {
case 'application/gzip': {
// @ts-expect-error DecompressionStream is missing from DOM types
const stream = blob.stream().pipeThrough(new DecompressionStream('gzip'));
const decompressedBlob = await streamToBlob(stream, 'text/plain');
return decompressedBlob.text();
Expand All @@ -109,7 +108,6 @@ async function decompressFromDataURL(dataURL: string): Promise<string> {
async function compressToDataURL(str: string): Promise<string> {
try {
const blob = new Blob([str], { type: 'text/plain' });
// @ts-expect-error CompressionStream is missing from DOM types
const stream = blob.stream().pipeThrough(new CompressionStream('gzip'));
const compressedBlob = await streamToBlob(stream, 'application/gzip');
return blobToDataURL(compressedBlob);
Expand All @@ -131,6 +129,7 @@ function blobToDataURL(blob: Blob): Promise<string> {
};
fileReader.readAsDataURL(blob);
} catch (err) {
// eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors
reject(err);
}
});
Expand Down
4 changes: 4 additions & 0 deletions src/graph/svg-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ export async function renderSvg(typeGraph: TypeGraph) {
return svg;
}

// eslint-disable-next-line @typescript-eslint/no-require-imports
const RelayIconSvg = require('!!svg-as-symbol-loader?id=RelayIcon!../components/icons/relay-icon.svg');
// eslint-disable-next-line @typescript-eslint/no-require-imports
const DeprecatedIconSvg = require('!!svg-as-symbol-loader?id=DeprecatedIcon!../components/icons/deprecated-icon.svg');

const svgNS = 'http://www.w3.org/2000/svg';
const xlinkNS = 'http://www.w3.org/1999/xlink';

function preprocessVizSVG(svgString: string) {
//Add Relay and Deprecated icons
// eslint-disable-next-line @typescript-eslint/no-base-to-string
svgString = svgString.replace(/<svg [^>]*>/, '$&' + RelayIconSvg);
svgString = svgString.replace(/<svg [^>]*>/, '$&' + DeprecatedIconSvg);

Expand Down
2 changes: 1 addition & 1 deletion src/graph/viewport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class Viewport {
this.resizeObserver.disconnect();
try {
this.zoomer.destroy();
} catch (e) {
} catch {
// skip
}
}
Expand Down
1 change: 1 addition & 0 deletions src/middleware/hapi.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import renderVoyagerPage, { MiddlewareOptions } from './render-voyager-page';

// eslint-disable-next-line @typescript-eslint/no-require-imports
const pkg = require('../package.json');

const hapi = {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/is-match.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function isMatch(sourceText: string, searchValue: string | null) {
try {
const escaped = searchValue.replace(/[^_0-9A-Za-z]/g, (ch) => '\\' + ch);
return sourceText.search(new RegExp(escaped, 'i')) !== -1;
} catch (e) {
} catch {
return sourceText.toLowerCase().includes(searchValue.toLowerCase());
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/demo.spec.ts-snapshots/choose-yelp-preset-Demo-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/demo.spec.ts-snapshots/demo-after-resize-Demo-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/demo.spec.ts-snapshots/demo-before-resize-Demo-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/demo.spec.ts-snapshots/display-sdl-Demo-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/demo.spec.ts-snapshots/fill-introspection-Demo-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/demo.spec.ts-snapshots/loaded-demo-Demo-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/demo.spec.ts-snapshots/show-github-preset-Demo-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/demo.spec.ts-snapshots/show-yelp-preset-Demo-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import * as MiniCssExtractPlugin from 'mini-css-extract-plugin';
import * as webpack from 'webpack';
import * as NodeExternals from 'webpack-node-externals';

// eslint-disable-next-line @typescript-eslint/no-require-imports
const packageJSON = require('./package.json');
const BANNER = `GraphQL Voyager - Represent any GraphQL API as an interactive graph
-------------------------------------------------------------
Expand Down
Loading