Skip to content

Commit

Permalink
chore(deps): update yarn and easy dependencies (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
nimdanitro authored Aug 20, 2024
1 parent 098f3b1 commit b127a15
Show file tree
Hide file tree
Showing 12 changed files with 2,944 additions and 3,897 deletions.
894 changes: 0 additions & 894 deletions ui/.yarn/releases/yarn-4.2.2.cjs

This file was deleted.

925 changes: 925 additions & 0 deletions ui/.yarn/releases/yarn-4.4.0.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ui/.yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ enableGlobalCache: false

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.2.2.cjs
yarnPath: .yarn/releases/yarn-4.4.0.cjs
37 changes: 37 additions & 0 deletions ui/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import react from "eslint-plugin-react";
import globals from "globals";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default [...compat.extends("eslint:recommended", "plugin:react/recommended"), {
plugins: {
react,
},

languageOptions: {
globals: {
...globals.browser,
},

ecmaVersion: 12,
sourceType: "module",

parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},

rules: {},
}];
94 changes: 45 additions & 49 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
"private": true,
"type": "module",
"dependencies": {
"@apollo/client": "^3.10.3",
"@fortawesome/fontawesome-svg-core": "^6.5.2",
"@fortawesome/free-regular-svg-icons": "^6.5.2",
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/react-fontawesome": "^0.2.0",
"@apollo/client": "^3.11.4",
"@fortawesome/fontawesome-svg-core": "^6.6.0",
"@fortawesome/free-regular-svg-icons": "^6.6.0",
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/react-fontawesome": "^0.2.2",
"@mapbox/mapbox-gl-draw": "~1.4.3",
"@turf/bearing": "^6.5.0",
"@turf/center": "^6.5.0",
"@turf/helpers": "^6.5.0",
"@turf/bearing": "^7.1.0",
"@turf/center": "^7.1.0",
"@turf/helpers": "^7.1.0",
"@watergis/maplibre-gl-export": "~2.0.1",
"bulma": "^1.0.0",
"bulma": "^1.0.2",
"classnames": "^2.5.1",
"dayjs": "^1.11.11",
"graphql": "^16.8.1",
"dayjs": "^1.11.12",
"graphql": "^16.9.0",
"hat": "^0.0.3",
"i18next": "^23.11.4",
"i18next": "^23.14.0",
"i18next-browser-languagedetector": "^8.0.0",
"lodash": "^4.17.21",
"mapbox-gl-style-switcher": "^1.0.11",
Expand All @@ -28,13 +28,13 @@
"react-autocomplete-hint": "^2.0.0",
"react-color": "^2.19.3",
"react-dom": "^18.3.1",
"react-i18next": "^14.1.1",
"react-i18next": "^15.0.1",
"react-map-gl": "~7.1.7",
"react-markdown": "^9.0.1",
"react-router-dom": "^6.23.1",
"react-router-dom": "^6.26.1",
"usehooks-ts": "^3.1.0",
"uuid": "^9.0.1",
"web-vitals": "^3.5.2"
"uuid": "^10.0.0",
"web-vitals": "^4.2.3"
},
"scripts": {
"analyze": "source-map-explorer 'build/static/js/*.js'",
Expand All @@ -44,12 +44,6 @@
"preview": "vite preview",
"generate-pwa-assets": "pwa-assets-generator"
},
"eslintConfig": {
"extends": [
"react-app"
],
"overrides": []
},
"browserslist": {
"production": [
"defaults and supports es6-module"
Expand All @@ -66,52 +60,54 @@
]
},
"devDependencies": {
"@testing-library/dom": "^10.1.0",
"@testing-library/jest-dom": "^6.4.6",
"@eslint/compat": "^1.1.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.9.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.4.8",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
"@types/hat": "^0.0.4",
"@types/jest": "^29.5.12",
"@types/lodash": "^4.17.1",
"@types/lodash": "^4.17.7",
"@types/mapbox-gl": "^2.7.21",
"@types/mapbox__mapbox-gl-draw": "~1.4.6",
"@types/node": "^20.14.11",
"@types/node": "^20.16.1",
"@types/react": "^18.3.3",
"@types/react-color": "^3.0.12",
"@types/react-dom": "^18.3.0",
"@types/react-router-dom": "^5.3.3",
"@types/semver": "^7.5.8",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.2.0",
"@typescript-eslint/parser": "^8.2.0",
"@vite-pwa/assets-generator": "^0.2.4",
"@vitejs/plugin-react-swc": "^3.6.0",
"@vitest/coverage-v8": "^1.6.0",
"eslint": "^8.57.0",
"eslint-config-react-app": "^7.0.1",
"husky": "^9.0.11",
"@vitejs/plugin-react-swc": "^3.7.0",
"@vitest/coverage-v8": "^2.0.5",
"eslint": "^9.9.0",
"eslint-plugin-react": "^7.35.0",
"globals": "^15.9.0",
"husky": "^9.1.4",
"jest": "^29.7.0",
"jsdom": "^24.1.0",
"lint-staged": "^15.2.2",
"prettier": "^3.2.5",
"sass": "^1.77.1",
"semver": "^7.6.2",
"jsdom": "^24.1.1",
"lint-staged": "^15.2.9",
"prettier": "^3.3.3",
"sass": "^1.77.8",
"semver": "^7.6.3",
"source-map-explorer": "^2.5.3",
"ts-jest": "^29.2.4",
"typescript": "^5.4.5",
"vite": "^5.2.12",
"typescript": "^5.5.4",
"vite": "^5.4.1",
"vite-plugin-checker": "^0.7.2",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-pwa": "^0.20.0",
"vite-plugin-pwa": "^0.20.1",
"vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^1.6.0"
"vite-tsconfig-paths": "^5.0.1",
"vitest": "^2.0.5"
},
"resolutions": {
"json5": "^2.2.3",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.18",
"sharp": "^0.33.2"
"sharp": "^0.33.5",
"braces": "^3.0.3"
},
"packageManager": "yarn@4.2.2"
"packageManager": "yarn@4.4.0"
}
2 changes: 1 addition & 1 deletion ui/src/components/map/EnrichedLayerFeatures.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import bearing from '@turf/bearing';
import { point } from '@turf/helpers';
import { BabsIcon, Schaeden, Others } from 'components/BabsIcons';
import { Feature, FeatureCollection, GeoJsonProperties, Geometry } from 'geojson';
import { Layer, Source } from "react-map-gl";
import { Layer, Source } from "react-map-gl/maplibre";

