@travetto/compiler 4.0.6 → 4.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/compiler",
3
- "version": "4.0.6",
3
+ "version": "4.0.8",
4
4
  "description": "The compiler infrastructure for the Travetto framework",
5
5
  "keywords": [
6
6
  "compiler",
@@ -30,13 +30,13 @@
30
30
  "directory": "module/compiler"
31
31
  },
32
32
  "dependencies": {
33
- "@parcel/watcher": "^2.4.0",
34
- "@travetto/manifest": "^4.0.1",
35
- "@travetto/transformer": "^4.0.2",
36
- "@types/node": "^20.11.16"
33
+ "@parcel/watcher": "^2.4.1",
34
+ "@travetto/manifest": "^4.0.2",
35
+ "@travetto/transformer": "^4.0.3",
36
+ "@types/node": "^20.11.25"
37
37
  },
38
38
  "peerDependencies": {
39
- "@travetto/cli": "^4.0.4"
39
+ "@travetto/cli": "^4.0.6"
40
40
  },
41
41
  "peerDependenciesMeta": {
42
42
  "@travetto/cli": {
@@ -56,7 +56,7 @@ export class ProcessHandle {
56
56
  if (!await this.isRunning()) {
57
57
  return true;
58
58
  }
59
- await CommonUtil.nonBlockingTimeout(100);
59
+ await CommonUtil.blockingTimeout(100);
60
60
  }
61
61
  try {
62
62
  this.#log.debug('Force Killing', pid);
@@ -121,7 +121,7 @@ export class CompilerServer {
121
121
  async #disconnectActive(): Promise<void> {
122
122
  log.info('Server disconnect requested');
123
123
  this.info.iteration = Date.now();
124
- await CommonUtil.nonBlockingTimeout(20);
124
+ await CommonUtil.blockingTimeout(20);
125
125
  for (const el of Object.values(this.#listeners)) {
126
126
  try { el.res.end(); } catch { }
127
127
  }
package/support/util.ts CHANGED
@@ -59,12 +59,19 @@ export class CommonUtil {
59
59
  }
60
60
 
61
61
  /**
62
- * Non-blocking timeout, that is cancellable
62
+ * Non-blocking timeout
63
63
  */
64
64
  static nonBlockingTimeout(time: number): Promise<void> {
65
65
  return timers.setTimeout(time, undefined, { ref: false }).catch(() => { });
66
66
  }
67
67
 
68
+ /**
69
+ * Blocking timeout
70
+ */
71
+ static blockingTimeout(time: number): Promise<void> {
72
+ return timers.setTimeout(time, undefined, { ref: true }).catch(() => { });
73
+ }
74
+
68
75
  /**
69
76
  * Queue new macrotask
70
77
  */
package/tsconfig.trv.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "compilerOptions": {
3
3
  "module": "CommonJS",
4
4
  "target": "esnext",
5
- "moduleResolution": "node",
5
+ "moduleResolution": "Bundler",
6
6
  "lib": [
7
7
  "es2022"
8
8
  ],