Skip to content

Commit 30ef2e1

Browse files
committed
Use esnext, update typescript, remove color-alpha
1 parent cdee474 commit 30ef2e1

File tree

5 files changed

+24
-53
lines changed

5 files changed

+24
-53
lines changed

package-lock.json

Lines changed: 13 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"@sentry/browser": "^9.1.0",
1818
"clsx": "^1.2.1",
1919
"code-tag": "^1.1.0",
20-
"color-alpha": "^1.1.3",
2120
"dom-chef": "^5.1.0",
2221
"lodash": "^4.17.21",
2322
"react": "^18.2.0",
@@ -47,7 +46,7 @@
4746
"tailwindcss": "^3.2.7",
4847
"ts-loader": "^8.0.0",
4948
"tsconfig-paths-webpack-plugin": "^4.0.1",
50-
"typescript": "^4.4.3 ",
49+
"typescript": "^5.7.3",
5150
"webpack": "^5.76.0",
5251
"webpack-cli": "^4.0.0",
5352
"webpack-merge": "^5.0.0"

src/content/github/common/constants.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ export const animationAttachmentId = `${animationName}-attachment`;
77
export const seenClassName = "codecov-seen-mark";
88

99
export const colors = {
10+
redAlpha: "rgba(245,32,32,0.25)",
11+
greenAlpha: "rgba(33,181,119,0.25)",
12+
yellowAlpha: "rgba(244,176,27,0.25)",
1013
red: "rgb(245,32,32)",
1114
green: "rgb(33,181,119)",
12-
yellow: "rgb(244,176,27)",
15+
yellow: "rgba(244,176,27)",
1316
};

src/content/github/file/main.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import browser from "webextension-polyfill";
2-
import alpha from "color-alpha";
32
import Drop from "tether-drop";
43
import _ from "lodash";
54
import "tether-drop/dist/css/drop-theme-arrows.css";
@@ -353,11 +352,11 @@ function annotateLine(line: HTMLElement) {
353352
}
354353
const status = globals.coverageReport[lineNumber];
355354
if (status === CoverageStatus.COVERED) {
356-
line.style.backgroundColor = alpha(colors.green, 0.25);
355+
line.style.backgroundColor = colors.greenAlpha;
357356
} else if (status === CoverageStatus.UNCOVERED) {
358-
line.style.backgroundColor = alpha(colors.red, 0.25);
357+
line.style.backgroundColor = colors.redAlpha;
359358
} else if (status === CoverageStatus.PARTIAL) {
360-
line.style.backgroundColor = alpha(colors.yellow, 0.25);
359+
line.style.backgroundColor = colors.yellowAlpha;
361360
} else {
362361
line.style.backgroundColor = "inherit";
363362
}

tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
33
"strict": true,
4-
"module": "es6",
5-
"target": "es6",
4+
"module": "esnext",
5+
"target": "esnext",
66
"esModuleInterop": true,
77
"sourceMap": false,
88
"baseUrl": "./",
@@ -16,6 +16,6 @@
1616
"noEmitOnError": true,
1717
"jsx": "react",
1818
"typeRoots": ["node_modules/@types"],
19-
"moduleResolution": "node"
19+
"moduleResolution": "bundler"
2020
}
2121
}

0 commit comments

Comments
 (0)