Skip to content

Commit

Permalink
Add new files and update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
milespetrov committed Mar 8, 2024
1 parent 34e5902 commit 1620b28
Show file tree
Hide file tree
Showing 15 changed files with 284 additions and 23 deletions.
47 changes: 47 additions & 0 deletions dist/constants.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions dist/lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions dist/lint-check.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions dist/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions dist/prettier-check.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions dist/ts-check.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"scripts": {
"build": "ncc build src/main.ts -o dist --source-map ",
"typecheck": "tsc ./src/bad-file.ts --pretty",
"typecheck": "tsc --pretty",
"prettiercheck": "prettier . -c",
"format:write": "npx prettier --write .",
"format:check": "npx prettier --check .",
Expand Down
4 changes: 2 additions & 2 deletions src/lib.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import download from 'download'
import StreamZip from 'node-stream-zip'
import * as download from 'download'
import * as StreamZip from 'node-stream-zip'
import type { Octokit, ActionInterface } from './constants.js'
import { info, notice } from '@actions/core'

Expand Down
4 changes: 2 additions & 2 deletions src/lint-check.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import exec from '@actions/exec'
import { getExecOutput } from '@actions/exec'
import { info, warning, startGroup, endGroup, notice } from '@actions/core'
import type { ActionInterface, LintResults } from './constants.js'

Expand Down Expand Up @@ -41,7 +41,7 @@ async function compareOutput(
}

async function lintCheck(command: string): Promise<LintResults> {
const result = await exec.getExecOutput(`${command} --format=json`, [], {
const result = await getExecOutput(`${command} --format=json`, [], {
ignoreReturnCode: true,
silent: true
})
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { run as lintRun } from './lint-check.js'
import { run as prettierRun } from './prettier-check.js'
import { DefaultArtifactClient } from '@actions/artifact'
import { warning, setFailed, setOutput } from '@actions/core'
import fs from 'fs'
import { writeFileSync } from 'fs'
import { findAndExtractArtifact, results } from './lib.js'
import { createAction } from './constants.js'

Expand All @@ -28,7 +28,7 @@ results.ts.errors = tsResults.errors
results.lint = lintResults
results.prettierWarning = prettierResults.failed

fs.writeFileSync('status-results.json', JSON.stringify(results))
writeFileSync('status-results.json', JSON.stringify(results))
await artifactClient.uploadArtifact(action.sha, ['status-results.json'], '.')

setOutput('ts-errors', results.ts.errors)
Expand Down
4 changes: 2 additions & 2 deletions src/prettier-check.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import exec from '@actions/exec'
import { getExecOutput } from '@actions/exec'
import { notice, warning } from '@actions/core'
import type { ActionInterface, PrettierResults } from './constants.js'

export async function run(action: ActionInterface): Promise<PrettierResults> {
const result = await exec.getExecOutput(action.inputs.formatCommand, [], {
const result = await getExecOutput(action.inputs.formatCommand, [], {
ignoreReturnCode: true,
silent: true
})
Expand Down
Loading

0 comments on commit 1620b28

Please sign in to comment.