Skip to content

Releases: miragejs/ember-cli-mirage

v0.2.4

07 Nov 04:42
Compare
Choose a tag to compare

Update notes:

  • [ENHANCEMENT] Let faker float from 3.0.0 @Dhaulagiri

    To improve backwards compatibility concerns raised by the changes from #863, #932 allows the version of Faker.js used in ember-cli-mirage to float from 3.0.0. If you need to use a specific older 3.x version in your project you can specify it in your project's package.json.

  • General improvements @Gaurav0

v0.2.3

20 Oct 19:32
Compare
Choose a tag to compare

Update notes:

  • Newer versions of Pretender will show a warning
    if you forget to shut down a pretender server before starting another one. Mirage does this
    for you in acceptance tests, but if you are starting Mirage manually in other tests, remember
    to shut down the server when you are done.
    (see #925)

Changes:

v0.2.2

19 Sep 16:14
Compare
Choose a tag to compare

Update notes:

  • None

Changes:

v0.2.1

04 Sep 10:38
Compare
Choose a tag to compare
0.2.1

v0.2.0

31 May 15:39
Compare
Choose a tag to compare

View the release blog post: http://www.ember-cli-mirage.com/blog/2016/05/31/0-2-0-released/

Please see the Upgrade guide if you're installing 0.2 for the first time from a 0.1.x app.


Changes from 0.2.0-beta.9:

Update notes:

  • The inverseOf options was renamed to inverse, to be consistent with Ember Data

Changes:

  • [BREAKING CHANGE] #640 inverseOf was renamed to inverse @samselikoff
  • [FEATURE] #729 Add this.normalizedRequestAttrs helper method to function route handler @samselikoff
  • [ENHANCEMENT] #743 Ensure associations can be passed in during model creation @samselikoff
  • [BUGFIX] #738 Ensure directory location can be configured @gthmb
  • General cleanup, updates and docs @lizzerdrix, @timjcook, @samselikoff

v0.2.0-beta.9

13 May 16:26
Compare
Choose a tag to compare
v0.2.0-beta.9 Pre-release
Pre-release

This release contains some breaking changes from 0.2.0-beta.8.

Update notes:

  • Schema model classes are now pluralized. They used to be singularized, taking after Rails' conventions, but I think it's better to match our db conventions (e.g. db.users).

    So you'll need to change

    schema.user.all()
    schema.user.find(1)

    to

    schema.users.all()
    schema.users.find(1)

    and so on. The upgrade should be a relatively straightforward.

  • Breaking changes on ORM/Collection:

    • There's now a .models property on Collections, which gives you access to the underlying JavaScript array. This should be used if you want to munge the collection using Lodash, Ramda et al.

      let usersCollection = schema.users.all();
      let uniqueUsers = _.uniq(usersCollection.models, u => u.firstName);
    • Collection no longer attempts to mimic an array. This turned out to be confusing, since you can't really subclass arrays in JavaScript, and it would sometimes be compatible with functions that operate on arrays, but sometimes not.

      So, you can no longer use the array accessor on a collection, meaning the following won't work:

      let authors = schema.authors.all();
      
      // The following no longer work
      authors[1];
      authors.length;
      authors.push(model);
      authors.map(f);
      authors.forEach(f);
      authors.reduce(f);
      authors.toArray(); // use authors.models instead

      Instead, if you need to use array-methods on Collections, access the .models property. You can always convert your transformed array back to a Collection, for example to tell Mirage to serialize your response:

      import { Collection } from 'ember-cli-mirage';
      
      let authors = schema.authors.all().models;
      let topPosts = authors.map(a => a.topPost);
      
      return new Collection('post', topPosts);

Changes:

v0.1.13

30 Mar 07:25
Compare
Choose a tag to compare
v0.1.13

v0.1.12

29 Mar 18:30
Compare
Choose a tag to compare

Hotfix for #413

v0.2.0-beta.8

24 Mar 16:10
Compare
Choose a tag to compare
v0.2.0-beta.8 Pre-release
Pre-release
v0.2.0-beta.8

v0.2.0-beta.7

25 Feb 14:36
Compare
Choose a tag to compare
v0.2.0-beta.7 Pre-release
Pre-release
v0.2.0-beta.7