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

rfc: ember-data | Deprecate Legacy Imports #743

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions text/0743-ember-data-deprecate-legacy-imports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
Stage: Accepted
Start Date: 2021-04-23
Release Date: Unreleased
Release Versions:
ember-source: vX.Y.Z
ember-data: vX.Y.Z
Relevant Team(s): ember-data
RFC PR: https://github.com/emberjs/rfcs/pull/743
---

# EmberData | Deprecate Legacy Imports

## Summary

Deprecates `import DS from "ember-data";` and individual imports within the `ember-data`
package in favor of the imports provided by [RFC#395 packages](https://github.com/emberjs/rfcs/blob/master/text/0395-ember-data-packages.md)

## Motivation

These imports are just a legacy remnant we no longer need.

## Detailed design

Lint rules and a codemod already exist to migrate users to using packages, and have been
available now for over a year.

The ember-data-packages plugin for ember-cli-babel would be updated so that users would
receive a deprecation when importing from the legacy paths. If required for legacy global
or DS import a runtime deprecation would be added as well.

To resolve, users would need only to run the codemod to convert to using packages.

The deprecation would target `5.0` and would become `enabled` no-sooner than `4.1` (although
it may be made `available` before then).

## How we teach this

Users have already been encouraged to migrate, documentation has already been updated to reflect
the package based imports, and lint rules and codemods already exist. Deprecating and removal at
this point is just a formality as the last stage of fading out the old world.

## Drawbacks

Someone somewhere probably is doing something bad.

## Alternatives

Leave them to waste away.