Skip to content

Commit

Permalink
Replace faker with @faker-js/faker
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeAstapov committed May 3, 2022
1 parent 7e5f87d commit e78a663
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Let's add some more properties to our factory:
```js
// mirage/factories/movie.js
import { Factory } from 'miragejs';
import faker from 'faker';
import { faker } from '@faker-js/faker';

export default Factory.extend({

Expand Down Expand Up @@ -233,7 +233,7 @@ Attributes can depend on other attributes via `this` from within a function. Thi
```js
// mirage/factories/user.js
import { Factory } from 'miragejs';
import faker from 'faker';
import { faker } from '@faker-js/faker';

export default Factory.extend({

Expand Down
2 changes: 1 addition & 1 deletion packages/ember-cli-mirage-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@ember/jquery": "^2.0.0",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.7.0",
"@faker-js/faker": "^6.3.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"babel-eslint": "^10.1.0",
Expand Down Expand Up @@ -72,7 +73,6 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^7.2.0",
"faker": "^5.1.0",
"js-yaml": "^4.0.0",
"loader.js": "^4.7.0",
"miragejs": "^0.1.43",
Expand Down
2 changes: 1 addition & 1 deletion packages/ember-cli-mirage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.7.0",
"@embroider/test-setup": "^1.6.0",
"@faker-js/faker": "^6.3.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@types/qunit": "^2.11.3",
Expand Down Expand Up @@ -87,7 +88,6 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^7.2.0",
"faker": "^5.1.0",
"fastboot": "^3.3.0",
"js-yaml": "^4.0.0",
"loader.js": "^4.7.0",
Expand Down
2 changes: 1 addition & 1 deletion test-packages/01-basic-app/mirage/factories/user.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Factory } from 'miragejs';
import faker from 'faker';
import { faker } from '@faker-js/faker';

export default Factory.extend({
age() {
Expand Down
2 changes: 1 addition & 1 deletion test-packages/01-basic-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.6.0",
"@faker-js/faker": "^6.3.1",
"@glimmer/component": "^1.0.4",
"@glimmer/tracking": "^1.0.4",
"babel-eslint": "^10.1.0",
Expand Down Expand Up @@ -57,7 +58,6 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-qunit": "^7.2.0",
"faker": "^5.1.0",
"fastboot": "^3.3.0",
"jsdom": "^19.0.0",
"loader.js": "^4.7.0",
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,11 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"

"@faker-js/faker@^6.3.1":
version "6.3.1"
resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-6.3.1.tgz#1ae963dd40405450a2945408cba553e1afa3e0fb"
integrity sha512-8YXBE2ZcU/pImVOHX7MWrSR/X5up7t6rPWZlk34RwZEcdr3ua6X+32pSd6XuOQRN+vbuvYNfA6iey8NbrjuMFQ==

"@fullhuman/postcss-purgecss@^2.1.2":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@fullhuman/postcss-purgecss/-/postcss-purgecss-2.3.0.tgz#50a954757ec78696615d3e118e3fee2d9291882e"
Expand Down Expand Up @@ -8622,11 +8627,6 @@ fake-xml-http-request@^2.1.2:
resolved "https://registry.yarnpkg.com/fake-xml-http-request/-/fake-xml-http-request-2.1.2.tgz#f1786720cae50bbb46273035a0173414f3e85e74"
integrity sha512-HaFMBi7r+oEC9iJNpc3bvcW7Z7iLmM26hPDmlb0mFwyANSsOQAtJxbdWsXITKOzZUyMYK0zYCv3h5yDj9TsiXg==

faker@^5.1.0:
version "5.5.3"
resolved "https://registry.yarnpkg.com/faker/-/faker-5.5.3.tgz#c57974ee484431b25205c2c8dc09fda861e51e0e"
integrity sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g==

fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
Expand Down

0 comments on commit e78a663

Please sign in to comment.