sway
sway copied to clipboard
Remove unused `faker` from the dependencies
faker
is not used in the code base.
$ npx depcheck
Unused dependencies
* faker
This unused dependency simply adds bloat.
Can any maintainer confirm this (just in case)? I would appreciate this getting attention due to faker
not being maintained anymore, but still gaining a lot of traffic.
I'm willing to provide a PR to fix this.
I've not looked at the code in a while but we use faker
indirectly via json-schema-faker
: https://github.com/apigee-127/sway/blob/e9ad6e81af41f526567e9d5a0f150e59e429e513/lib/helpers.js#L28 to allow for Parameter#getSample
to generate an example for a Parameter
's schema. If faker
is no longer maintained, either we need to find a replacement or we need to remove the ability to register custom format generators and likely sample generation.
I'm a team member from the faker-js/faker
library which is considered the official fork from the old faker
package. So I can assure you, other team members are already working on migrating the faker package in json-schema-faker
(see here).
So your lib really just needs to remove the faker
package from your dependencies in the package.json
file.