Skip to content

Commit 62c97d4

Browse files
committed
fix certain line edge cases
take Turfjs/turf#2871 early while we see if it's right
1 parent 021d6b3 commit 62c97d4

File tree

4 files changed

+89
-3
lines changed

4 files changed

+89
-3
lines changed

.yarn/patches/@turf-nearest-point-on-line-npm-7.2.0-4a7f893df8.patch

Lines changed: 72 additions & 0 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@turf/distance": "7.2.0",
4242
"@turf/helpers": "7.2.0",
4343
"@turf/invariant": "7.2.0",
44-
"@turf/nearest-point-on-line": "7.2.0",
44+
"@turf/nearest-point-on-line": "patch:@turf/nearest-point-on-line@npm%3A7.2.0#~/.yarn/patches/@turf-nearest-point-on-line-npm-7.2.0-4a7f893df8.patch",
4545
"geographiclib-dms": "2.1.1",
4646
"papaparse": "5.5.2",
4747
"react": "19.1.0",

src/computation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Coord, featureCollection, point } from '@turf/helpers';
1+
import { Coord, featureCollection } from '@turf/helpers';
22
import nearestPointOnLine from '@turf/nearest-point-on-line';
33
import type { Feature, FeatureCollection, LineString, Point } from 'geojson';
44
import { GameConfig, GameMode } from './game-modes';

yarn.lock

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2450,6 +2450,20 @@ __metadata:
24502450
languageName: node
24512451
linkType: hard
24522452

2453+
"@turf/nearest-point-on-line@patch:@turf/nearest-point-on-line@npm%3A7.2.0#~/.yarn/patches/@turf-nearest-point-on-line-npm-7.2.0-4a7f893df8.patch":
2454+
version: 7.2.0
2455+
resolution: "@turf/nearest-point-on-line@patch:@turf/nearest-point-on-line@npm%3A7.2.0#~/.yarn/patches/@turf-nearest-point-on-line-npm-7.2.0-4a7f893df8.patch::version=7.2.0&hash=c890b0"
2456+
dependencies:
2457+
"@turf/distance": "npm:^7.2.0"
2458+
"@turf/helpers": "npm:^7.2.0"
2459+
"@turf/invariant": "npm:^7.2.0"
2460+
"@turf/meta": "npm:^7.2.0"
2461+
"@types/geojson": "npm:^7946.0.10"
2462+
tslib: "npm:^2.8.1"
2463+
checksum: 10c0/fa53e4c5f7911aeca010e603ea99886934a081950a2a1eb86c5ed1b945d46bbba3c53b18a407b8c03e789730f9400faa8f75bbbcd17a7abe819bd8fe1dbbb5c5
2464+
languageName: node
2465+
linkType: hard
2466+
24532467
"@types/geojson@npm:7946.0.16, @types/geojson@npm:^7946.0.10":
24542468
version: 7946.0.16
24552469
resolution: "@types/geojson@npm:7946.0.16"
@@ -5142,7 +5156,7 @@ __metadata:
51425156
"@turf/distance": "npm:7.2.0"
51435157
"@turf/helpers": "npm:7.2.0"
51445158
"@turf/invariant": "npm:7.2.0"
5145-
"@turf/nearest-point-on-line": "npm:7.2.0"
5159+
"@turf/nearest-point-on-line": "patch:@turf/nearest-point-on-line@npm%3A7.2.0#~/.yarn/patches/@turf-nearest-point-on-line-npm-7.2.0-4a7f893df8.patch"
51465160
"@types/geojson": "npm:7946.0.16"
51475161
"@types/papaparse": "npm:5.3.15"
51485162
"@types/react": "npm:19.1.2"

0 commit comments

Comments
 (0)