Closed Matheeusb closed 3 weeks ago
Unless someone is supporting a version of datafaker for Java 11, this might be tricky. I don't think the project is gonna jump to 17 quite yet. https://www.datafaker.net/releases/2.0.0/
Although, to be clear, I absolutely LOVE this contribution. There are loads of folks who want the ability to do inline require/import in the JS engine, purely to import faker. A version of this that removes some/all of that need would be a massive uptick in capability for a lot of testers!
Looking at the changelog for v2.0.0, it's possible that a simple swap-in for v1.9.0 might be possible. There are no known CVEs for datafaker (seemingly, ever?)
Reckon there's a way to expose this in a more generic pattern too, to allow folk to reach the other providers based on an input key?
Example:
- inputRandomData:
type: Domain.fullDomain
Olhando o changelog para v2.0.0, é possível que uma troca simples para v1.9.0 seja possível. Não há CVEs conhecidos para datafaker (aparentemente, nunca?)
Você acha que há uma maneira de expor isso em um padrão mais genérico também, para permitir que as pessoas alcancem outros provedores com base em uma chave de entrada?
Exemplo:
- inputRandomData: type: Domain.fullDomain
Looking at the changelog for v2.0.0, it's possible that a simple swap-in for v1.9.0 might be possible. There are no known CVEs for datafaker (seemingly, ever?)
Reckon there's a way to expose this in a more generic pattern too, to allow folk to reach the other providers based on an input key?
Example:
- inputRandomData: type: Domain.fullDomain
I believe that would be ideal, as this way we could use all of DataFaker's resources. I decided to just follow the standard for random data already existing in the project, but replacing the original implementation with DataFaker, but we can review this.
I'll check here how it would look using version 1.9.0 of DataFaker.
This experiment didn't work out?
@Matheeusb If I had some time, would you have any objections to me building on this?
Proposed changes
The purpose of this PR is to add the DataFaker library, which provides various resources for random data (https://www.datafaker.net).
Three new random data resources have been added:
inputRandomCityName
,inputRandomCountryName
, andinputRandomColorName
. Additionally, a refactor was done on the existing resources, replacing theInputRandomTextHelper
class with the DataFaker implementation.copilot:summary
Testing
Unit tests were added for the
Commands
class, validating that the methods are returning random texts.