Skip to content

Conversation

@luupanu
Copy link

@luupanu luupanu commented Jan 22, 2026

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you written unit tests?
  • Have you written unit tests that cover the negative cases (i.e.: if bad data is submitted, does the library respond properly)?
  • This PR is associated with an existing issue?
Screenshot 2026-01-22 at 16 01 09

Motivation: we use @tsoa/cli in some of our AWS Lambdas and it happens to import the entirety of validator.js which is 130kB of about just anything, where it's just used for ISO8601 checks in @tsoa/cli.

130kB of unused code is bad in itself – but in general bundling that much extra code makes cold starts in Node.JS lambdas worse.

Potential Problems With The Approach

This only replaces validator.js dependency in @tsoa/cli, not in @tsoa/runtime.

Other than that, validator.js is a CJS package and it's not tree-shakeable no matter how you import it. Once you import it, you get everything.

Test plan

Unit tested the custom function.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello there luupanu 👋

Thank you and congrats 🎉 for opening your first PR on this project.✨

We will review the following PR soon! 👀

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

Successfully merging this pull request may close these issues.

1 participant