From 1f8b83ba1aafd2c25c24c00eb7a117588a34b3f9 Mon Sep 17 00:00:00 2001 From: Steven Guerrero Date: Mon, 25 Jan 2021 11:30:31 -0500 Subject: feat(std/node): Add support for process.on("exit") (#8940) This commit adds support for process.on("exit") by appending a listener to the unload event. Luckily, unload works pretty much the same as on("exit") since it won't schedule any additional work in the even loop either. This commit also solves an error in the Node implementation, since "process.argv" didn't contained the main module route as it was supposed to. --- std/node/global.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'std/node/global.ts') diff --git a/std/node/global.ts b/std/node/global.ts index a07a892e5..550f6ddf9 100644 --- a/std/node/global.ts +++ b/std/node/global.ts @@ -1,6 +1,6 @@ // Copyright 2018-2021 the Deno authors. All rights reserved. MIT license. /// -import { process as processModule } from "./process.ts"; +import processModule from "./process.ts"; import { Buffer as bufferModule } from "./buffer.ts"; import timers from "./timers.ts"; -- cgit v1.2.3