Skip to content

Commit

Permalink
chore: Upgrade dependencies (node + @actions/core) (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrink committed Oct 27, 2022
1 parent 1464c7d commit 7872339
Show file tree
Hide file tree
Showing 8 changed files with 3,724 additions and 3,101 deletions.
10 changes: 3 additions & 7 deletions __tests__/execute.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,13 @@ describe('AggregateResult', () => {
})

it('does not pass when only result did not pass', () => {
const aggregateResult = new AggregateResult([
{pass: false, message: ''},
])
const aggregateResult = new AggregateResult([{pass: false, message: ''}])

expect(aggregateResult.pass).toStrictEqual(false)
})

it('passed when only result passed', () => {
const aggregateResult = new AggregateResult([
{pass: true, message: ''},
])
const aggregateResult = new AggregateResult([{pass: true, message: ''}])

expect(aggregateResult.pass).toStrictEqual(true)
})
Expand All @@ -119,7 +115,7 @@ describe('AggregateResult', () => {
{pass: true, message: 'Message c'}
])

const expectedMessage = 'Message a\nMessage b\nMessage c';
const expectedMessage = 'Message a\nMessage b\nMessage c'

expect(aggregateResult.message).toStrictEqual(expectedMessage)
})
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ outputs:
error:
description: "Error message (if any) that has been output to the log"
runs:
using: "node12"
using: "node16"
main: "dist/index.js"
6,790 changes: 3,706 additions & 3,084 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"test": "jest",
"style": "npm run format && npm run lint"
},
"engines": {
"node": ">=16.0.0"
},
"keywords": [
"actions",
"github-actions",
Expand All @@ -19,19 +22,20 @@
"author": "Samuel Ryan <sam@samryan.co.uk>",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.3.0",
"live-plugin-manager": "^0.15.1",
"@actions/core": "^1.10.0",
"live-plugin-manager": "^0.17.0",
"minipass": "^3.3.5",
"superstruct": "^0.15.2"
},
"devDependencies": {
"@pr-mpt/assertions-is-equal": "^0.1.0",
"@types/jest": "^26.0.15",
"@types/node": "^14.14.9",
"@typescript-eslint/parser": "^4.8.1",
"@typescript-eslint/parser": "^5",
"@vercel/ncc": "^0.25.1",
"eslint": "^7.17.0",
"eslint": "^8",
"eslint-plugin-github": "^4.1.1",
"eslint-plugin-jest": "^24.1.3",
"eslint-plugin-jest": "^26",
"jest": "^26.6.3",
"jest-circus": "^26.6.3",
"js-yaml": "^3.14.0",
Expand Down
4 changes: 2 additions & 2 deletions src/assertions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import {Assertion} from './execute'
import {PluginManager} from 'live-plugin-manager'

async function loadAssertionFromNpmPackage(name: string): Promise<Assertion> {
const manager = new PluginManager();
const manager = new PluginManager()

const [packageName, version = 'v1'] = name.split(':');
const [packageName, version = 'v1'] = name.split(':')

await manager.install(packageName, version)

Expand Down
1 change: 1 addition & 0 deletions src/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface Result {
}

export interface Assertion {
// eslint-disable-next-line @typescript-eslint/prefer-function-type
(expected: unknown, actual: unknown): Result
}

Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async function run(): Promise<void> {
core.setOutput('pass', aggregateResult.pass.toString())
core.setOutput('passed', aggregateResult.pass.toString())
core.setOutput('failed', (!aggregateResult.pass).toString())
} catch (error) {
} catch (error: any) {
core.setFailed(error.message)
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {env} from 'process'
export function hasActionInput(name: string): boolean {
const key = `INPUT_${name.replace(/ /g, '_').toUpperCase()}`

if (core.getBooleanInput('convert-empty-to-null') && env[key] == '') {
if (core.getBooleanInput('convert-empty-to-null') && env[key] === '') {
return false
}

Expand Down

0 comments on commit 7872339

Please sign in to comment.