Re-enable the audit tools step and update dependencies (#815)

* update package versions

* run audit

* fix eslint config

* linter updates

* re-enable audit

* update timeouts test

* pass done into callback

* fix format
This commit is contained in:
Thomas Boop
2021-05-21 09:19:40 -04:00
committed by GitHub
parent 8dc2d6eb6a
commit 0d74e9080a
19 changed files with 10148 additions and 12836 deletions

View File

@@ -87,7 +87,7 @@ test('download progress tracked correctly', () => {
expect(progress.isDone()).toBe(true)
})
test('display timer works correctly', () => {
test('display timer works correctly', done => {
const progress = new DownloadProgress(1000)
const infoMock = jest.spyOn(core, 'info')
@@ -103,6 +103,7 @@ test('display timer works correctly', () => {
const test2 = (): void => {
check()
expect(progress.timeoutHandle).toBeUndefined()
done()
}
// Validate the progress is displayed, stop the timer, and call test2.
@@ -112,7 +113,7 @@ test('display timer works correctly', () => {
progress.stopDisplayTimer()
progress.setReceivedBytes(1000)
setTimeout(() => test2(), 100)
setTimeout(() => test2(), 500)
}
// Start the timer, update the received bytes, and call test1.
@@ -122,7 +123,7 @@ test('display timer works correctly', () => {
progress.setReceivedBytes(500)
setTimeout(() => test1(), 100)
setTimeout(() => test1(), 500)
}
start()

View File

@@ -30,7 +30,6 @@ async function handleResponse(
response: ITestResponse | undefined
): Promise<ITestResponse> {
if (!response) {
// eslint-disable-next-line no-undef
fail('Retry method called too many times')
}

View File

@@ -18,7 +18,6 @@ beforeAll(() => {
jest.spyOn(core, 'warning').mockImplementation(() => {})
jest.spyOn(core, 'error').mockImplementation(() => {})
// eslint-disable-next-line @typescript-eslint/promise-function-async
jest.spyOn(cacheUtils, 'getCacheFileName').mockImplementation(cm => {
const actualUtils = jest.requireActual('../src/internal/cacheUtils')
return actualUtils.getCacheFileName(cm)

View File

@@ -17,7 +17,6 @@ beforeAll(() => {
jest.spyOn(core, 'warning').mockImplementation(() => {})
jest.spyOn(core, 'error').mockImplementation(() => {})
// eslint-disable-next-line @typescript-eslint/promise-function-async
jest.spyOn(cacheUtils, 'getCacheFileName').mockImplementation(cm => {
const actualUtils = jest.requireActual('../src/internal/cacheUtils')
return actualUtils.getCacheFileName(cm)

View File

@@ -133,7 +133,7 @@ export class DownloadProgress {
*
* @param delayInMs the delay between each write
*/
startDisplayTimer(delayInMs: number = 1000): void {
startDisplayTimer(delayInMs = 1000): void {
const displayCallback = (): void => {
this.display()

View File

@@ -120,7 +120,7 @@ export async function retryTypedResponse<T>(
)
}
export async function retryHttpClientResponse<T>(
export async function retryHttpClientResponse(
name: string,
method: () => Promise<IHttpClientResponse>,
maxAttempts = DefaultRetryAttempts,