Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop RSVP dependency #2051

Closed
jelhan opened this issue Dec 21, 2023 · 0 comments · Fixed by #2055
Closed

Drop RSVP dependency #2051

jelhan opened this issue Dec 21, 2023 · 0 comments · Fixed by #2055

Comments

@jelhan
Copy link
Contributor

jelhan commented Dec 21, 2023

The rsvp dependency should not be needed anymore. It was primarily a polyfill for native Promise. All modern browsers support native Promise these days. We can simplify our code base and prepare for planned deprecation by removing the dependency.

@NullVoxPopuli started the work in #1875 but doesn't have the time to finish it.

RSVP is not used at many places. GitHub code search lists 11 places.

Main priority should be on code shipped to end user. This affects 3 places:

  1. transitionEnd utility function (addon/utils/transition-end.js)
  2. <BsForm> component (addon/components/bs-form.js)
  3. Blueprints (blueprints/ember-bootstrap/index.js)
  4. Having rsvp as a dependency rather than a dev dependency.

The other 7 places affects only code, which is not shipped to consumers:

  • docs app (2 files)
  • tests (4 files)
  • node tests (1 file)

In most cases the transition should be fairly simple. RSVP.Promise, RSVP.reject, and RSVP.resolve can be replaced with their native equivalents. Only RSVP.defer does not have a native equivalent. But it could be replaced by an utility function, which I sketched here: #1875 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant