Automattic / cli-table

Pretty unicode tables for the CLI with Node.JS
MIT License
2.28k stars 141 forks source link

Make sure options are not null. Add test #154

Closed phess101 closed 3 years ago

phess101 commented 3 years ago

Description

Currently, if you try to create a new Table with no options, you will get a crashing error. We need to first do a null check against options.

Checklist

Please make sure the items below have been covered before requesting a review:

Deploy Notes

Notes regarding deployment of this PR, if any.

Steps to Test or Reproduce

  1. Create an instance of Table without any options
  2. Verify that your table object is not null, and there were no exceptions thrown
phess101 commented 3 years ago

Related to issue https://github.com/Automattic/cli-table/issues/153

yjhuoh commented 3 years ago

ha looks like we did the same thing. https://github.com/Automattic/cli-table/pull/155

clintecker commented 3 years ago

:+1:

clintecker commented 3 years ago

This is currently breaking Google's firebase-tools as their dependency is specified as ^0.3.1 :(

yjhuoh commented 3 years ago

😆 that's exactly how we discovered it

clintecker commented 3 years ago

I've emailed @chrean, but maybe @igoradamenko or @msabramo could help us out

yjhuoh commented 3 years ago

maybe we should just pin the version in firebase-tools 🤔

mikeendale commented 3 years ago

+1 Please merge

maybe we should just pin the version in firebase-tools 🤔

Created a PR for that too: https://github.com/firebase/firebase-tools/pull/3908