Browse Source

Chore: housekeeping

SukkaW 2 years ago
parent
commit
f88c3648a2
3 changed files with 9 additions and 10 deletions
  1. 5 7
      Build/index.ts
  2. BIN
      bun.lockb
  3. 4 3
      package.json

+ 5 - 7
Build/index.ts

@@ -82,7 +82,7 @@ const endWorker = async <T>(worker: WithWorker<T>) => {
     const buildRedirectModulePromise = downloadPreviousBuildPromise.then(() => buildRedirectModule());
     const buildRedirectModulePromise = downloadPreviousBuildPromise.then(() => buildRedirectModule());
     const buildStreamServicePromise = downloadPreviousBuildPromise.then(() => buildStreamService());
     const buildStreamServicePromise = downloadPreviousBuildPromise.then(() => buildStreamService());
 
 
-    const stats: Array<{ start: number, end: number, taskName: string }> = await Promise.all([
+    const stats = await Promise.all([
       downloadPreviousBuildPromise,
       downloadPreviousBuildPromise,
       downloadPublicSuffixListPromise,
       downloadPublicSuffixListPromise,
       buildCommonPromise,
       buildCommonPromise,
@@ -118,13 +118,11 @@ const endWorker = async <T>(worker: WithWorker<T>) => {
 function printStats(stats: Array<{ start: number, end: number, taskName: string }>): void {
 function printStats(stats: Array<{ start: number, end: number, taskName: string }>): void {
   stats.sort((a, b) => a.start - b.start);
   stats.sort((a, b) => a.start - b.start);
 
 
-  const longestTaskName: number = Math.max(...stats.map(i => i.taskName.length));
-  const realStart: number = Math.min(...stats.map(i => i.start));
-  const realEnd: number = Math.max(...stats.map(i => i.end));
+  const longestTaskName = Math.max(...stats.map(i => i.taskName.length));
+  const realStart = Math.min(...stats.map(i => i.start));
+  const realEnd = Math.max(...stats.map(i => i.end));
 
 
-  const totalMs: number = realEnd - realStart;
-
-  const statsStep: number = (totalMs / 160) | 0;
+  const statsStep = ((realEnd - realStart) / 160) | 0;
 
 
   stats.forEach(stat => {
   stats.forEach(stat => {
     console.log(
     console.log(

BIN
bun.lockb


+ 4 - 3
package.json

@@ -32,13 +32,14 @@
     "tldts": "^6.0.19"
     "tldts": "^6.0.19"
   },
   },
   "devDependencies": {
   "devDependencies": {
-    "@eslint-sukka/node": "^4.1.7",
+    "@eslint-sukka/node": "4.1.9",
+    "@eslint-sukka/ts": "4.1.9",
     "@types/mocha": "10.0.2",
     "@types/mocha": "10.0.2",
     "@types/tar": "^6.1.9",
     "@types/tar": "^6.1.9",
     "bun-types": "^1.0.11",
     "bun-types": "^1.0.11",
     "chai": "4.3.10",
     "chai": "4.3.10",
-    "eslint-config-sukka": "4.1.7",
-    "eslint-formatter-sukka": "4.1.7",
+    "eslint-config-sukka": "4.1.9",
+    "eslint-formatter-sukka": "4.1.9",
     "mocha": "^10.2.0",
     "mocha": "^10.2.0",
     "typescript": "^5.2.2"
     "typescript": "^5.2.2"
   },
   },