Skip to content

feat: add support for specifying model name as second argument in generate method#29

Merged
matiaslopezd merged 3 commits into
mainfrom
develop
Apr 21, 2026
Merged

feat: add support for specifying model name as second argument in generate method#29
matiaslopezd merged 3 commits into
mainfrom
develop

Conversation

@matiaslopezd
Copy link
Copy Markdown
Member

This pull request updates how UUIDs are generated and adds flexibility to the generate method in the MongooseDummy class. It also removes the external uuid dependency in favor of Node.js's built-in crypto module, and adds a new test for the updated generate method.

Dependency and import changes:

  • Removed the uuid package from package.json dependencies and replaced its usage with Node.js's built-in randomUUID from the crypto module. [1] [2]

MongooseDummy class improvements:

  • Updated the UUID generation logic in the MongooseDummy class to use randomUUID() instead of uuid().
  • Enhanced the generate method to accept an optional modelName parameter, allowing document generation for a specific model, and updated its JSDoc for clarity.

Testing:

  • Added a unit test to verify that the generate method works correctly when specifying a model name as the second argument.

@matiaslopezd matiaslopezd self-assigned this Apr 21, 2026
@matiaslopezd matiaslopezd added enhancement: feature New feature or request refactor Code refactored without behavior changes labels Apr 21, 2026
@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedrollup@​2.79.1 ⏵ 2.80.089 +1100 +2210099100
Updatedmongoose@​8.2.3 ⏵ 8.23.093 -4100 +7510098100
Updatedmocha@​10.3.0 ⏵ 10.8.296 +110095 +194100

View full report

@matiaslopezd matiaslopezd merged commit 9704a12 into main Apr 21, 2026
10 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement: feature New feature or request refactor Code refactored without behavior changes released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant