fastify / fluent-json-schema

A fluent API to generate JSON schemas
MIT License
495 stars 58 forks source link

Expose named export (fix TypeScript>=4.8 with native ESM) #207

Closed greguz closed 1 year ago

greguz commented 1 year ago

Checklist

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4055827173

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Totals Coverage Status
Change from base Build 3857247421: 0.0%
Covered Lines: 405
Relevant Lines: 405

💛 - Coveralls
Uzlopak commented 1 year ago

@climba03003 ;/

Inviz commented 1 year ago

Is this a real life? i will finally be able to update TS? LGTM

mcollina commented 1 year ago

@Fdawgs @aboutlo PTAL

greguz commented 1 year ago

I've noticed a couple of things:

Also I've just created a pure-ESM version of this project under the name fluent-json-schema-es where you can use the import S from 'fluent-json-schema-es syntax freely.

By doing that I saw that a double-module package (bot ESM and CJS code inside the same package) could potentially fix the issue with TypeScript entirely. I suggest rollup to do the ESM>CJS conversion.

What are your thoughts about It? I will be happy to make this change and deprecate fluent-json-schema-es.

Fdawgs commented 1 year ago
* The `Prettier` badge is wrong, I see this repo uses `Standard` for linting. May I update the badge?

Sure, please open a separate PR. 😄

* There's no `files` field inside the `package.json`, so all test files (and much more) are packaged and shipped to `NPM`. May add this field?

See https://github.com/fastify/skeleton/issues/42

Also I've just created a pure-ESM version of this project under the name fluent-json-schema-es where you can use the import S from 'fluent-json-schema-es syntax freely.

By doing that I saw that a double-module package (bot ESM and CJS code inside the same package) could potentially fix the issue with TypeScript entirely. I suggest rollup to do che ESM>CJS conversion.

What are your thoughts about It? I will be happy to make this change and deprecate fluent-json-schema-es.

See https://github.com/fastify/fastify/issues/2847 for ESM discussion.

Inviz commented 1 year ago

when's release?