Skip to content

Commit a023c81

Browse files
authored
Upgrade deps (#433)
* update openlayers deps * update react, webpack etc deps * no need for any cast
1 parent ce24228 commit a023c81

File tree

10 files changed

+2475
-1813
lines changed

10 files changed

+2475
-1813
lines changed

package-lock.json

Lines changed: 2432 additions & 1774 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,35 @@
1818
"custom-model-editor": "github:graphhopper/custom-model-editor#5ebd80570329f7abfc95c39624be1f1a379cf392",
1919
"geojson": "^0.5.0",
2020
"heightgraph": "github:easbar/Leaflet.Heightgraph#5f4f0b1fff3646aa071981381f5955c9e6f111f0",
21-
"ol": "10.4.0",
22-
"ol-mapbox-style": "12.5.0",
23-
"react": "^18.3.1",
24-
"react-dom": "^18.3.1",
21+
"ol": "10.6.1",
22+
"ol-mapbox-style": "13.1.0",
23+
"react": "^19.1.1",
24+
"react-dom": "^19.1.1",
2525
"react-responsive": "^10.0.1"
2626
},
2727
"devDependencies": {
28-
"@svgr/webpack": "^8.0.1",
29-
"@types/geojson": "^7946.0.10",
30-
"@types/jest": "^29.4.1",
31-
"@types/react": "^18.0.21",
32-
"@types/react-dom": "^18.0.6",
33-
"copy-webpack-plugin": "^11.0.0",
34-
"css-loader": "^6.7.1",
35-
"favicons": "^7.0.1",
36-
"favicons-webpack-plugin": "^6.0.0-alpha.1",
37-
"html-webpack-plugin": "^5.5.0",
38-
"jest": "^29.4.1",
39-
"jest-environment-jsdom": "^29.4.1",
28+
"@svgr/webpack": "^8.1.0",
29+
"@types/geojson": "^7946.0.16",
30+
"@types/jest": "^30.0.0",
31+
"@types/react": "^19.1.10",
32+
"@types/react-dom": "^19.1.7",
33+
"copy-webpack-plugin": "^13.0.1",
34+
"css-loader": "^7.1.2",
35+
"favicons": "^7.2.0",
36+
"favicons-webpack-plugin": "^6.0.1",
37+
"html-webpack-plugin": "^5.6.4",
38+
"jest": "^30.0.5",
39+
"jest-environment-jsdom": "^30.0.5",
4040
"jest-fetch-mock": "^3.0.3",
41-
"prettier": "2.8.8",
42-
"source-map-loader": "^4.0.0",
43-
"style-loader": "^3.3.1",
44-
"ts-jest": "^29.1.4",
45-
"ts-loader": "^9.4.2",
46-
"typescript": "^5.1.3",
47-
"webpack": "^5.75.0",
48-
"webpack-cli": "^5.0.1",
49-
"webpack-dev-server": "^4.11.1",
50-
"webpack-merge": "^5.8.0"
41+
"prettier": "3.6.2",
42+
"source-map-loader": "^5.0.0",
43+
"style-loader": "^4.0.0",
44+
"ts-jest": "^29.4.1",
45+
"ts-loader": "^9.5.2",
46+
"typescript": "^5.9.2",
47+
"webpack": "^5.101.3",
48+
"webpack-cli": "^6.0.1",
49+
"webpack-dev-server": "^5.2.2",
50+
"webpack-merge": "^6.0.1"
5151
}
5252
}

src/layers/MapPopup.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Map, Overlay } from 'ol'
2-
import { useEffect, useRef, useState } from 'react'
2+
import {JSX, useEffect, useRef, useState} from 'react'
33
import { fromLonLat } from 'ol/proj'
4-
54
import { Coordinate } from '@/utils'
65

