Skip to content

Commit

Permalink
Merge branch 'master' into mf/update-lerna
Browse files Browse the repository at this point in the history
  • Loading branch information
twelch authored Jun 19, 2024
2 parents 7392001 + efd0cff commit 836d440
Show file tree
Hide file tree
Showing 120 changed files with 376 additions and 124 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [`@turf/union`](union) Accept FeatureCollection for multiple inputs (#2247)
- [`@turf/difference`](difference) Accept FeatureCollection for multiple inputs (#2247)
- [`@turf/intersect`](intersect) Accept FeatureCollection for multiple inputs (#2247)
- [`@turf/buffer`](buffer) Add undefined return for when the geometry is invalid (#2613)

## 🏅 New Features/Enhancements
- [`@turf/kinks`](kinks) Move to sweepline-intersections library for performance (#1896)
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"npmClient": "pnpm",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"command": {
"publish": {
"registry": "https://registry.npmjs.org"
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-along/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/along",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf along module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-angle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/angle",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf angle module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-area/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/area",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf area module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-bbox-clip/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/bbox-clip",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf bbox-clip module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-bbox-polygon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/bbox-polygon",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf bbox-polygon module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-bbox/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/bbox",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf bbox module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-bearing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/bearing",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf bearing module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-bezier-spline/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/bezier-spline",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf bezier-spline module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-clockwise/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-clockwise",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-clockwise module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-concave/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-concave",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-concave module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-contains/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-contains",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-contains module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-crosses/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-crosses",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-crosses module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-disjoint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-disjoint",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-disjoint module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-equal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-equal",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-equal module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-intersects/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-intersects",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-intersects module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-overlap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-overlap",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-overlap module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-parallel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-parallel",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-parallel module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-point-in-polygon/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-point-in-polygon",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-point-in-polygon module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-point-on-line/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-point-on-line",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-point-on-line module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-touches/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-touches",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-touches module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-valid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-valid",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-valid module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-boolean-within/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/boolean-within",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf boolean-within module",
"author": "Turf Authors",
"contributors": [
Expand Down
4 changes: 2 additions & 2 deletions packages/turf-buffer/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ declare function buffer(
| MultiPolygon,
radius?: number,
options?: Options
): Feature<Polygon | MultiPolygon>;
): Feature<Polygon | MultiPolygon> | undefined;
declare function buffer(
feature: FeatureCollection<GeometryObject> | GeometryCollection,
radius?: number,
options?: Options
): FeatureCollection<Polygon | MultiPolygon>;
): FeatureCollection<Polygon | MultiPolygon> | undefined;

export { buffer };
export default buffer;
2 changes: 1 addition & 1 deletion packages/turf-buffer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/buffer",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf buffer module",
"author": "Turf Authors",
"contributors": [
Expand Down
26 changes: 26 additions & 0 deletions packages/turf-buffer/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,32 @@ test("turf-buffer - morphological closing", (t) => {
t.end();
});

test("turf-buffer - undefined return", (t) => {
const poly: GeoJSON.Feature<GeoJSON.Polygon> = {
type: "Feature",
properties: {},
geometry: {
type: "Polygon",
coordinates: [
[
[-101.87842323574378, 52.250446362382775],
[-101.87842323574378, 49.56446202085259],
[-98.29404114999511, 49.56446202085259],
[-98.29404114999511, 52.250446362382775],
[-101.87842323574378, 52.250446362382775],
],
],
},
};

t.equal(
buffer(poly, -100000000),
undefined,
"empty geometry should be undefined if the resulting geometry is invalid"
);
t.end();
});

function colorize(feature, color) {
color = color || "#F00";
if (feature.properties) {
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-center-mean/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/center-mean",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf center-mean module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-center-median/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/center-median",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf center-median module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-center-of-mass/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/center-of-mass",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf center-of-mass module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-center/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/center",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf center module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-centroid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/centroid",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf centroid module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-circle/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/circle",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf circle module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-clean-coords/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/clean-coords",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf clean-coords module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-clone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/clone",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf clone module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-clusters-dbscan/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/clusters-dbscan",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf clusters-dbscan module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-clusters-kmeans/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/clusters-kmeans",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf clusters-kmeans module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-clusters/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/clusters",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf clusters module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-collect/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/collect",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf collect module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-combine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/combine",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf combine module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-concave/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/concave",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf concave module",
"author": "Turf Authors",
"contributors": [
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-convex/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/convex",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf convex module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-destination/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/destination",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf destination module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-difference/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/difference",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf difference module",
"author": "Turf Authors",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/turf-directional-mean/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@turf/directional-mean",
"version": "7.0.0-alpha.2",
"version": "7.0.0",
"description": "turf directional-mean module",
"author": "Turf Authors",
"contributors": [
Expand Down
Loading

0 comments on commit 836d440

Please sign in to comment.