Code Monkey home page Code Monkey logo

Comments (6)

simonua avatar simonua commented on May 31, 2024 1

Hi @SimenB ,

Thanks for your reply. Our use case was Validator.EnvMissingError. I'll see to a PR.

Thanks,

Simon

from envalid.

SimenB avatar SimenB commented on May 31, 2024 1

@af probably has opinions here - personally I think it's fine adding them directly to the envalid export.

(remember to update the TS typings as well 🙂)

from envalid.

af avatar af commented on May 31, 2024 1

I'm fine with adding them to the export like that. I don't think a major version increase is warranted though, importing internal paths is not officially supported by the API.

from envalid.

SimenB avatar SimenB commented on May 31, 2024

We don't support private imports, so I wouldn't call this a breaking change (it's not documented).

However, if you need to import validators, happy to take a PR exposing it as require('envalid').validators; or something like that.

A use case would be to get EnvError and EnvMissingError I guess. Maybe it's enough to expose those separately?

from envalid.

simonua avatar simonua commented on May 31, 2024

I'm looking at envalid's code but am not quite certain where your preference may lie in terms of making validators available externally. The simplest may be this code in envalid.js immediately before the module export, but I doubt that's preferential:

const { EnvError, EnvMissingError } = require('./validators');
envalid.EnvError = EnvError;
envalid.EnvMissingError = EnvMissingError;

from envalid.

simonua avatar simonua commented on May 31, 2024

Much appreciate the nice collaboration, folks. Thank you!

from envalid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.