diff options
| author | Cory Miller <13227161+cory-miller@users.noreply.github.com> | 2024-04-24 12:04:10 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-24 12:04:10 -0400 |
| commit | 77eabb37dbe5cc705ca71a065bc5b19443b802dd (patch) | |
| tree | 5debd944e8396fc3c708d1252d7d26c1400c2b10 /src | |
| parent | 92d604f0b71b629ce5b6949f8e3a3e9f1c17bad9 (diff) | |
Update NPM dependencies (#1703)
* Update dependencies manually
* Format files
* Update licenses
Diffstat (limited to 'src')
| -rw-r--r-- | src/fs-helper.ts | 15 | ||||
| -rw-r--r-- | src/git-auth-helper.ts | 4 | ||||
| -rw-r--r-- | src/github-api-helper.ts | 2 | ||||
| -rw-r--r-- | src/input-helper.ts | 5 | ||||
| -rw-r--r-- | src/misc/generate-docs.ts | 2 | ||||
| -rw-r--r-- | src/ref-helper.ts | 2 | ||||
| -rw-r--r-- | src/workflow-context-helper.ts | 5 |
7 files changed, 20 insertions, 15 deletions
diff --git a/src/fs-helper.ts b/src/fs-helper.ts index 3741d35..00ad941 100644 --- a/src/fs-helper.ts +++ b/src/fs-helper.ts @@ -18,8 +18,9 @@ export function directoryExistsSync(path: string, required?: boolean): boolean { } throw new Error( - `Encountered an error when checking whether path '${path}' exists: ${(error as any) - ?.message ?? error}` + `Encountered an error when checking whether path '${path}' exists: ${ + (error as any)?.message ?? error + }` ) } @@ -45,8 +46,9 @@ export function existsSync(path: string): boolean { } throw new Error( - `Encountered an error when checking whether path '${path}' exists: ${(error as any) - ?.message ?? error}` + `Encountered an error when checking whether path '${path}' exists: ${ + (error as any)?.message ?? error + }` ) } @@ -67,8 +69,9 @@ export function fileExistsSync(path: string): boolean { } throw new Error( - `Encountered an error when checking whether path '${path}' exists: ${(error as any) - ?.message ?? error}` + `Encountered an error when checking whether path '${path}' exists: ${ + (error as any)?.message ?? error + }` ) } diff --git a/src/git-auth-helper.ts b/src/git-auth-helper.ts index 364a04e..126e8e5 100644 --- a/src/git-auth-helper.ts +++ b/src/git-auth-helper.ts @@ -8,7 +8,7 @@ import * as path from 'path' import * as regexpHelper from './regexp-helper' import * as stateHelper from './state-helper' import * as urlHelper from './url-helper' -import {default as uuid} from 'uuid/v4' +import {v4 as uuid} from 'uuid' import {IGitCommandManager} from './git-command-manager' import {IGitSourceSettings} from './git-source-settings' @@ -49,7 +49,7 @@ class GitAuthHelper { gitSourceSettings: IGitSourceSettings | undefined ) { this.git = gitCommandManager - this.settings = gitSourceSettings || (({} as unknown) as IGitSourceSettings) + this.settings = gitSourceSettings || ({} as unknown as IGitSourceSettings) // Token auth header const serverUrl = urlHelper.getServerUrl(this.settings.githubServerUrl) diff --git a/src/github-api-helper.ts b/src/github-api-helper.ts index b6bfc13..8eb65d1 100644 --- a/src/github-api-helper.ts +++ b/src/github-api-helper.ts @@ -6,7 +6,7 @@ import * as io from '@actions/io' import * as path from 'path' import * as retryHelper from './retry-helper' import * as toolCache from '@actions/tool-cache' -import {default as uuid} from 'uuid/v4' +import {v4 as uuid} from 'uuid' import {getServerApiUrl} from './url-helper' const IS_WINDOWS = process.platform === 'win32' diff --git a/src/input-helper.ts b/src/input-helper.ts index e230a55..059232f 100644 --- a/src/input-helper.ts +++ b/src/input-helper.ts @@ -6,7 +6,7 @@ import * as workflowContextHelper from './workflow-context-helper' import {IGitSourceSettings} from './git-source-settings' export async function getInputs(): Promise<IGitSourceSettings> { - const result = ({} as unknown) as IGitSourceSettings + const result = {} as unknown as IGitSourceSettings // GitHub workspace let githubWorkspacePath = process.env['GITHUB_WORKSPACE'] @@ -150,7 +150,8 @@ export async function getInputs(): Promise<IGitSourceSettings> { (core.getInput('persist-credentials') || 'false').toUpperCase() === 'TRUE' // Workflow organization ID - result.workflowOrganizationId = await workflowContextHelper.getOrganizationId() + result.workflowOrganizationId = + await workflowContextHelper.getOrganizationId() // Set safe.directory in git global config. result.setSafeDirectory = diff --git a/src/misc/generate-docs.ts b/src/misc/generate-docs.ts index 5e67969..4b3c8ff 100644 --- a/src/misc/generate-docs.ts +++ b/src/misc/generate-docs.ts @@ -20,7 +20,7 @@ function updateUsage( } // Load the action.yml - const actionYaml = yaml.safeLoad(fs.readFileSync(actionYamlPath).toString()) + const actionYaml = yaml.load(fs.readFileSync(actionYamlPath).toString()) // Load the README const originalReadme = fs.readFileSync(readmePath).toString() diff --git a/src/ref-helper.ts b/src/ref-helper.ts index 1c25049..047e906 100644 --- a/src/ref-helper.ts +++ b/src/ref-helper.ts @@ -23,7 +23,7 @@ export async function getCheckoutInfo( throw new Error('Args ref and commit cannot both be empty') } - const result = ({} as unknown) as ICheckoutInfo + const result = {} as unknown as ICheckoutInfo const upperRef = (ref || '').toUpperCase() // SHA only diff --git a/src/workflow-context-helper.ts b/src/workflow-context-helper.ts index c7d7918..5b342e6 100644 --- a/src/workflow-context-helper.ts +++ b/src/workflow-context-helper.ts @@ -23,8 +23,9 @@ export async function getOrganizationId(): Promise<number | undefined> { return id as number } catch (err) { core.debug( - `Unable to load organization ID from GITHUB_EVENT_PATH: ${(err as any) - .message || err}` + `Unable to load organization ID from GITHUB_EVENT_PATH: ${ + (err as any).message || err + }` ) } } |
