From af3e5006727cb88de27481a7c9960607b09978d5 Mon Sep 17 00:00:00 2001 From: Ethan Dennis Date: Wed, 18 Mar 2020 17:51:30 -0700 Subject: [PATCH] Update import order for to fix linter errors --- __tests__/actionUtils.test.ts | 3 ++- __tests__/cacheHttpsClient.test.ts | 2 +- __tests__/save.test.ts | 2 +- __tests__/tar.test.ts | 2 +- src/cacheHttpClient.ts | 6 +++--- src/save.ts | 2 +- src/tar.ts | 1 + 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/__tests__/actionUtils.test.ts b/__tests__/actionUtils.test.ts index d1beb3a..fe13c78 100644 --- a/__tests__/actionUtils.test.ts +++ b/__tests__/actionUtils.test.ts @@ -1,12 +1,13 @@ import * as core from "@actions/core"; import * as io from "@actions/io"; +import { promises as fs } from "fs"; import * as os from "os"; import * as path from "path"; -import { promises as fs } from "fs"; import { Events, Outputs, State } from "../src/constants"; import { ArtifactCacheEntry } from "../src/contracts"; import * as actionUtils from "../src/utils/actionUtils"; + import uuid = require("uuid"); jest.mock("@actions/core"); diff --git a/__tests__/cacheHttpsClient.test.ts b/__tests__/cacheHttpsClient.test.ts index 99de775..6b93977 100644 --- a/__tests__/cacheHttpsClient.test.ts +++ b/__tests__/cacheHttpsClient.test.ts @@ -1,6 +1,6 @@ -import * as testUtils from "../src/utils/testUtils"; import { getCacheVersion } from "../src/cacheHttpClient"; import { Inputs } from "../src/constants"; +import * as testUtils from "../src/utils/testUtils"; afterEach(() => { testUtils.clearInputs(); diff --git a/__tests__/save.test.ts b/__tests__/save.test.ts index 809e1be..2765367 100644 --- a/__tests__/save.test.ts +++ b/__tests__/save.test.ts @@ -2,7 +2,7 @@ import * as core from "@actions/core"; import * as path from "path"; import * as cacheHttpClient from "../src/cacheHttpClient"; -import { Events, Inputs, CacheFilename } from "../src/constants"; +import { CacheFilename, Events, Inputs } from "../src/constants"; import { ArtifactCacheEntry } from "../src/contracts"; import run from "../src/save"; import * as tar from "../src/tar"; diff --git a/__tests__/tar.test.ts b/__tests__/tar.test.ts index cebc2df..fdf637a 100644 --- a/__tests__/tar.test.ts +++ b/__tests__/tar.test.ts @@ -3,8 +3,8 @@ import * as io from "@actions/io"; import { promises as fs } from "fs"; import * as path from "path"; -import * as tar from "../src/tar"; import { CacheFilename } from "../src/constants"; +import * as tar from "../src/tar"; jest.mock("@actions/exec"); jest.mock("@actions/io"); diff --git a/src/cacheHttpClient.ts b/src/cacheHttpClient.ts index c0f0ebc..c83e307 100644 --- a/src/cacheHttpClient.ts +++ b/src/cacheHttpClient.ts @@ -1,6 +1,4 @@ import * as core from "@actions/core"; -import * as fs from "fs"; -import * as crypto from "crypto"; import { HttpClient, HttpCodes } from "@actions/http-client"; import { BearerCredentialHandler } from "@actions/http-client/auth"; import { @@ -8,7 +6,10 @@ import { IRequestOptions, ITypedResponse } from "@actions/http-client/interfaces"; +import * as crypto from "crypto"; +import * as fs from "fs"; +import { Inputs } from "./constants"; import { ArtifactCacheEntry, CommitCacheRequest, @@ -16,7 +17,6 @@ import { ReserveCacheResponse } from "./contracts"; import * as utils from "./utils/actionUtils"; -import { Inputs } from "./constants"; const versionSalt = "1.0"; diff --git a/src/save.ts b/src/save.ts index 59983b7..6fdca6e 100644 --- a/src/save.ts +++ b/src/save.ts @@ -2,7 +2,7 @@ import * as core from "@actions/core"; import * as path from "path"; import * as cacheHttpClient from "./cacheHttpClient"; -import { Events, Inputs, State, CacheFilename } from "./constants"; +import { CacheFilename, Events, Inputs, State } from "./constants"; import { createTar } from "./tar"; import * as utils from "./utils/actionUtils"; diff --git a/src/tar.ts b/src/tar.ts index 5417f34..3ca3019 100644 --- a/src/tar.ts +++ b/src/tar.ts @@ -2,6 +2,7 @@ import { exec } from "@actions/exec"; import * as io from "@actions/io"; import { existsSync, writeFileSync } from "fs"; import * as path from "path"; + import { CacheFilename } from "./constants"; async function getTarPath(): Promise {