-
Notifications
You must be signed in to change notification settings - Fork 15
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
Update ava version and related dependencies #96
base: master
Are you sure you want to change the base?
Conversation
@@ -53,7 +53,6 @@ module.exports = { | |||
'no-switch-case-fall-through': true, | |||
'no-unsafe-finally': true, | |||
'no-unused-expression': true, | |||
'no-use-before-declare': true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was deleted as it no longer exists with the new tslint
package version.
CI isn't passing @gaestradaaedo |
"sources": [ | ||
"src/*.ts", | ||
"src/**/*.ts" | ||
"!dist/test/**/*.test.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm very confused by this update. Doesn't this say that it's only testing files that don't satisfy these globs? I would expect this to mean that no tests are run at all.
], | ||
"concurrency": 5, | ||
"verbose": true, | ||
"timeout": "10000", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this option no longer supported in ava?
@@ -12,7 +12,7 @@ export async function delay<T>(delayTimeMs: number): Promise<void>; | |||
export async function delay<T>(delayTime: any, value?: T): Promise<void | T> { | |||
return new Promise( | |||
// tslint:disable-next-line:no-any (typed by overload signatures) | |||
resolve => setTimeout(() => resolve(value), delayTime), | |||
(resolve) => setTimeout(() => resolve(value), delayTime), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personally hate this lint change, but if you feel strongly this is the right strategy I don't really care as long as it's consistent and is handled automatically with the --fix operation
@@ -34,10 +34,11 @@ export function retry<T extends Function>(fn: T, retryOpts: RetryOpts): T { | |||
try { | |||
return await fn(...args); | |||
} catch (err) { | |||
if (retryOpts.isRetryable && !retryOpts.isRetryable(err)) { | |||
if (err instanceof Error && (!retryOpts.isRetryable || retryOpts.isRetryable(err))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would cast error or expand the type on line 30 rather than adding this to the check. As written in your update this will ignore the retryOpts if the function throws a non-error which i don't think is desirable
The main purpose of this PR is to update the
ava
library dependency and added the@ava/typescript
for compatibility. Theava
's configuration in thepackage.json
file was updated to adhere to the required structure from the package.It also updates/adds all the related/affected libraries for testing, such as
nyc
,prettier
andsource-map-support
.Additionally, it updates the
typescript
andtslint
packages.All the tests run successfully with the command
npm run testFix
and the changes made in the files where done automatically byprettier
.