Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(other): fix avatar seeding #6260

Merged
merged 10 commits into from
May 30, 2023
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"xregexp": "^4.3.0"
},
"devDependencies": {
"@faker-js/faker": "5.1.0",
"@faker-js/faker": "7.6.0",
"apollo-server-testing": "~2.11.0",
"chai": "~4.2.0",
"cucumber": "~6.0.5",
Expand Down
4 changes: 2 additions & 2 deletions backend/src/db/factories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { v4 as uuid } from 'uuid'
import slugify from 'slug'
import { hashSync } from 'bcryptjs'
import { Factory } from 'rosie'
import faker from '@faker-js/faker'
import { faker } from '@faker-js/faker'
import { getDriver, getNeode } from './neo4j'
import CONFIG from '../config/index.js'
import generateInviteCode from '../schema/resolvers/helpers/generateInviteCode.js'
Expand Down Expand Up @@ -63,7 +63,7 @@ Factory.define('basicUser')
.option('password', '1234')
.attrs({
id: uuid,
name: faker.name.findName,
name: faker.name.fullName,
password: '1234',
role: 'user',
termsAndConditionsAgreedVersion: '0.0.1',
Expand Down
4 changes: 3 additions & 1 deletion backend/src/db/seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import sample from 'lodash/sample'
import { createTestClient } from 'apollo-server-testing'
import CONFIG from '../config'
import createServer from '../server'
import faker from '@faker-js/faker'
import { faker } from '@faker-js/faker'
import Factory from '../db/factories'
import { getNeode, getDriver } from '../db/neo4j'
import {
Expand Down Expand Up @@ -173,6 +173,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
},
{
email: 'moderator@example.org',
avatar: null,
},
),
Factory.build(
Expand Down Expand Up @@ -209,6 +210,7 @@ const languages = ['de', 'en', 'es', 'fr', 'it', 'pt', 'pl']
},
{
email: 'dewey@example.org',
avatar: null,
},
),
Factory.build(
Expand Down
8 changes: 4 additions & 4 deletions backend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1088,10 +1088,10 @@
exec-sh "^0.3.2"
minimist "^1.2.0"

"@faker-js/faker@5.1.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-5.1.0.tgz#cee1d77ada0d0dbbe77201d18b1ebabf432d9c0f"
integrity sha512-0VonSKh7fBCqvY+V2FLN2ZW4pR4ZtWJalWmwSaiaB7yK7y4qp8vDfuaq9QdLjf/cdZGx3M7Wc4Q+x4fZHxI21Q==
"@faker-js/faker@7.6.0":
version "7.6.0"
resolved "https://registry.yarnpkg.com/@faker-js/faker/-/faker-7.6.0.tgz#9ea331766084288634a9247fcd8b84f16ff4ba07"
integrity sha512-XK6BTq1NDMo9Xqw/YkYyGjSsg44fbNwYRx7QK2CuoQgyy+f1rrTDHoExVM5PsyXCtfl2vs2vVJ0MN0yN6LppRw==

"@gar/promisify@^1.1.3":
version "1.1.3"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@babel/core": "^7.21.8",
"@babel/preset-env": "^7.21.5",
"@babel/register": "^7.12.10",
"@faker-js/faker": "5.1.0",
"@faker-js/faker": "7.6.0",
"auto-changelog": "^2.3.0",
"bcryptjs": "^2.4.3",
"cross-env": "^7.0.3",
Expand Down