Skip to content

Commit

Permalink
Use esnext, update typescript, remove color-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
spalmurray-codecov committed Feb 14, 2025
1 parent cdee474 commit 30ef2e1
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 53 deletions.
56 changes: 13 additions & 43 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"@sentry/browser": "^9.1.0",
"clsx": "^1.2.1",
"code-tag": "^1.1.0",
"color-alpha": "^1.1.3",
"dom-chef": "^5.1.0",
"lodash": "^4.17.21",
"react": "^18.2.0",
Expand Down Expand Up @@ -47,7 +46,7 @@
"tailwindcss": "^3.2.7",
"ts-loader": "^8.0.0",
"tsconfig-paths-webpack-plugin": "^4.0.1",
"typescript": "^4.4.3 ",
"typescript": "^5.7.3",
"webpack": "^5.76.0",
"webpack-cli": "^4.0.0",
"webpack-merge": "^5.0.0"
Expand Down
5 changes: 4 additions & 1 deletion src/content/github/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ export const animationAttachmentId = `${animationName}-attachment`;
export const seenClassName = "codecov-seen-mark";

export const colors = {
redAlpha: "rgba(245,32,32,0.25)",
greenAlpha: "rgba(33,181,119,0.25)",
yellowAlpha: "rgba(244,176,27,0.25)",
red: "rgb(245,32,32)",
green: "rgb(33,181,119)",
yellow: "rgb(244,176,27)",
yellow: "rgba(244,176,27)",
};
7 changes: 3 additions & 4 deletions src/content/github/file/main.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import browser from "webextension-polyfill";
import alpha from "color-alpha";
import Drop from "tether-drop";
import _ from "lodash";
import "tether-drop/dist/css/drop-theme-arrows.css";
Expand Down Expand Up @@ -353,11 +352,11 @@ function annotateLine(line: HTMLElement) {
}
const status = globals.coverageReport[lineNumber];
if (status === CoverageStatus.COVERED) {
line.style.backgroundColor = alpha(colors.green, 0.25);
line.style.backgroundColor = colors.greenAlpha;
} else if (status === CoverageStatus.UNCOVERED) {
line.style.backgroundColor = alpha(colors.red, 0.25);
line.style.backgroundColor = colors.redAlpha;
} else if (status === CoverageStatus.PARTIAL) {
line.style.backgroundColor = alpha(colors.yellow, 0.25);
line.style.backgroundColor = colors.yellowAlpha;
} else {
line.style.backgroundColor = "inherit";
}
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"strict": true,
"module": "es6",
"target": "es6",
"module": "esnext",
"target": "esnext",
"esModuleInterop": true,
"sourceMap": false,
"baseUrl": "./",
Expand All @@ -16,6 +16,6 @@
"noEmitOnError": true,
"jsx": "react",
"typeRoots": ["node_modules/@types"],
"moduleResolution": "node"
"moduleResolution": "bundler"
}
}

0 comments on commit 30ef2e1

Please sign in to comment.