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

Faker logs error when property is named "word" or "words" #232

Open
seamus-otterai opened this issue Nov 22, 2024 · 0 comments
Open

Faker logs error when property is named "word" or "words" #232

seamus-otterai opened this issue Nov 22, 2024 · 0 comments

Comments

@seamus-otterai
Copy link

When the object property is named word or words, faker logs an error. It would appear that the word property causes faker.random.word() to be used instead.

Input ❌

z.object({
  words: z.string(),
});

Logged Errors

[@faker-js/faker]: faker.random.words() is deprecated since v8.0 and will be removed in v9.0. Please use faker.lorem.words() or faker.word.words() instead.
[@faker-js/faker]: faker.random.word() is deprecated since v8.0 and will be removed in v9.0. Please use faker.lorem.word() or faker.word.sample() instead.
[@faker-js/faker]: faker.random.word() is deprecated since v8.0 and will be removed in v9.0. Please use faker.lorem.word() or faker.word.sample() instead.
[@faker-js/faker]: faker.random.words() is deprecated since v8.0 and will be removed in v9.0. Please use faker.lorem.words() or faker.word.words() instead.
[@faker-js/faker]: faker.random.word() is deprecated since v8.0 and will be removed in v9.0. Please use faker.lorem.word() or faker.word.sample() instead.

Input ❌

z.object({
  word: z.string(),
});

Logged Errors

[@faker-js/faker]: faker.random.word() is deprecated since v8.0 and will be removed in v9.0. Please use faker.lorem.word() or faker.word.sample() instead.
[@faker-js/faker]: faker.random.word() is deprecated since v8.0 and will be removed in v9.0. Please use faker.lorem.word() or faker.word.sample() instead.

Input ✅

z.object({
  wordplay: z.string(),
});

Input ✅

z.object({
  foo: z.string(),
});

Input ✅

z.object({
  Word: z.string(),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant