From 93e27f37b8897afcf11cdce5dacaed5bb56b1d65 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 15:50:05 +0000 Subject: [PATCH 1/3] fix(deps): update dependency @turf/turf to v7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index de07a932f..2d83cc38f 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ ], "dependencies": { "@popperjs/core": "2.11.8", - "@turf/turf": "^6.5.0", + "@turf/turf": "^7.0.0", "file-saver": "2.0.5", "immutability-helper": "3.1.1", "jquery": "3.7.1", From 97834bf17d58fb007d65cbe97b02b6395db7c8b3 Mon Sep 17 00:00:00 2001 From: Julian Dehm Date: Wed, 27 Nov 2024 15:19:02 +0100 Subject: [PATCH 2/3] maps_react: replace removed inside with booleanPointInPolygon --- adhocracy4/maps_react/static/a4maps_react/AddMarkerControl.js | 4 ++-- changelog/_1112.md | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelog/_1112.md diff --git a/adhocracy4/maps_react/static/a4maps_react/AddMarkerControl.js b/adhocracy4/maps_react/static/a4maps_react/AddMarkerControl.js index 24e0a30e1..919d6459c 100644 --- a/adhocracy4/maps_react/static/a4maps_react/AddMarkerControl.js +++ b/adhocracy4/maps_react/static/a4maps_react/AddMarkerControl.js @@ -1,6 +1,6 @@ import L from 'leaflet' import { createControlComponent } from '@react-leaflet/core' -import { point, inside } from '@turf/turf' +import { point, booleanPointInPolygon } from '@turf/turf' import { makeIcon } from './GeoJsonMarker' export function checkPointInsidePolygon (marker, polygons) { @@ -9,7 +9,7 @@ export function checkPointInsidePolygon (marker, polygons) { polygons.eachLayer((layer) => { const polygonGeoJSON = layer.toGeoJSON() - if (inside(pointGeoJSON, polygonGeoJSON)) { + if (booleanPointInPolygon(pointGeoJSON, polygonGeoJSON)) { isInPolygon = true } }) diff --git a/changelog/_1112.md b/changelog/_1112.md new file mode 100644 index 000000000..e65e1a76e --- /dev/null +++ b/changelog/_1112.md @@ -0,0 +1,3 @@ +### Fixed + +- replace removed turf `inside` function with `booleanPointinPolygon` From 48a2d2f943d51eae3157167427bc30f056fe1f8a Mon Sep 17 00:00:00 2001 From: Julian Dehm Date: Wed, 27 Nov 2024 15:28:08 +0100 Subject: [PATCH 3/3] package.json: remove caret from versions --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 2d83cc38f..7b4b541a3 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ ], "dependencies": { "@popperjs/core": "2.11.8", - "@turf/turf": "^7.0.0", + "@turf/turf": "7.0.0", "file-saver": "2.0.5", "immutability-helper": "3.1.1", "jquery": "3.7.1", @@ -26,7 +26,7 @@ "react": "18.3.1", "react-dom": "18.3.1", "react-flip-move": "3.0.5", - "react-leaflet": "^4.2.1", + "react-leaflet": "4.2.1", "react-markdown": "9.0.1", "react-slick": "0.30.2", "shpjs": "6.1.0" @@ -37,7 +37,7 @@ "@babel/preset-env": "7.26.0", "@babel/preset-react": "7.25.9", "@maplibre/maplibre-gl-leaflet": "0.0.22", - "@react-leaflet/core": "^2.1.0", + "@react-leaflet/core": "2.1.0", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "16.0.1", "eslint": "8.57.1",