Update npm deps for v2.39 and fix the script called to do it (#11332)

* fix the way to get the list of workspaces

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

* update UI dependencies

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>

Signed-off-by: Augustin Husson <husson.augustin@gmail.com>
This commit is contained in:
Augustin Husson 2022-09-21 23:36:28 +02:00 committed by GitHub
parent c1b669bf9b
commit f67f87c82b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 436 additions and 416 deletions

View file

@ -1,15 +1,21 @@
#!/bin/bash
set -e
current=$(pwd)
root_ui_folder=${current}/web/ui
function ncu() {
target=$1
npx npm-check-updates -u --target "${target}"
}
cd web/ui
for workspace in $(npm ls --production --depth 1 -json | jq -r '.dependencies[].resolved[8:]'); do
cd "${root_ui_folder}"
for workspace in $(jq -r '.workspaces[]' < package.json); do
cd "${workspace}"
ncu "$1"
cd ../
cd "${root_ui_folder}"
done
ncu "$1"

View file

@ -33,25 +33,25 @@
"lru-cache": "^6.0.0"
},
"devDependencies": {
"@codemirror/autocomplete": "^6.0.0",
"@codemirror/language": "^6.0.0",
"@codemirror/autocomplete": "^6.2.0",
"@codemirror/language": "^6.2.1",
"@codemirror/lint": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.0.0",
"@lezer/common": "^1.0.0",
"@lezer/lr": "^1.0.0",
"@lezer/highlight": "^1.0.0",
"@codemirror/state": "^6.1.1",
"@codemirror/view": "^6.2.4",
"@lezer/common": "^1.0.1",
"@lezer/lr": "^1.2.3",
"@lezer/highlight": "^1.1.0",
"@types/lru-cache": "^5.1.1",
"isomorphic-fetch": "^3.0.0",
"nock": "^13.2.4"
"nock": "^13.2.9"
},
"peerDependencies": {
"@codemirror/autocomplete": "^6.0.0",
"@codemirror/language": "^6.0.0",
"@codemirror/autocomplete": "^6.2.0",
"@codemirror/language": "^6.2.1",
"@codemirror/lint": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.0.0",
"@lezer/common": "^1.0.0"
"@codemirror/state": "^6.1.1",
"@codemirror/view": "^6.2.4",
"@lezer/common": "^1.0.1"
},
"prettier": {
"singleQuote": true,

View file

@ -30,12 +30,12 @@
"test": "NODE_OPTIONS=--experimental-vm-modules jest"
},
"devDependencies": {
"@lezer/generator": "^1.0.0",
"@lezer/lr": "^1.0.0",
"@lezer/highlight": "^1.0.0"
"@lezer/generator": "^1.1.1",
"@lezer/lr": "^1.2.3",
"@lezer/highlight": "^1.1.0"
},
"peerDependencies": {
"@lezer/lr": "^1.0.0",
"@lezer/highlight": "^1.0.0"
"@lezer/lr": "^1.2.3",
"@lezer/highlight": "^1.1.0"
}
}

708
web/ui/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -16,16 +16,16 @@
"npm": ">=7.0.0"
},
"devDependencies": {
"@types/jest": "^27.4.1",
"@types/node": "^17.0.23",
"@types/jest": "^27.5.2",
"@types/node": "^17.0.45",
"eslint-config-prettier": "^8.5.0",
"eslint-config-react-app": "^7.0.0",
"eslint-plugin-prettier": "^4.0.0",
"jest-canvas-mock": "^2.3.1",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-prettier": "^4.2.1",
"jest-canvas-mock": "^2.4.0",
"jest-fetch-mock": "^3.0.3",
"react-scripts": "^5.0.0",
"prettier": "^2.6.1",
"ts-jest": "^27.1.4",
"typescript": "^4.6.3"
"react-scripts": "^5.0.1",
"prettier": "^2.7.1",
"ts-jest": "^27.1.5",
"typescript": "^4.8.3"
}
}

View file

