Skip to content

Mark old nearest-point-on-line properties as deprecated#3005

Merged
mfedderly merged 3 commits intoTurfjs:masterfrom
EmilJunker:deprecate-nearest-point-on-line-properties
Mar 12, 2026
Merged

Mark old nearest-point-on-line properties as deprecated#3005
mfedderly merged 3 commits intoTurfjs:masterfrom
EmilJunker:deprecate-nearest-point-on-line-properties

Conversation

@EmilJunker
Copy link
Contributor

This PR is a follow-up to #2867. I have found a way to properly mark the old nearestPointOnLine properties as deprecated without messing up the generated Readme docs. I modified the generate-readmes script slightly to make it work.

The result is what can be seen in #2867 (comment)

I also used this opportunity to switch the lineOverlap, lineSlice, lineSplit and pointToLineDistance functions over to the new properties. It would be a bit embarrassing if turf's own functions would continue to use properties marked as deprecated. 😉

Please provide the following when creating a PR:

  • Meaningful title, including the name of the package being modified.
  • Summary of the changes.
  • Heads up if this is a breaking change.
  • Any issues this resolves.
  • Inclusion of your details in the contributors field of package.json - you've earned it! 👏
  • Confirmation you've read the steps for preparing a pull request.

Modify generate-readmes script to exclude deprecated tags
Affects lineOverlap, lineSlice, lineSplit and pointToLineDistance
@EmilJunker EmilJunker changed the title Deprecate nearest point on line properties Mark old nearest-point-on-line properties as deprecated Jan 26, 2026
@EmilJunker
Copy link
Contributor Author

This PR has been sitting here for quite a while. @mfedderly You are the one who suggested to mark the old properties as deprecated sooner rather than later in #2867 (comment). Could you please take a look at this solution?

Copy link
Collaborator

@mfedderly mfedderly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mfedderly mfedderly merged commit 9a3043e into Turfjs:master Mar 12, 2026
4 checks passed
@EmilJunker EmilJunker deleted the deprecate-nearest-point-on-line-properties branch March 12, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants