diff --git a/__tests__/command.test.ts b/__tests__/command.test.ts index c5bb1dd..b650a61 100644 --- a/__tests__/command.test.ts +++ b/__tests__/command.test.ts @@ -17,7 +17,7 @@ describe('@actions/core/src/command', () => { afterEach(() => {}) afterAll(() => { - process.stdout.write = (originalWriteFunction as unknown) as ( + process.stdout.write = originalWriteFunction as unknown as ( str: string ) => boolean }) @@ -51,8 +51,7 @@ describe('@actions/core/src/command', () => { command.issueCommand( 'some-command', { - name: - 'percent % percent % cr \r cr \r lf \n lf \n colon : colon : comma , comma ,' + name: 'percent % percent % cr \r cr \r lf \n lf \n colon : colon : comma , comma ,' }, '' ) @@ -117,11 +116,11 @@ describe('@actions/core/src/command', () => { command.issueCommand( 'some-command', { - prop1: ({test: 'object'} as unknown) as string, - prop2: (123 as unknown) as string, - prop3: (true as unknown) as string + prop1: {test: 'object'} as unknown as string, + prop2: 123 as unknown as string, + prop3: true as unknown as string }, - ({test: 'object'} as unknown) as string + {test: 'object'} as unknown as string ) assertWriteCalls([ `::some-command prop1={"test"%3A"object"},prop2=123,prop3=true::{"test":"object"}${os.EOL}` diff --git a/__tests__/summary.test.ts b/__tests__/summary.test.ts index c13b017..b7798de 100644 --- a/__tests__/summary.test.ts +++ b/__tests__/summary.test.ts @@ -150,10 +150,7 @@ describe('@actions/core/src/summary', () => { }) it('adds EOL', async () => { - await summary - .addRaw(fixtures.text) - .addEOL() - .write() + await summary.addRaw(fixtures.text).addEOL().write() await assertSummary(fixtures.text + os.EOL) }) diff --git a/package-lock.json b/package-lock.json index 1e36713..4652aea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,9 +18,9 @@ } }, "node_modules/@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz", + "integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==", "dependencies": { "tunnel": "^0.0.6" } @@ -56,9 +56,9 @@ }, "dependencies": { "@actions/http-client": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz", - "integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz", + "integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==", "requires": { "tunnel": "^0.0.6" } diff --git a/package.json b/package.json index 1f3824d..629b4a2 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "scripts": { "audit-moderate": "npm install && npm audit --json --audit-level=moderate > audit.json", "test": "echo \"Error: run tests from root\" && exit 1", - "tsc": "tsc" + "tsc": "tsc -p tsconfig.json" }, "bugs": { "url": "https://github.com/actions/toolkit/issues" @@ -43,4 +43,4 @@ "@types/node": "^12.0.2", "@types/uuid": "^8.3.4" } -} +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index a8b812a..3bb20cf 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,6 +3,7 @@ "compilerOptions": { "baseUrl": "./", "outDir": "./lib", + "declaration": true, "rootDir": "./src" }, "include": [