39

I am seeing the repo is completely blank with a message saying

What really happened with Aaron Swartz?

I am wondering if it is still safe to keep using it or we should switch to another alternative. Here is the link to the repo https://github.com/marak/Faker.js/ and this is how it looks like

enter image description here

Ben Everard
  • 13,652
  • 14
  • 67
  • 96
Rene Enriquez
  • 1,418
  • 1
  • 13
  • 33
  • YAHP (yet another hacked package)? 6.6.6 (the newest version) is 15 hours ago, the one before (5.5.3) is 9 months ago. – raina77ow Jan 05 '22 at 17:24
  • 1
    It's not _unsafe_, it just won't work. You can download the package without installing it via https://registry.npmjs.org/faker/-/faker-6.6.6.tgz, all the files are gone so your imports will fail. `npm i faker@5`? – jonrsharpe Jan 05 '22 at 17:32
  • It looks like it is because Marak (faker creator) is supporting in this way somehow Aaron Swartz, check this out from his twitter https://twitter.com/marak/status/1478540823180582914/photo/1 – Rene Enriquez Jan 05 '22 at 17:33
  • 3
    Fun fact, a couple of years ago, I opened an issue about the somewhat tacky words in the random person name result, as often a name like Master Dick Gaylord or similar would resolve, the abusive backlash I got in the issues replies made me block the author (Marak) and not touched the lib since. – Lawrence Cherone Jan 10 '22 at 17:37
  • 2
    @LawrenceCherone how do you expect to implement profanity filters without having such names? Besides not all such names are swear words as you think as in "Dick Grayson" and "Charles Dickens" – Yılmaz Durmaz Jan 13 '22 at 07:15
  • 1
    @LawrenceCherone So what your saying is you harassed the author off the internet, and now your the victim? – Michael Cole Jan 16 '23 at 14:21

4 Answers4

28

It seems Marak, the primary maintainer for Faker, has deliberately pulled Faker's source code and history from their GitHub repository and published a non-functional package in its place.

For context, Marak has become known in recent history for some rather controversial comments regarding the late Aaron Swartz (whom they reference in Faker's updated README) & advocating for compensation for their open-source contributions. You can see the comments on both this Hacker News thread from Nov 2020 and this Reddit thread from today (January 5th, 2022) for additional context.

If you continue to need the functionality Faker provides, npm maintains old versions for install - just be deliberate with the version you're installing, i.e., npm i faker@5.5.3. The full source and history is also maintained in @withshepherd's fork on GitHub (published on NPM as @withshepherd/faker).

Unfortunately this is a known risk of this type of dependency ecosystem.

esqew
  • 42,425
  • 27
  • 92
  • 132
  • true fact, it is a known risk but it is a good dependency for testing. At least we can keep using older versions already published – Rene Enriquez Jan 06 '22 at 18:44
25

TLDR: Faker is now a community project. Visit faker-js/faker, docs at fakerjs.dev and use npm install @faker-js/faker.


faker.js has now made its way to a community repo and has its new home at https://github.com/faker-js/faker

FAQ - What happened to the original faker.js?

This project was originally created and hosted at https://github.com/marak/Faker.js/ - however around 4th Jan, 2022 - the author decided to delete the repository (for unknown reasons).

In the interest of the community, it has been decided that faker.js will continue to be maintained here and all help in its development will be appreciated.

in last 24 hours, all previously active npm packages are uploaded back into @faker-js/faker

UPDATE: on Jan 14th, the new @faker-js community mostly completed the new look of the Faker with a nice update in the new documentation site: https://fakerjs.dev/update.html

Yılmaz Durmaz
  • 2,374
  • 12
  • 26
2

What really happened with Aaron Schwartz?

You can't talk about it or you're a conspiracy theorist, and will be harassed off the internet.

Whether or not Aaron Schwartz was murdered or died of suicide from law-fare, he symbolizes a generation of coders and hackers who watched massive tech monopolies turn open-source into fauxpen-source.

He died trying to make a public free-as-in-freedom-and-beer database of research and legal records - all things paid for by tax dollars and on the public record - that other monopolies still keep behind paywalls.

Aaron Schwartz thought open source was for everyone, not just for servers.

It looks like Marak thought that conversation was more important than server tests making up endless fake people's fake emails.

If you're uncomfortable thinking about that and just want some fake people, it looks some people took Marak's work and made money off it from these backers

npm install --save-dev @faker-js/faker

Here's an example of how to use it:

import { faker } from '@faker-js/faker';
// import { faker } from '@faker-js/faker/locale/de';

export const USERS: User[] = [];

export function createRandomUser(): User {
  return {
    userId: faker.datatype.uuid(),
    username: faker.internet.userName(),
    email: faker.internet.email(),
    avatar: faker.image.avatar(),
    password: faker.internet.password(),
    birthdate: faker.date.birthdate(),
    registeredAt: faker.date.past(),
  };
}

Array.from({ length: 10 }).forEach(() => {
  USERS.push(createRandomUser());
});
Michael Cole
  • 15,473
  • 7
  • 79
  • 96
-9

I am using faker-js and its working fine. Be sure to clear cache (including cookies) from browser before update any faker data on your code.

You can import it following ths

const { faker } = require('@faker-js/faker');
const randomName = faker.name.findName(); // returns a random name

Link: https://www.npmjs.com/package/@faker-js/faker

  • 2
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Tobiah Rex Feb 19 '22 at 05:35