Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mourner
Copy link
Owner

@mourner mourner commented May 10, 2019

Since #89 warrants a semver-major release, I thought I'd cram some more breaking changes that I'd like to do at the same time. So far the PR:

  • ⚠️ switches the API from rbush(...) to new RBush(...), a more idiomatic ES approach — since ES forbids calling classes without new, and we still want to expose an extendable class rather than a factory.
  • Picking up from Make rbush an ES6 library #89, converts all the code to ES. The UMD build will still be transpiled to ES5 with Buble.
  • Removes the format option. While convenient, it still doesn't feel good to rely on eval while developers increasingly adopt strict CSP rules. If we remove it, we'll just document dealing with custom formats by redefining toBBox, compareMinX and compareMinY methods.

To do:

cc @rowanwins @tschaub thoughts?

@tschaub
Copy link
Contributor

tschaub commented May 10, 2019

Looks good to me @mourner. It sounds like you may be intending to publish multiple main entry points in the same package (ES Module & UMD) – which is nice to be able to do for single-module packages.

I'd be happy to contribute if there are more todos and to test it out if you publish a beta.

@rowanwins
Copy link
Contributor

Sounds good to me @mourner

@rowanwins rowanwins mentioned this pull request May 12, 2019
@mourner mourner merged commit 343e879 into master May 14, 2019
@mourner mourner deleted the modernize branch May 14, 2019 20:24
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.

3 participants