zoubingwu / msw-auto-mock

A cli tool to generate random mock data from OpenAPI definition for msw.
291 stars 62 forks source link

@faker-js/faker@8 : deprecated functions #28

Open douglasduteil opened 1 year ago

douglasduteil commented 1 year ago

Hi

A new major version of https://github.com/faker-js/faker/releases/tag/v8.0.0 is out and its comes with some deprecated functions. Here is a snippet of the lengthy logs my console print from an auto mocked api :

:scroll:

```sh # [...] [@faker-js/faker]: faker.datatype.number() is deprecated since v8.0 and will be removed in v9.0. Please use faker.number.int() instead. [@faker-js/faker]: faker.datatype.number() is deprecated since v8.0 and will be removed in v9.0. Please use faker.number.int() instead. [@faker-js/faker]: faker.datatype.number() is deprecated since v8.0 and will be removed in v9.0. Please use faker.number.int() instead. [@faker-js/faker]: faker.datatype.number() is deprecated since v8.0 and will be removed in v9.0. Please use faker.number.int() instead. [@faker-js/faker]: faker.datatype.number() is deprecated since v8.0 and will be removed in v9.0. Please use faker.number.int() instead. [@faker-js/faker]: faker.datatype.number() is deprecated since v8.0 and will be removed in v9.0. Please use faker.number.int() instead. [@faker-js/faker]: faker.name is deprecated since v8.0 and will be removed in v10.0. Please use faker.person instead. [@faker-js/faker]: faker.name is deprecated since v8.0 and will be removed in v10.0. Please use faker.person instead. [@faker-js/faker]: faker.name is deprecated since v8.0 and will be removed in v10.0. Please use faker.person instead. [@faker-js/faker]: faker.datatype.number() is deprecated since v8.0 and will be removed in v9.0. Please use faker.number.int() instead. [@faker-js/faker]: faker.datatype.number() is deprecated since v8.0 and will be removed in v9.0. Please use faker.number.int() instead. [@faker-js/faker]: faker.name is deprecated since v8.0 and will be removed in v10.0. Please use faker.person instead. [@faker-js/faker]: faker.datatype.number() is deprecated since v8.0 and will be removed in v9.0. Please use faker.number.int() instead. [@faker-js/faker]: faker.datatype.number() is deprecated since v8.0 and will be removed in v9.0. Please use faker.number.int() instead. # [...] ```


Checklist

We might want to use the example folder in the ci to test that it works with more cases.

zoubingwu commented 1 year ago

thanks to @chrisbarless, faker.number.int was introduced in #29 and published in 0.14.0

chrisbarless commented 1 year ago

thanks to @chrisbarless, faker.number.int was introduced in #29 and published in 0.14.0

Note @zoubingwu that the merged #29 includes faker.name to faker.person

There are two commits, but I split the changes incorrectly. My apologies.

daiki-takag1 commented 10 months ago

Hi,

I recently started using this library and noticed that some methods have been deprecated in faker-js version 8.0. In my environment, I received the following warning:

[@faker-js/faker]: faker.datatype.uuid() is deprecated since v8.0 and will be removed in v9.0. Please use faker.string.uuid() instead.

I'm looking forward to the updates. I appreciate all the work you are doing.

Thank you!

wvffle commented 9 months ago

@daiki-takag1 I've created #47 to resolve this message