@akashic/headless-driver 2.17.0 → 2.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Looper.js CHANGED
@@ -4,7 +4,7 @@ exports.Looper = void 0;
4
4
  class Looper {
5
5
  constructor(fun, errorHandler) {
6
6
  this._fun = fun;
7
- this._timerId = null;
7
+ this._timerId = undefined;
8
8
  this._prev = 0;
9
9
  this._errorHandler = errorHandler;
10
10
  this._running = false;
@@ -72,7 +72,7 @@ class Looper {
72
72
  clearInterval(this._timerId);
73
73
  }
74
74
  this._running = false;
75
- this._timerId = null;
75
+ this._timerId = undefined;
76
76
  this._prev = 0;
77
77
  }
78
78
  }
@@ -66,7 +66,7 @@ export declare abstract class Runner {
66
66
  [key: string]: any;
67
67
  } | undefined;
68
68
  protected timekeeper: TimeKeeper;
69
- protected timekeeperTimerId: NodeJS.Timer | null;
69
+ protected timekeeperTimerId: NodeJS.Timeout | undefined;
70
70
  protected timekeeperPrevTime: number;
71
71
  constructor(params: RunnerParameters);
72
72
  /**
@@ -70,7 +70,7 @@ class Runner {
70
70
  this.errorTrigger = new trigger_1.Trigger();
71
71
  this.sendToExternalTrigger = new trigger_1.Trigger();
72
72
  this.timekeeper = new TimeKeeper_1.TimeKeeper();
73
- this.timekeeperTimerId = null;
73
+ this.timekeeperTimerId = undefined;
74
74
  this.timekeeperPrevTime = 0;
75
75
  this.params = params;
76
76
  }
@@ -139,7 +139,7 @@ class Runner {
139
139
  return;
140
140
  }
141
141
  clearInterval(this.timekeeperTimerId);
142
- this.timekeeperTimerId = null;
142
+ this.timekeeperTimerId = undefined;
143
143
  }
144
144
  onError(error) {
145
145
  this.errorTrigger.fire(error);
@@ -128,7 +128,7 @@ class RunnerManager {
128
128
  }
129
129
  runner.errorTrigger.add((err) => {
130
130
  (0, Logger_1.getSystemLogger)().error(err);
131
- this.stopRunner(runnerId);
131
+ void this.stopRunner(runnerId);
132
132
  return true;
133
133
  });
134
134
  this.runners.push(runner);
@@ -186,7 +186,7 @@ class RunnerV3 extends Runner_1.Runner {
186
186
  initGameDriver() {
187
187
  return new Promise((resolve, reject) => {
188
188
  if (this.driver) {
189
- this.driver.destroy();
189
+ void this.driver.destroy();
190
190
  this.driver = null;
191
191
  }
192
192
  const player = {
@@ -6,7 +6,6 @@ class NodeCanvasFactory {
6
6
  this.renderingMode = renderingMode;
7
7
  // NOTE: このファイルの require() 時点で不要な依存モジュールを読み込ませないよう、動的に require() する。
8
8
  // "canvas" と "@napi-rs/canvas" は (このライブラリで使う部分では) API が互換なのでそのまま流用している。
9
- // eslint-disable-next-line @typescript-eslint/no-var-requires
10
9
  this.module = require(this.renderingMode === "canvas" ? "canvas" : "@napi-rs/canvas");
11
10
  }
12
11
  createCanvas(width, height) {
package/lib/utils.js CHANGED
@@ -22,7 +22,8 @@ function loadFile(url_1) {
22
22
  const promise = new Promise((resolve, reject) => {
23
23
  waitings.push({ url, encoding, resolve, reject });
24
24
  });
25
- processWaitingLoad();
25
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
26
+ processWaitingLoad(); // TODO: processWaitingLoad() を async でなくする
26
27
  return promise;
27
28
  });
28
29
  }
@@ -40,7 +41,8 @@ function processWaitingLoad() {
40
41
  }
41
42
  finally {
42
43
  --loadingCount;
43
- processWaitingLoad();
44
+ // eslint-disable-next-line @typescript-eslint/no-floating-promises
45
+ processWaitingLoad(); // TODO: processWaitingLoad() を async でなくする
44
46
  }
45
47
  });
46
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akashic/headless-driver",
3
- "version": "2.17.0",
3
+ "version": "2.17.2",
4
4
  "description": "A library to execute contents using Akashic Engine headlessly",
5
5
  "main": "lib/index.js",
6
6
  "author": "DWANGO Co., Ltd.",
@@ -29,27 +29,23 @@
29
29
  "@akashic/trigger": "^2.0.0",
30
30
  "engine-files-v1": "npm:@akashic/engine-files@1.4.0",
31
31
  "engine-files-v2": "npm:@akashic/engine-files@2.4.0",
32
- "engine-files-v3": "npm:@akashic/engine-files@3.12.0",
32
+ "engine-files-v3": "npm:@akashic/engine-files@3.12.2",
33
33
  "js-sha256": "^0.11.0",
34
34
  "lodash.clonedeep": "^4.5.0",
35
35
  "node-fetch": "^2.6.7"
36
36
  },
37
37
  "devDependencies": {
38
- "@akashic/eslint-config": "^2.0.0",
38
+ "@akashic/eslint-config": "^3.0.0",
39
39
  "@akashic/remark-preset-lint": "^0.1.2",
40
40
  "@napi-rs/canvas": "^0.1.66",
41
41
  "@types/jest": "^29.1.1",
42
42
  "@types/lodash.clonedeep": "^4.5.7",
43
- "@types/node": "^18.7.23",
43
+ "@types/node": "^22.0.0",
44
44
  "@types/node-fetch": "^2.6.2",
45
45
  "@types/pixelmatch": "^5.2.4",
46
46
  "@types/pngjs": "^6.0.1",
47
- "@typescript-eslint/eslint-plugin": "^6.12.0",
48
47
  "canvas": "^3.1.0",
49
- "eslint": "^8.54.0",
50
- "eslint-config-prettier": "^9.0.0",
51
- "eslint-plugin-import": "^2.29.0",
52
- "eslint-plugin-jest": "^27.6.0",
48
+ "eslint-config-prettier": "^10.0.0",
53
49
  "get-port": "^5.1.1",
54
50
  "image-size": "^1.0.2",
55
51
  "jest": "^29.1.2",