w3tecch / typeorm-seeding

🌱 A delightful way to seed test data into your database.
https://www.npmjs.com/package/typeorm-seeding
MIT License
877 stars 131 forks source link

Faker library incident #204

Closed bartosjiri closed 2 years ago

bartosjiri commented 2 years ago

Looks like the Faker.js library has been either compromised or discontinued in a strange manner.

I believe it would be the best to replace this library, since it is provided as a parameter into entity factories. What are some suitable alternatives?

jorgebodega commented 2 years ago

Yes, I saw the incident. Quite strange.

In this library, there is no solution, since it cannot be deployed. The only workaround is to use faker on version 5.5.3, the last stable one, as an independent module:

import * as faker from 'faker' // USE THIS
...
define(Pet, (faker: typeof Faker) => { // DO NOT USE THIS
  ...
})

faker could be installed with npm i faker@5.5.3 since is still available on NPM registries

bartosjiri commented 2 years ago

Closing in favor of #201