cli-table / cli-table3

Pretty unicode tables for the command line
MIT License
534 stars 44 forks source link

support bigint cell content type #340

Closed ItsNickBarry closed 5 months ago

ItsNickBarry commented 5 months ago

The existing type casting (String(value)) also works for BigInts, so I've added support in the Typescript definitions and the JS type checks.

speedytwenty commented 5 months ago

Thanks for the PR(s)! I'd like to see a supporting test that simply outputs a bigint in cell content and the resulting output is as expected. This would be more to avoid regressions when refactoring.

I'll create a new release next week. If you haven't added a test, I'll accept this as is.

speedytwenty commented 5 months ago

You'll find basic examples for issue based tests here: https://github.com/cli-table/cli-table3/tree/master/test/issues

ItsNickBarry commented 5 months ago

Added a test. Also had to update the eslint ecmaVersion so that it could parse bigint literals.

speedytwenty commented 5 months ago

Thanks for your efforts. Tests look good. Your placement of them (within cell-test.js is also better than what I suggested).