@travetto/compiler 5.0.0-rc.1 → 5.0.0-rc.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/compiler",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.2",
|
|
4
4
|
"description": "The compiler infrastructure for the Travetto framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"compiler",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@parcel/watcher": "^2.4.1",
|
|
34
34
|
"@travetto/manifest": "^5.0.0-rc.1",
|
|
35
|
-
"@travetto/transformer": "^5.0.0-rc.
|
|
35
|
+
"@travetto/transformer": "^5.0.0-rc.1",
|
|
36
36
|
"@types/node": "^20.14.10"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
@@ -16,12 +16,6 @@ export class ProcessHandle {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
async writePid(pid: number): Promise<void> {
|
|
19
|
-
const current = await this.getPid();
|
|
20
|
-
if (!process.env.TRV_BUILD_REENTRANT && current && pid !== current && current > 0) {
|
|
21
|
-
try {
|
|
22
|
-
process.kill(current);
|
|
23
|
-
} catch { }
|
|
24
|
-
}
|
|
25
19
|
await fs.mkdir(path.dirname(this.#file), { recursive: true });
|
|
26
20
|
return fs.writeFile(this.#file, JSON.stringify(pid), 'utf8');
|
|
27
21
|
}
|
package/support/server/server.ts
CHANGED
|
@@ -191,6 +191,10 @@ export class CompilerServer {
|
|
|
191
191
|
if (ev.type === 'state') {
|
|
192
192
|
this.info.state = ev.payload.state;
|
|
193
193
|
if (ev.payload.state === 'init' && ev.payload.extra && 'pid' in ev.payload.extra && typeof ev.payload.extra.pid === 'number') {
|
|
194
|
+
if (this.info.mode === 'watch' && !this.info.compilerPid) {
|
|
195
|
+
// Ensure we are killing in watch mode on first set
|
|
196
|
+
await this.#handle.compiler.kill();
|
|
197
|
+
}
|
|
194
198
|
this.info.compilerPid = ev.payload.extra.pid;
|
|
195
199
|
await this.#handle.compiler.writePid(this.info.compilerPid);
|
|
196
200
|
}
|