@ -3,44 +3,44 @@
"version": "0.38.0",
"private": true,
"dependencies": {
"@codemirror/autocomplete": "^6.0.0",
"@codemirror/commands": "^6.0.0",
"@codemirror/language": "^6.0.0",
"@codemirror/autocomplete": "^6.2.0",
"@codemirror/commands": "^6.1.0",
"@codemirror/language": "^6.2.1",
"@codemirror/lint": "^6.0.0",
"@codemirror/search": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.0.0",
"@forevolve/bootstrap-dark": "^1.0.0",
"@codemirror/search": "^6.2.0",
"@codemirror/state": "^6.1.1",
"@codemirror/view": "^6.2.4",
"@forevolve/bootstrap-dark": "^1.1.0",
"@fortawesome/fontawesome-svg-core": "6.1.1",
"@fortawesome/free-solid-svg-icons": "6.1.1",
"@fortawesome/react-fontawesome": "0.1.17",
"@lezer/lr": "^1.0.0",
"@lezer/highlight": "^1.0.0",
"@lezer/common": "^1.0.0",
"@nexucis/fuzzy": "^0.4.0",
"@nexucis/kvsearch": "^0.7.0",
"@lezer/lr": "^1.2.3",
"@lezer/highlight": "^1.1.0",
"@lezer/common": "^1.0.1",
"@nexucis/fuzzy": "^0.4.1",
"@nexucis/kvsearch": "^0.8.1",
"@prometheus-io/codemirror-promql": "^0.38.0",
"bootstrap": "^4.6.1",
"bootstrap": "^4.6.2",
"css.escape": "^1.5.1",
"downshift": "^6.1.7",
"downshift": "^6.1.11",
"http-proxy-middleware": "^2.0.6",
"jquery": "^3.5.1",
"jquery": "^3.6.1",
"jquery.flot.tooltip": "^0.9.0",
"moment": "^2.29.2",
"moment-timezone": "^0.5.34",
"moment": "^2.29.4",
"moment-timezone": "^0.5.37",
"popper.js": "^1.14.3",
"react": "^17.0.2",
"react-copy-to-clipboard": "^5.0.4",
"react-copy-to-clipboard": "^5.1.0",
"react-dom": "^17.0.2",
"react-infinite-scroll-component": "^6.1.0",
"react-resize-detector": "^6.7.6",
"react-router-dom": "^5.2.1",
"react-resize-detector": "^6.7.8",
"react-router-dom": "^5.3.3",
"react-test-renderer": "^17.0.2",
"reactstrap": "^8.9.0",
"sanitize-html": "^2.6.0",
"sass": "1.49.11",
"tempusdominus-bootstrap-4": "^5.1.2",
"tempusdominus-core": "^5.0.3"
"reactstrap": "^8.10.1",
"sanitize-html": "^2.7.2",
"sass": "1.54.9",
"tempusdominus-bootstrap-4": "^5.39.2",
"tempusdominus-core": "^5.19.3"
},
"scripts": {
"start": "react-scripts start",
@ -65,22 +65,22 @@
"not op_mini all"
],
"devDependencies": {
"@testing-library/react-hooks": "^7.0.1",
"@types/enzyme": "^3.10.10",
"@testing-library/react-hooks": "^7.0.2",
"@types/enzyme": "^3.10.12",
"@types/flot": "0.0.32",
"@types/jquery": "^3.5.9",
"@types/react": "^17.0.39",
"@types/react-copy-to-clipboard": "^5.0.2",
"@types/react-dom": "^17.0.11",
"@types/jquery": "^3.5.14",
"@types/react": "^17.0.50",
"@types/react-copy-to-clipboard": "^5.0.4",
"@types/react-dom": "^17.0.17",
"@types/react-resize-detector": "^6.1.0",
"@types/react-router-dom": "^5.3.2",
"@types/sanitize-html": "^2.6.1",
"@types/sinon": "^10.0.6",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.6",
"@types/react-router-dom": "^5.3.3",
"@types/sanitize-html": "^2.6.2",
"@types/sinon": "^10.0.13",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
"enzyme": "^3.11.0",
"enzyme-to-json": "^3.6.2",
"mutationobserver-shim": "^0.3.7",
"sinon": "^13.0.1"
"sinon": "^13.0.2"
},
"jest": {
"snapshotSerializers": [

View file

@ -250,15 +250,15 @@ export const setQuerySearchFilter = (search: string) => {
export const getQuerySearchFilter = (): string => {
const locationSearch = window.location.search;
const params = new URLSearchParams(locationSearch);
const search = params.get('search') || '';
return search;
return params.get('search') || '';
};
export const createExpressionLink = (expr: string): string => {
return `../graph?g0.expr=${encodeURIComponent(expr)}&g0.tab=1&g0.stacked=0&g0.show_exemplars=0.g0.range_input=1h.`;
};
export const mapObjEntries = <T, key extends keyof T, Z>(
// eslint-disable-next-line @typescript-eslint/no-explicit-any,
export const mapObjEntries = <T extends { [s: string]: any }, key extends keyof T, Z>(
o: T,
cb: ([k, v]: [string, T[key]], i: number, arr: [string, T[key]][]) => Z
): Z[] => Object.entries(o).map(cb);