Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Typescript implementation #152

Merged
merged 4 commits into from
Apr 20, 2021
Merged

Improve Typescript implementation #152

merged 4 commits into from
Apr 20, 2021

Conversation

realityking
Copy link
Contributor

Very cool to see #147 merged. I'd like to offer a few improvements

  • This removes the added src folder under dist, keeping a flatter file structure by compiling only the tests
  • Includes the generated validators into type checking by providing a .d.ts file
  • Uses ts-node to run tests directly of the Typescript code
  • Skip generating source maps when building (they weren't shipped before but this makes it a bit more obvious what's going on)

It might be easier to review this commit by commit.

@coveralls
Copy link

coveralls commented Apr 19, 2021

Pull Request Test Coverage Report for Build 284

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.2%) to 99.786%

Totals Coverage Status
Change from base Build 282: -0.2%
Covered Lines: 345
Relevant Lines: 345

💛 - Coveralls

@@ -1,17 +1,19 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please help me exclude node_modules 🥰

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you wanna achieve? Just setting skipLibsCheck to true?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I wanna speed up the compilation, but maybe lead to type riskies. So keep as it 😃

@nam-hle
Copy link
Collaborator

nam-hle commented Apr 20, 2021

Great work, @realityking. Thanks a lot.

@gajus
Copy link
Owner

gajus commented Apr 20, 2021

🎉 This PR is included in version 6.3.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Apr 20, 2021
nam-hle pushed a commit to nam-hle/table that referenced this pull request Apr 22, 2021
* Move generated validators to src/ to simplify set-up and validate more types

* Use ts-node to run tests directly of the Typescript source

* Don't compile tests during build and simplify the shipped directory structure

* Don't generate sourcemaps for dist builds
nam-hle pushed a commit to nam-hle/table that referenced this pull request Apr 22, 2021
* Move generated validators to src/ to simplify set-up and validate more types

* Use ts-node to run tests directly of the Typescript source

* Don't compile tests during build and simplify the shipped directory structure

* Don't generate sourcemaps for dist builds
@realityking realityking deleted the simplify branch April 25, 2021 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants