Fix tests and npm update

This commit is contained in:
IRBorisov 2024-06-03 00:31:21 +03:00
parent dc0555076b
commit f4c2731b72
6 changed files with 66 additions and 65 deletions

View File

@ -8,7 +8,7 @@
"name": "frontend",
"version": "1.0.0",
"dependencies": {
"@lezer/lr": "^1.4.0",
"@lezer/lr": "^1.4.1",
"@tanstack/react-table": "^8.17.3",
"@uiw/codemirror-themes": "^4.22.1",
"@uiw/react-codemirror": "^4.22.1",
@ -28,13 +28,13 @@
"react-tabs": "^6.0.2",
"react-toastify": "^9.1.3",
"react-tooltip": "^5.26.4",
"reagraph": "^4.18.1",
"use-debounce": "^10.0.0"
"reagraph": "^4.19.0",
"use-debounce": "^10.0.1"
},
"devDependencies": {
"@lezer/generator": "^1.7.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.12",
"@types/node": "^20.14.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
@ -49,7 +49,7 @@
"jest": "^29.7.0",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"ts-jest": "^29.1.3",
"ts-jest": "^29.1.4",
"typescript": "^5.4.5",
"vite": "^4.5.3"
}
@ -649,9 +649,9 @@
"license": "MIT"
},
"node_modules/@codemirror/autocomplete": {
"version": "6.16.0",
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.16.0.tgz",
"integrity": "sha512-P/LeCTtZHRTCU4xQsa89vSKWecYv1ZqwzOd5topheGRf+qtacFgBeIMQi3eL8Kt/BUNvxUWkx+5qP2jlGoARrg==",
"version": "6.16.2",
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.16.2.tgz",
"integrity": "sha512-MjfDrHy0gHKlPWsvSsikhO1+BOh+eBHNgfH1OXs1+DAf30IonQldgMM3kxLDTG9ktE7kDLaA1j/l7KMPA4KNfw==",
"license": "MIT",
"dependencies": {
"@codemirror/language": "^6.0.0",
@ -2555,9 +2555,9 @@
}
},
"node_modules/@lezer/lr": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.0.tgz",
"integrity": "sha512-Wst46p51km8gH0ZUmeNrtpRYmdlRHUpN1DQd3GFAyKANi8WVz8c2jHYTf1CVScFaCjQw1iO3ZZdqGDxQPRErTg==",
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.1.tgz",
"integrity": "sha512-CHsKq8DMKBf9b3yXPDIU4DbH+ZJd/sJdYOW2llbW/HudP5u0VS6Bfq1hLYfgU7uAYGFIyGGQIsSOXGPEErZiJw==",
"license": "MIT",
"dependencies": {
"@lezer/common": "^1.0.0"
@ -3019,9 +3019,9 @@
"license": "MIT"
},
"node_modules/@types/node": {
"version": "20.12.12",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz",
"integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==",
"version": "20.14.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.0.tgz",
"integrity": "sha512-5cHBxFGJx6L4s56Bubp4fglrEpmyJypsqI6RgzMfBHWUJQGWAAi8cWcgetEbZXHYXo9C2Fa4EEds/uSyS4cxmA==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -3105,9 +3105,9 @@
"license": "MIT"
},
"node_modules/@types/three": {
"version": "0.164.1",
"resolved": "https://registry.npmjs.org/@types/three/-/three-0.164.1.tgz",
"integrity": "sha512-dR/trWDhyaNqJV38rl1TonlCA9DpnX7OPYDWD81bmBGn/+uEc3+zNalFxQcV4FlPTeDBhCY3SFWKvK6EJwL88g==",
"version": "0.165.0",
"resolved": "https://registry.npmjs.org/@types/three/-/three-0.165.0.tgz",
"integrity": "sha512-AJK8JZAFNBF0kBXiAIl5pggYlzAGGA8geVYQXAcPCEDRbyA+oEjkpUBcJJrtNz6IiALwzGexFJGZG2yV3WsYBw==",
"license": "MIT",
"peer": true,
"dependencies": {
@ -4065,18 +4065,18 @@
}
},
"node_modules/camera-controls": {
"version": "2.8.3",
"resolved": "https://registry.npmjs.org/camera-controls/-/camera-controls-2.8.3.tgz",
"integrity": "sha512-zFjqUR6onLkG+z1A6vAWfzovxZxWVSvp6e5t3lfZgfgPZtX3n74aykNAUaoRbq8Y3tOxadHkDjbfGDOP9hFf2w==",
"version": "2.8.4",
"resolved": "https://registry.npmjs.org/camera-controls/-/camera-controls-2.8.4.tgz",
"integrity": "sha512-pzVKpeZCRXIx2VOMB+E4OPjOhErHqhxrHYxcRLofOVgBeCeKSb8QAC2toc1onMllrxldRWXR8bl4K50hkrtwsg==",
"license": "MIT",
"peerDependencies": {
"three": ">=0.126.1"
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001621",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001621.tgz",
"integrity": "sha512-+NLXZiviFFKX0fk8Piwv3PfLPGtRqJeq2TiNoUff/qB5KJgwecJTvCXDpmlyP/eCI/GUEmp/h/y5j0yckiiZrA==",
"version": "1.0.30001626",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001626.tgz",
"integrity": "sha512-JRW7kAH8PFJzoPCJhLSHgDgKg5348hsQ68aqb+slnzuB5QFERv846oA/mRChmlLAOdEDeOkRn3ynb1gSFnjt3w==",
"funding": [
{
"type": "opencollective",
@ -4687,9 +4687,9 @@
"license": "MIT"
},
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz",
"integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==",
"license": "MIT",
"dependencies": {
"ms": "2.1.2"
@ -4876,9 +4876,9 @@
"license": "MIT"
},
"node_modules/electron-to-chromium": {
"version": "1.4.782",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.782.tgz",
"integrity": "sha512-JUfU61e8tr+i5Y1FKXcKs+Xe+rJ+CEqm4cgv1kMihPE2EvYHmYyVr3Im/+1+Z5B29Be2EEGCZCwAc6Tazdl1Yg==",
"version": "1.4.788",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.788.tgz",
"integrity": "sha512-ubp5+Ev/VV8KuRoWnfP2QF2Bg+O2ZFdb49DiiNbz2VmgkIqrnyYaqIOqj8A6K/3p1xV0QcU5hBQ1+BmB6ot1OA==",
"license": "ISC"
},
"node_modules/ellipsize": {
@ -5763,6 +5763,7 @@
"version": "7.2.3",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
"integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
"deprecated": "Glob versions prior to v9 are no longer supported",
"devOptional": true,
"license": "ISC",
"dependencies": {
@ -8443,9 +8444,9 @@
}
},
"node_modules/meshline": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/meshline/-/meshline-3.3.0.tgz",
"integrity": "sha512-EKKf2TLnfyqUeA7ryWFKgT9HchTMATvECGZnMQjtlcyxK0sB8shVLVkemBUp9dB3tkDEmoqQDLJCPStjkH8D7A==",
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/meshline/-/meshline-3.2.1.tgz",
"integrity": "sha512-/Zrhq1sbQCtqSsrud0hN/U8wOdKKOcxCWefEowZRHsosIcy1p87+2PlWSNO4s9zOoT/zjrQR8YikXYao8XCqVQ==",
"license": "MIT",
"peerDependencies": {
"three": ">=0.137"
@ -9213,9 +9214,9 @@
}
},
"node_modules/postcss-load-config/node_modules/yaml": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz",
"integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==",
"version": "2.4.3",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.3.tgz",
"integrity": "sha512-sntgmxj8o7DE7g/Qi60cqpLBA3HG3STcDA0kO+WfB05jEKhZMbY7umNm2rBpQvsmZ16/lPXCJGW2672dgOUkrg==",
"dev": true,
"license": "ISC",
"bin": {
@ -9755,9 +9756,9 @@
}
},
"node_modules/reagraph": {
"version": "4.18.1",
"resolved": "https://registry.npmjs.org/reagraph/-/reagraph-4.18.1.tgz",
"integrity": "sha512-a6EAQ3nAHQoemF6UQLZ+xaXvROZuqhxCUYiViNPl+dnn/Few8kyrMselpUlyC/QTtfk1XiCsFnz1aCyI0GNFWQ==",
"version": "4.19.0",
"resolved": "https://registry.npmjs.org/reagraph/-/reagraph-4.19.0.tgz",
"integrity": "sha512-hQZjA8coxFS6UjDhlP5Ho/woc36sM1dqsliwvTtThN/1ZoGbAuxt5QntVka4jesh0HhNB3ZafYgCIqXoo2sq8Q==",
"license": "Apache-2.0",
"dependencies": {
"@react-spring/three": "9.6.1",
@ -9896,6 +9897,7 @@
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
"deprecated": "Rimraf versions prior to v4 are no longer supported",
"devOptional": true,
"license": "ISC",
"dependencies": {
@ -10619,18 +10621,18 @@
"license": "MIT"
},
"node_modules/three-mesh-bvh": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/three-mesh-bvh/-/three-mesh-bvh-0.7.4.tgz",
"integrity": "sha512-flxe0A4uflTPR6elgq/Y8VrLoljDNS899i422SxQcU3EtMj6o8z4kZRyqZqGWzR0qMf1InTZzY1/0xZl/rnvVw==",
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/three-mesh-bvh/-/three-mesh-bvh-0.7.5.tgz",
"integrity": "sha512-WDd77RklE52pZSKZx8sDXzrd2JCF/gL/hugFvsIBylpMRlJxxwesKn2rW7TcQZ809NocDVkQx1UJo9pJtVAPYg==",
"license": "MIT",
"peerDependencies": {
"three": ">= 0.151.0"
}
},
"node_modules/three-stdlib": {
"version": "2.30.0",
"resolved": "https://registry.npmjs.org/three-stdlib/-/three-stdlib-2.30.0.tgz",
"integrity": "sha512-ALL7rn57jq/MovDRk5hGjeWCvOeZlZhFCWIdpbBAQNudCO3nMwxEba5ZulsMgiI1ymQMzUzTMcxhLTCVlUaKDw==",
"version": "2.30.3",
"resolved": "https://registry.npmjs.org/three-stdlib/-/three-stdlib-2.30.3.tgz",
"integrity": "sha512-rYr8PqMljMza+Ct8kQk90Y7y+YcWoPu1thfYv5YGCp0hytNRbxSQWXY4GpdTGymCj3bDggEBpxso53C3pPwhIw==",
"license": "MIT",
"dependencies": {
"@types/draco3d": "^1.4.0",
@ -10743,9 +10745,9 @@
"license": "Apache-2.0"
},
"node_modules/ts-jest": {
"version": "29.1.3",
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.3.tgz",
"integrity": "sha512-6L9qz3ginTd1NKhOxmkP0qU3FyKjj5CPoY+anszfVn6Pmv/RIKzhiMCsH7Yb7UvJR9I2A64rm4zQl531s2F1iw==",
"version": "29.1.4",
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.4.tgz",
"integrity": "sha512-YiHwDhSvCiItoAgsKtoLFCuakDzDsJ1DLDnSouTaTmdOcOwIkSzbLXduaQ6M5DRVhuZC/NYaaZ/mtHbWMv/S6Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -10903,9 +10905,9 @@
}
},
"node_modules/use-debounce": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/use-debounce/-/use-debounce-10.0.0.tgz",
"integrity": "sha512-XRjvlvCB46bah9IBXVnq/ACP2lxqXyZj0D9hj4K5OzNroMDpTEBg8Anuh1/UfRTRs7pLhQ+RiNxxwZu9+MVl1A==",
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/use-debounce/-/use-debounce-10.0.1.tgz",
"integrity": "sha512-0uUXjOfm44e6z4LZ/woZvkM8FwV1wiuoB6xnrrOmeAEjRDDzTLQNRFtYHvqUsJdrz1X37j0rVGIVp144GLHGKg==",
"license": "MIT",
"engines": {
"node": ">= 16.0.0"

View File

@ -12,7 +12,7 @@
"preview": "vite preview"
},
"dependencies": {
"@lezer/lr": "^1.4.0",
"@lezer/lr": "^1.4.1",
"@tanstack/react-table": "^8.17.3",
"@uiw/codemirror-themes": "^4.22.1",
"@uiw/react-codemirror": "^4.22.1",
@ -32,13 +32,13 @@
"react-tabs": "^6.0.2",
"react-toastify": "^9.1.3",
"react-tooltip": "^5.26.4",
"reagraph": "^4.18.1",
"use-debounce": "^10.0.0"
"reagraph": "^4.19.0",
"use-debounce": "^10.0.1"
},
"devDependencies": {
"@lezer/generator": "^1.7.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.12",
"@types/node": "^20.14.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^6.21.0",
@ -53,7 +53,7 @@
"jest": "^29.7.0",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.3",
"ts-jest": "^29.1.3",
"ts-jest": "^29.1.4",
"typescript": "^5.4.5",
"vite": "^4.5.3"
},

View File

@ -41,8 +41,7 @@ import {
IUserUpdateData,
IUserUpdatePassword
} from '@/models/user';
import { buildConstants } from '../utils/constants';
import { buildConstants } from '@/utils/buildConstants';
const defaultOptions = {
xsrfCookieName: 'csrftoken',

View File

@ -2,7 +2,7 @@
* Module: Internal navigation constants.
*/
import { buildConstants } from '@/utils/constants';
import { buildConstants } from '@/utils/buildConstants';
/**
* Routes.

View File

@ -0,0 +1,7 @@
/**
* Variable constants depending on build type.
* Extracted as separate file because of bundler issues during tests
*/
export const buildConstants = {
backend: import.meta.env.VITE_PORTAL_BACKEND as string
};

View File

@ -2,13 +2,6 @@
* Module: Global constants.
*/
/**
* Variable constants depending on build type.
*/
export const buildConstants = {
backend: import.meta.env.VITE_PORTAL_BACKEND as string
};
/**
* Global application Parameters. The place where magic numbers are put to rest.
*/