Skip to content

Commit a5f9494

Browse files
fix: bump typescript from 4.3.2 to 4.9.5 (#314)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Shin'ya Ueoka <[email protected]>
1 parent e700d17 commit a5f9494

6 files changed

Lines changed: 24 additions & 9 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
${{ runner.os }}-yarn-
2323
2424
- run: yarn install --frozen-lockfile
25+
- run: yarn lint
2526
- run: yarn build
2627
- run: yarn package
2728
- uses: actions/upload-artifact@v3

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"eslint-config-prettier": "^8.6.0",
1818
"eslint-plugin-prettier": "^4.2.1",
1919
"prettier": "^2.8.4",
20-
"typescript": "^4.3.2"
20+
"typescript": "^4.9.5"
2121
},
2222
"scripts": {
2323
"build": "ncc build src/index.ts",

src/channel_windows.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ import * as exec from "@actions/exec";
66
import * as core from "@actions/core";
77
import fs from "fs";
88

9+
const isENOENT = (e: unknown): boolean => {
10+
return (
11+
typeof e === "object" && e !== null && "code" in e && e.code === "ENOENT"
12+
);
13+
};
14+
915
export class WindowsChannelInstaller implements Installer {
1016
constructor(private readonly platform: Platform) {}
1117

@@ -18,7 +24,7 @@ export class WindowsChannelInstaller implements Installer {
1824
try {
1925
await fs.promises.stat(root);
2026
} catch (e) {
21-
if (e.code === "ENOENT") {
27+
if (isENOENT(e)) {
2228
return undefined;
2329
}
2430
throw e;

src/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ import * as installer from "./installer";
55
import { getPlatform, OS } from "./platform";
66
import path from "path";
77

8+
const hasErrorMessage = (e: unknown): e is { message: string | Error } => {
9+
return typeof e === "object" && e !== null && "message" in e;
10+
};
11+
812
async function run(): Promise<void> {
913
try {
1014
const version = core.getInput("chrome-version") || "latest";
@@ -26,7 +30,11 @@ async function run(): Promise<void> {
2630
await exec.exec(binName, ["--version"]);
2731
}
2832
} catch (error) {
29-
core.setFailed(error.message);
33+
if (hasErrorMessage(error)) {
34+
core.setFailed(error.message);
35+
} else {
36+
core.setFailed(String(error));
37+
}
3038
}
3139
}
3240

src/platform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const OS = {
1212
} as const;
1313

1414
// eslint-disable-next-line no-redeclare
15-
export type OS = typeof OS[keyof typeof OS];
15+
export type OS = (typeof OS)[keyof typeof OS];
1616

1717
export const Arch = {
1818
AMD64: "amd64",
@@ -21,7 +21,7 @@ export const Arch = {
2121
} as const;
2222

2323
// eslint-disable-next-line no-redeclare
24-
export type Arch = typeof Arch[keyof typeof Arch];
24+
export type Arch = (typeof Arch)[keyof typeof Arch];
2525

2626
export const getOS = (): OS => {
2727
const platform = os.platform();

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,10 +1047,10 @@ type-fest@^0.20.2:
10471047
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"
10481048
integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==
10491049

1050-
typescript@^4.3.2:
1051-
version "4.3.2"
1052-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805"
1053-
integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==
1050+
typescript@^4.9.5:
1051+
version "4.9.5"
1052+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
1053+
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
10541054

10551055
uri-js@^4.2.2:
10561056
version "4.4.0"

0 commit comments

Comments
 (0)