ts-ecosystem icon indicating copy to clipboard operation
ts-ecosystem copied to clipboard

update @types/convict to allow nullable option

Open kchow1985 opened this issue 2 years ago • 3 comments

The current @types/convict version does not allow you to specify the nullable option for config values.

i.e.

type ConfigOptions {
  valueA: string
}

export default createProfiguration<ConfigOptions>({
  valueA: {
    format: String,
    env: 'SOME_CONFIG_VALUE',
    default: null,
    nullable: true // typescript will complain because v5.2.0 @types/convict definition does not define this property
});

The convict version on the package is ^6.0.0 which would be 6.2.4 if downloaded from npm, but @types/convict is 5.2.0 which should be updated to 6.1.1

kchow1985 avatar May 17 '23 22:05 kchow1985

@kchow1985 Feel free to create a PR with those updates and I'll happily review and merge

underfisk avatar Jul 02 '23 00:07 underfisk

I agree @kchow1985 could have immediatley created a PR, but I wonder if this module is not maintained anymore?

MickL avatar Oct 20 '23 17:10 MickL

I agree @kchow1985 could have immediatley created a PR, but I wonder if this module is not maintained anymore?

Hi @MickL, I've been actively looking at new issues and any security-patch but unfortunately, I don't have enough capacity to contribute and develop more features. I believe there are some alternatives to just using zod; the project was left as is with a stable API. It doesn't mean that any new contribution is not properly reviewed and merged, it just means that the authors as of now are not looking to develop any other feature to the project

underfisk avatar Oct 20 '23 17:10 underfisk