Closed micalevisk closed 2 years ago
btw @meszaros-lajos-gyorgy what's the reason the following is nested under a try-catch clause? will Number(x)
or Number.MAX_SAFE_INTEGER
raise an error in some case?
Hi! Sorry for the late respone, had a busy week. Let's have a test run, I'm curious to see if this works properly.
I think we should introduce a development branch so that we can have a controlled release procedure and not release a new version on every commit. What do you say?
the release workflow is triggered by new git tags starting with v
, isn't this good?
btw @meszaros-lajos-gyorgy what's the reason the following is nested under a try-catch clause? will
Number(x)
orNumber.MAX_SAFE_INTEGER
raise an error in some case?
I have no idea why this is in a try catch cause, it was probably refactored back then from a code, which threw an error upon parsing a number. I think it can be removed, but let me double check that number constructor.
the release workflow is triggered by new git tags starting with
v
, isn't this good?
Ah, okay, that is perfect!
sure. Then you can open a PR to test the CI workflow
The issue is that the code coverage isn't 100% so it will fail
Checked the Number constructor and nowhere does it mentions that it might throw an error: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/Number Parsing something, which is not a number will result in NaN, which can be compared with numbers without throwing an error.
I think I never saw the coverage report being 100% before and I would be perfectly happy with around 90% check, but if you say that we should aim for 100% then I can support that too.
@meszaros-lajos-gyorgy what about
"tap": {
"branches": 95,
"lines": 80,
"functions": 100,
"statements": 80
},
you can try it locally by adding the above in your package.json
, and run npm t
Let's go with this!
would you like to made that change along with the refactoring of that isNumber
func? it would be even better if you manage improve the code coverage threshold
Also, I think is better to move the tap config above to a new .taprc
file (it's a JSON file).
We should have a separate ticket for all of these small changes. Yes, I can implement these changes.
closes #15
I've added one workflow to run tests and another to just publish. Is it fine?
Also, the
ci.yml
will fail for now becausenpm run test
exits with non-zero code due to code coverage report constraints, and I don't believe we should relax that.