diff --git a/packages/turf-clusters-dbscan/index.ts b/packages/turf-clusters-dbscan/index.ts index 930c77e893..31bfcc414e 100644 --- a/packages/turf-clusters-dbscan/index.ts +++ b/packages/turf-clusters-dbscan/index.ts @@ -2,7 +2,7 @@ import { GeoJsonProperties, FeatureCollection, Point } from "geojson"; import { clone } from "@turf/clone"; import { distance } from "@turf/distance"; import { degreesToRadians, lengthToDegrees, Units } from "@turf/helpers"; -import { rbush as RBush } from "./lib/rbush-export.js"; +import RBush from "rbush"; /** * Point classification within the cluster. diff --git a/packages/turf-clusters-dbscan/lib/rbush-export.ts b/packages/turf-clusters-dbscan/lib/rbush-export.ts deleted file mode 100644 index 49463b8ab5..0000000000 --- a/packages/turf-clusters-dbscan/lib/rbush-export.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Get around problems with moduleResolution node16 and some older libraries. -// Manifests as "This expression is not callable ... has no call signatures" -// https://stackoverflow.com/a/74709714 - -import lib from "rbush"; - -export const rbush = lib as unknown as typeof lib.default; diff --git a/packages/turf-clusters-dbscan/package.json b/packages/turf-clusters-dbscan/package.json index 33a6d757aa..a72f32fa5f 100644 --- a/packages/turf-clusters-dbscan/package.json +++ b/packages/turf-clusters-dbscan/package.json @@ -63,7 +63,7 @@ "@turf/centroid": "workspace:*", "@turf/clusters": "workspace:*", "@types/benchmark": "^2.1.5", - "@types/rbush": "^3.0.2", + "@types/rbush": "^3.0.4", "@types/tape": "^5.8.1", "benchmark": "^2.1.4", "chromatism": "^3.0.0", diff --git a/packages/turf-collect/index.ts b/packages/turf-collect/index.ts index 2811a522af..c2a3ce9c32 100644 --- a/packages/turf-collect/index.ts +++ b/packages/turf-collect/index.ts @@ -1,7 +1,7 @@ import { FeatureCollection, Polygon, Point } from "geojson"; import { bbox as turfbbox } from "@turf/bbox"; import { booleanPointInPolygon } from "@turf/boolean-point-in-polygon"; -import { rbush } from "./lib/rbush-export.js"; +import rbush from "rbush"; interface Entry { minX: number; diff --git a/packages/turf-collect/lib/rbush-export.ts b/packages/turf-collect/lib/rbush-export.ts deleted file mode 100644 index 49463b8ab5..0000000000 --- a/packages/turf-collect/lib/rbush-export.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Get around problems with moduleResolution node16 and some older libraries. -// Manifests as "This expression is not callable ... has no call signatures" -// https://stackoverflow.com/a/74709714 - -import lib from "rbush"; - -export const rbush = lib as unknown as typeof lib.default; diff --git a/packages/turf-collect/package.json b/packages/turf-collect/package.json index c7ed0106e1..6d10c73d2e 100644 --- a/packages/turf-collect/package.json +++ b/packages/turf-collect/package.json @@ -57,7 +57,7 @@ }, "devDependencies": { "@types/benchmark": "^2.1.5", - "@types/rbush": "^3.0.2", + "@types/rbush": "^3.0.4", "@types/tape": "^5.8.1", "benchmark": "^2.1.4", "npm-run-all": "^4.1.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1c38288b23..e4d8df702c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2224,8 +2224,8 @@ importers: specifier: ^2.1.5 version: 2.1.5 '@types/rbush': - specifier: ^3.0.2 - version: 3.0.3 + specifier: ^3.0.4 + version: 3.0.4 '@types/tape': specifier: ^5.8.1 version: 5.8.1 @@ -2358,8 +2358,8 @@ importers: specifier: ^2.1.5 version: 2.1.5 '@types/rbush': - specifier: ^3.0.2 - version: 3.0.3 + specifier: ^3.0.4 + version: 3.0.4 '@types/tape': specifier: ^5.8.1 version: 5.8.1 @@ -7908,8 +7908,8 @@ packages: '@types/parse5@6.0.3': resolution: {integrity: sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g==} - '@types/rbush@3.0.3': - resolution: {integrity: sha512-lX55lR0iYCgapxD3IrgujpQA1zDxwZI5qMRelKvmKAsSMplFVr7wmMpG7/6+Op2tjrgEex8o3vjg8CRDrRNYxg==} + '@types/rbush@3.0.4': + resolution: {integrity: sha512-knSt9cCW8jj1ZSFcFeBZaX++OucmfPxxHiRwTahZfJlnQsek7O0bazTJHWD2RVj9LEoejUYF2de3/stf+QXcXw==} '@types/resolve@1.20.2': resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} @@ -13514,7 +13514,7 @@ snapshots: '@types/parse5@6.0.3': {} - '@types/rbush@3.0.3': {} + '@types/rbush@3.0.4': {} '@types/resolve@1.20.2': {}