pl-fe: remove unusued dependency

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-09-27 23:15:01 +02:00
parent 270e2df9d0
commit 9e972c5c22
3 changed files with 1 additions and 29 deletions

View file

@ -91,7 +91,6 @@
"fuzzysort": "^3.0.0",
"graphemesplit": "^2.4.4",
"html-react-parser": "^5.0.0",
"http-link-header": "^1.0.2",
"immer": "^10.1.1",
"immutable": "^4.3.7",
"intersection-observer": "^0.12.2",
@ -165,7 +164,6 @@
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.5.1",
"@types/escape-html": "^1.0.1",
"@types/http-link-header": "^1.0.3",
"@types/leaflet": "^1.8.0",
"@types/lodash": "^4.17.9",
"@types/object-assign": "^4.0.30",

View file

@ -1,5 +1,4 @@
// import MockAdapter from 'axios-mock-adapter';
import LinkHeader from 'http-link-header';
import { vi } from 'vitest';
const api = await vi.importActual('../index') as Record<string, Function>;
@ -15,19 +14,6 @@ const __clear = (): Function[] => mocks = [];
const staticClient = api.staticClient;
const getLinks = (response: Response): LinkHeader =>
new LinkHeader(response.headers?.get('link') || undefined);
const getNextLink = (response: Response) => {
const nextLink = new LinkHeader(response.headers?.get('link') || undefined);
return nextLink.refs.find(link => link.rel === 'next')?.uri;
};
const getPrevLink = (response: Response) => {
const prevLink = new LinkHeader(response.headers?.get('link') || undefined);
return prevLink.refs.find(link => link.rel === 'prev')?.uri;
};
const baseClient = (...params: any[]) => {
const axios = api.baseClient(...params);
// setupMock(axios);
@ -40,4 +26,4 @@ export default (...params: any[]) => {
return axios;
};
export { __stub, __clear, staticClient, getLinks, getNextLink, getPrevLink, baseClient };
export { __stub, __clear, staticClient, baseClient };

View file

@ -2808,13 +2808,6 @@
resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812"
integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ==
"@types/http-link-header@^1.0.3":
version "1.0.3"
resolved "https://registry.yarnpkg.com/@types/http-link-header/-/http-link-header-1.0.3.tgz#899adf1d8d2036074514f3dbd148fb901ceff920"
integrity sha512-y8HkoD/vyid+5MrJ3aas0FvU3/BVBGcyG9kgxL0Zn4JwstA8CglFPnrR0RuzOjRCXwqzL5uxWC2IO7Ub0rMU2A==
dependencies:
"@types/node" "*"
"@types/json-schema@*", "@types/json-schema@^7.0.12", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9":
version "7.0.13"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85"
@ -7012,11 +7005,6 @@ http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3:
setprototypeof "1.1.0"
statuses ">= 1.4.0 < 2"
http-link-header@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/http-link-header/-/http-link-header-1.0.3.tgz#abbc2cdc5e06dd7e196a4983adac08a2d085ec90"
integrity sha512-nARK1wSKoBBrtcoESlHBx36c1Ln/gnbNQi1eB6MeTUefJIT3NvUOsV15bClga0k38f0q/kN5xxrGSDS3EFnm9w==
http-link-header@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/http-link-header/-/http-link-header-1.1.3.tgz#b367b7a0ad1cf14027953f31aa1df40bb433da2a"