Releases: miragejs/ember-cli-mirage
v0.2.4
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 older3.x
version in your project you can specify it in your project's package.json. -
General improvements @Gaurav0
v0.2.3
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:
- [FEATURE] Add support for promises in route functions
(#924)
@dustinfarris - [BUGFIX] Adjust afterCreate callbacks execution order
(#893)
@Azdaroth - [INTERNAL] Shutdown pretender servers in unit tests
(#917)
@dustinfarris
v0.2.2
Update notes:
- None
Changes:
- [FEATURE] Add sort to orm/collection @lukemelia
- [FEATURE] Add :resource helper @Azdaroth
- [FEATURE] Add traits @Azdaroth (Read the docs)
- [FEATURE] Extract .config out of constructor @Leooo
- [FEATURE] #795 Adds findBy to db/schema @promisedlandt
- [ENHANCEMENT] #837 Allow namespace of / to be used @jrjohnson
- [ENHANCEMENT] #869 improve logging format @mariogintili
- [ENHANCEMENT] #781 rewrite serializers @samselikoff
- [BUGFIX] #821 JSONAPIAdapter fix @chrisdpeters
- [BUGFIX] #846 Allow new attributes to be defined in #update @Leooo
- General improvements @fotinakis, @jtrees, @dfreeman, @escobera, @Azdaroth, @Dhaulagiri
v0.2.1
0.2.1
v0.2.0
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
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 aCollection
, 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:
- [BREAKING CHANGE] #705 Drop Collection.[], add Collection.models @samselikoff
- [BREAKING CHANGE] #705 Pluralize Schema class names @samselikoff
- [FEATURE] #705 Add this.serialize to function route handlers @samselikoff
- [ENHANCEMENT] Server.create falls back to Models if Factories don't exist @samselikoff
- [ENHANCEMENT] Support aliases for --proxy @elbeezy
- [ENHANCEMENT] Do not include files if on Fastboot @locks
- [BUGFIX] #709 Fix Serializer include logic @cibernox
- [BUGFIX] #666 Ensure model serializers are used for JSONAPI @samselikoff
- General cleanup, updates and docs @lizzerdrix, @lependu, @amyrlam, @blimmer, @noslouch, @bgentry, @mitchlloyd, @BrianSipple, @acorncom, @stefanpennar
v0.1.13
v0.1.13
v0.1.12
v0.2.0-beta.8
v0.2.0-beta.8
v0.2.0-beta.7
v0.2.0-beta.7