76
interface MapPopupProps {
@@ -12,15 +11,19 @@ interface MapPopupProps {
1211

1312
export default function MapPopup({ map, coordinate, children }: MapPopupProps) {
1413
const [overlay, setOverlay] = useState<Overlay | undefined>()
15-
const container = useRef<HTMLDivElement | null>(null)
14+
const container = useRef<HTMLDivElement>(null)
1615

1716
useEffect(() => {
18-
const overlay = new Overlay({
17+
const newOverlay = new Overlay({
1918
element: container.current!,
2019
autoPan: false,
2120
})
22-
setOverlay(overlay)
23-
map.addOverlay(overlay)
21+
setOverlay(newOverlay)
22+
map.addOverlay(newOverlay)
23+
24+
return () => {
25+
map.removeOverlay(newOverlay)
26+
}
2427
}, [map])
2528

2629
useEffect(() => {

src/layers/UseExternalMVTLayer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export default function useExternalMVTLayer(map: Map, externalMVTLayerEnabled: b
5050
},
5151
})
5252

53-
const onHover = (e: MapBrowserEvent<UIEvent>) => {
53+
const onHover = (e: MapBrowserEvent) => {
5454
selectionSource.clear()
5555
const features = map.getFeaturesAtPixel(e.pixel, {
5656
layerFilter: l => l === externalMVTLayer,

src/layers/UseRoutingGraphLayer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function useRoutingGraphLayer(map: Map, routingGraphEnabled: bool
3232
zIndex: 0.6,
3333
})
3434

35-
const onHover = (e: MapBrowserEvent<UIEvent>) => {
35+
const onHover = (e: MapBrowserEvent) => {
3636
const features = map.getFeaturesAtPixel(e.pixel, {
3737
layerFilter: l => l === routingGraphLayer,
3838
hitTolerance: 5,

src/pathDetails/PathDetails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ interface PathDetailsProps {
1717

1818
export default function ({ selectedPath }: PathDetailsProps) {
1919
// keep a ref to the container to determine the size of the graph,
20-
const containerRef: React.RefObject<HTMLDivElement> = useRef(null)
20+
const containerRef: React.RefObject<HTMLDivElement | null> = useRef(null)
2121

2222
// keep a ref to the container of the actual graph and pass it to the graph once the container is mounted
23-
const heightgraphRef: React.RefObject<HTMLDivElement> = useRef(null)
23+
const heightgraphRef: React.RefObject<HTMLDivElement | null> = useRef(null)
2424
const [graph, setGraph] = useState<any | null>(null)
2525
useEffect(() => {
2626
const options = {

src/sidebar/search/AddressInput.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { ReactNode, useCallback, useEffect, useRef, useState } from 'react'
1+
import {JSX, ReactNode, useCallback, useEffect, useRef, useState} from 'react'
22
import { QueryPoint, QueryPointType } from '@/stores/QueryStore'
33
import { Bbox, GeocodingHit, ReverseGeocodingHit } from '@/api/graphhopper'
44
import Autocomplete, { AutocompleteItem, GeocodingItem, POIQueryItem } from '@/sidebar/search/AddressInputAutocomplete'
5-
65
import ArrowBack from './arrow_back.svg'
76
import Cross from '@/sidebar/times-solid-thin.svg'
87
import CurrentLocationIcon from './current-location.svg'

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"sourceMap": true,
55
"noImplicitAny": true,
66
"jsx": "react-jsx",
7+
"jsxImportSource": "react",
78
"allowSyntheticDefaultImports": true,
89
"baseUrl": ".",
910
"importHelpers": true,

webpack.common.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ module.exports = {
5353
options: {
5454
modules: {
5555
localIdentName: '[path][name]__[local]',
56+
namedExport: false,
57+
exportLocalsConvention: 'as-is',
5658
},
5759
},
5860
},

webpack.dev.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const develop = {
88
devtool: 'source-map',
99
devServer: {
1010
static: path.resolve(__dirname, 'dist'),
11-
https: false,
1211
port: 3000,
1312
host: '0.0.0.0',
1413
},

0 commit comments

Comments
 (0)