Skip to content

Commit

Permalink
Bump http-proxy dependency (#339)
Browse files Browse the repository at this point in the history
Signed-off-by: James Phillips <jamesdphillips@gmail.com>
  • Loading branch information
jamesdphillips committed Sep 22, 2020
1 parent bdcfd0b commit bbea5c0
Show file tree
Hide file tree
Showing 4 changed files with 203 additions and 2,265 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"hoist-non-react-statics": "^2.5.0",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"http-proxy-middleware": "^0.18.0",
"http-proxy-middleware": "^1.0.5",
"intl": "^1.2.5",
"intl-relativeformat": "^2.1.0",
"jest-circus": "^24.8.0",
Expand Down Expand Up @@ -216,7 +216,7 @@
"graphql": "14.4.2",
"graphql-config/**/graphql": "14.4.2",
"graphql-import/**/graphql": "14.4.2",
"serialize-javascript": "2.1.2"
"serialize-javascript": "3.1.0"
},
"graphQLSchemaRef": "0655e33"
}
4 changes: 2 additions & 2 deletions scripts/serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import historyFallback from "connect-history-api-fallback";
import killable from "killable";
import express from "express";
import compression from "compression";
import proxy from "http-proxy-middleware";
import { createProxyMiddleware } from "http-proxy-middleware";
import devMiddlware from "webpack-dev-middleware";
import webpack from "webpack";

Expand All @@ -22,7 +22,7 @@ const app = express();
app.use(compression());

app.use(
proxy(proxyPaths, {
createProxyMiddleware(proxyPaths, {
target: apiUrl,
logLevel: process.env.NODE_ENV === "development" ? "silent" : "info",
}),
Expand Down
6 changes: 4 additions & 2 deletions src/lib/component/partial/ContextSwitcher/ContextSwitcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,17 @@ const ContextSwitcher = (
return namespaces.sort((a, b) => (a.name > b.name ? 1 : -1));
}

const fuse = new Fuse<Namespace>(namespaces, {
const fuse = new Fuse<Namespace, Fuse.FuseOptions<Namespace>>(namespaces, {
keys: ["name"],
shouldSort: true,
threshold: 0.5,
tokenize: true,
tokenSeparator: /[ -]+/i,
distance: 32,
includeScore: false,
includeMatches: false,
});
return fuse.search(filterValue.slice(0, 12));
return fuse.search(filterValue.slice(0, 12)) as Namespace[];
}, [namespaces, filterValue]);

useEffect(() => {
Expand Down
Loading

0 comments on commit bbea5c0

Please sign in to comment.