const enrichFeature = (f: Feature<Geometry, GeoJsonProperties>): Feature<Geometry, GeoJsonProperties>[] => {

Expand Down
16 changes: 6 additions & 10 deletions ui/src/reportWebVitals.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import { ReportHandler } from "web-vitals";
import { onCLS, onINP, onLCP } from 'web-vitals';

const reportWebVitals = (onPerfEntry?: ReportHandler) => {
const reportWebVitals = (onPerfEntry?: any) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
onCLS(onPerfEntry);
onINP(onPerfEntry);
onLCP(onPerfEntry);
}
};

export default reportWebVitals;
export default reportWebVitals;
3 changes: 1 addition & 2 deletions ui/src/views/map/Map.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import { CleanFeature, FilterActiveFeatures, LayerToFeatureCollection } from './
import { displayStyle, drawStyle } from './style';
import { Feature, Geometry, GeoJsonProperties, FeatureCollection } from "geojson";
import { first } from 'lodash';
import { FullscreenControl, Map, MapProvider, MapRef, NavigationControl, ScaleControl, Source, useMap } from 'react-map-gl/maplibre';
import { Layer as MapLayer } from 'react-map-gl';
import { FullscreenControl, Map, MapProvider, MapRef, NavigationControl, ScaleControl, Source, useMap, Layer as MapLayer } from 'react-map-gl/maplibre';
import { LayerContext, LayersProvider } from './LayerContext';
import { StyleController, selectedStyle } from './controls/StyleController';
import { memo, useCallback, useContext, useEffect, useRef, useState } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion ui/src/views/map/controls/BabsIconController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { BabsIcon, BabsIconType, IconGroups, LineTypesEinsatz, LineTypesSchaeden
import { Feature, GeoJsonProperties, Geometry } from "geojson";
import { first, isEmpty, isUndefined, omitBy } from "lodash";
import { memo, useCallback, useContext, useEffect, useState } from "react";
import { useMap } from "react-map-gl";
import { useMap } from "react-map-gl/maplibre";
import "./BabsIconController.scss";
import { LayerToFeatureCollection } from "../utils";
import { LayerContext } from "../LayerContext";
Expand Down
4 changes: 2 additions & 2 deletions ui/src/views/map/controls/DrawControl.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import MapboxDraw from "@mapbox/mapbox-gl-draw";
import { useControl } from "react-map-gl";
import { memo, useContext, useState } from "react";
import { type ControlPosition } from "react-map-gl/maplibre";
import { useControl, type ControlPosition } from "react-map-gl/maplibre";
import { LayerContext } from "../LayerContext";
import { FeatureEvent, CombineFeatureEvent } from "../Map";

Expand Down Expand Up @@ -41,6 +40,7 @@ function DrawControl(props: DrawControlProps) {
},
() => {
if (draw) {
MapboxDraw
dispatch({ type: "SET_DRAW", payload: { draw: draw } })
}
},
Expand Down
2 changes: 1 addition & 1 deletion ui/src/views/map/style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LayerProps } from "react-map-gl";
import { LayerProps } from "react-map-gl/maplibre";

export const drawStyle: LayerProps[] = [
{
Expand Down
Loading

0 comments on commit b127a15

Please sign in to comment.