miragejs/ember-cli-mirage

FYI: faker.js is no more

MelSumner opened this issue · 8 comments

Just a heads up that faker.js is no more- the most recently published version is empty. There are forks available; also chance.js has been pegged as a potential replacement.

Just saw that earlier this morning. Following the discussion.

Thanks for the heads up

There's also a new "official, stable fork of Faker" at https://github.com/faker-js/faker

Faker is actually listed as a devDependancy so it would only be used in the Docs / demo app. However searching the code I dont actually see if imported anywhere.

We should look into removing it from the devDependancies

@cah-briangantzler I think guides is where we use faker and that may need an update

Yes the guides give an example of using faker in snippets, not actual running code, so we can remove the devDependancy on faker now.

That part of the guides that actually should be removed though :) MirageJS is where that functionality now lies and should be documented there. This repo is only meant for integrating MirageJS into Ember, not explaining how MirageJS works.

Once we trim down the docs and only document what this addon is actually doing, that will all go away.

I checked MirageJS docs and they mention faker here https://miragejs.com/docs/main-concepts/factories/ But it should really be up to them to update their docs how they wish.

https://github.com/faker-js/faker seem to be legit successor

I can also recommend using @faker-js/faker.

While making a demo app, I realized that this library allows the same API calls (at least, for the methods that I needed). So all I'd need to do is to change the import statement.

/* Before */
import faker from 'faker';

/* After */
import { faker } from '@faker-js/faker';

This week, I was able to quickly replace Marak/faker in a production project.

Faker is only used in the docs app, not the addon proper. Since MirageJS is extracted, if the docs in this repo were trimmed down to the things this addon actually does and point the consumer to MirageJS for the rest faker would be removed from this repo completely.