NullVoxPopuli / ember-resources

An implementation of Resources. Supports ember 3.28+

Home Page:https://github.com/NullVoxPopuli/ember-resources/blob/main/docs/docs/README.md

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reducing scope of the package `ember-resources` (while not removing anyone's relied-upon functionality)

NullVoxPopuli opened this issue · comments

I've been thinking about removing all the utilities from ember-resources in a major (with no other changes).

  • next minor (v6.x) would add deprecations for all of those utilities
    • trackedTask
    • fps
    • trackedFunction
    • keepLatest
    • map (reactively optimized Array.prototype.map)
    • RemoteData
    • waitUntil
    • helper

The deprecation would read:

X is deprecated from ember-resources, and has moved to `reactiveweb`, 
which is a drop in replacement.  
To migrate, change the import path from `ember-resources/XPath` to the `reactiveweb/YPath` equivelent, 
and you'll have the same behavior but without the deprecation

(with actual specifics implemented in the actual deprecation)

reactiveweb docs here: https://reactive.nullvoxpopuli.com/

This change would likely simplify the release cadence of ember-resources, so that (potential) future breaking changes to any of the above utils don't communicate that ember-resources itself has a breaking change.

The utilities within ember-resources served a couple purposes, which didn't have a specific vision:

  • how to do some things with the Resource pattern (RemoteData, trackedTask)
  • how to do some things with just... reactivity -- independent of resources entirely (keepLatest and map for example)

Motivation

  • reduce scope of ember-resources, and make the repo a bit easier to manage
    • this improves ability to contribute for first-timers, as the library is more focused
  • reactiveweb can have even more utilities, because it'll be a utility library, where you only pay for what you import

NOTE: none of the utilities are recommended against (like {{did-update}}) -- these are all fairly thin wrappers around public API, and can be supported for the foreseable future

unlike ember-data-resources, the reactiveweb utilities have no third-party integration happening, so there is no roadmap to align with (ember-data, for example, is moving away from recommending the store-based architecture)


What are folks thoughts on this change / migration plan?

I really like the idea of a place where more utilities can be added if common patterns start to emerge across the community. I also like the idea of reactiveweb being itself an example of how to use ember-resources to build helpful utilities.

I've added this issue to the v7 plan quest issue: #1061

lemme know what you think!

This is done -- v7 is released, and utilities are extracted to https://github.com/universal-ember/reactiveweb