Socket
Socket
Sign inDemoInstall

avvio

Package Overview
Dependencies
Maintainers
2
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

avvio - npm Package Compare versions

Comparing version 7.1.2 to 7.2.0

8

boot.js

@@ -194,5 +194,11 @@ 'use strict'

function assertPlugin (plugin) {
// Faux modules are modules built with TypeScript
// or Babel that they export a .default property.
if (plugin && typeof plugin === 'object' && typeof plugin.default === 'function') {
plugin = plugin.default
}
if (!(plugin && (typeof plugin === 'function' || typeof plugin.then === 'function'))) {
throw new Error('plugin must be a function or a promise')
}
return plugin
}

@@ -228,3 +234,3 @@

Boot.prototype._addPlugin = function (plugin, opts, isAfter) {
assertPlugin(plugin)
plugin = assertPlugin(plugin)
opts = opts || {}

@@ -231,0 +237,0 @@

2

package.json
{
"name": "avvio",
"version": "7.1.2",
"version": "7.2.0",
"description": "Asynchronous bootstrapping of Node applications",

@@ -5,0 +5,0 @@ "main": "boot.js",

@@ -375,1 +375,25 @@ 'use strict'

})
test('support faux modules', (t) => {
t.plan(4)
const app = boot()
var after = false
// Faux modules are modules built with TypeScript
// or Babel that they export a .default property.
app.use({
default: function (server, opts, done) {
t.equal(server, app, 'the first argument is the server')
t.deepEqual(opts, {}, 'no options')
t.ok(after, 'delayed execution')
done()
}
})
after = true
app.on('start', () => {
t.pass('booted')
})
})
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