New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

inits

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inits - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

test/empty.js

7

lib/initSystem.js

@@ -195,2 +195,9 @@ 'use strict';

});
process.on('exit', function()
{
if (!shuttingDown && self.options.showErrors)
{
self.log.warning('Unexpected exit, please see documentation: https://github.com/alexfernandez/inits#unexpected-exit');
}
});
}

@@ -197,0 +204,0 @@ if (self.options.catchSignals)

2

package.json
{
"name": "inits",
"version": "0.1.6",
"version": "0.1.7",
"description": "Init system for Node.js.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/alexfernandez/inits",

@@ -53,2 +53,5 @@ [![Build Status](https://secure.travis-ci.org/alexfernandez/inits.png)](http://travis-ci.org/alexfernandez/inits)

An additional advantage of using `inits` is that all initialization code runs in a domain,
thus catching errors and uncaught exceptions.
## API

@@ -284,2 +287,21 @@

### Unexpected Exit
In Node.js v0.12.x and io.js, there is an event
[beforeExit](https://nodejs.org/api/process.html#process_event_beforeexit)
that can be used to force an ordered shutdown when there is nothing else to do
and the event loop empties.
However in Node.js v0.10.x there is no official way to catch this situation;
the process can just finish without running the `stop` or `finish` callbacks.
rather than rely on complex intervals we have opted to just
let Node.js finish, but alert the user about this.
If you don't want your process to exit unexpectedly you can use a `standalone` callback.
You may also create a `setInterval()`,
or just keep your servers running and not call `unref()` on them.
In this last case your processes will keep running and only exit
when the appropriate signal arrives.
All of these methods will prevent your process from finishing without
running the `stop` and `finish` callbacks.
## Full example

@@ -286,0 +308,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc