Skip to content

Latest commit

 

History

History
27 lines (21 loc) · 521 Bytes

File metadata and controls

27 lines (21 loc) · 521 Bytes

globals-to-ember-data-imports

This is a transform to upgrade to the new "@ember-data" packages.

Before version 3.11, you would import ember-data modules from "ember-data".

It will turn the following code:

import DS from 'ember-data';

const {
  attr: thing
} = DS;

export default DS.Model.extend({
  shoe: thing('number'),
  glass: DS.attr('string')
});

into:

import Model, { attr as thing } from '@ember-data/model';

export default Model.extend({
  shoe: thing('number'),
  glass: thing('string')
});