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

microboot

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

microboot - npm Package Compare versions

Comparing version 0.1.0 to 1.0.0

.coveralls.yml

1

index.js

@@ -8,4 +8,3 @@ function Microboot (options) {

Microboot.prototype.up = require('./lib/up')
Microboot.prototype.down = require('./lib/down')
module.exports = new Microboot()

@@ -17,10 +17,2 @@ var debug = require('debug')('microboot:load')

if (!files.length) {
if (!folders.length) {
return callback(callbacks)
}
return load(folders, callback, callbacks)
}
files.sort()

@@ -27,0 +19,0 @@

@@ -7,7 +7,7 @@ var debug = require('debug')('microboot:up')

if (!(phases instanceof Array)) {
throw new Error(`Phases on bootup must be an array`)
throw new Error('Phases on bootup must be an array')
}
if (callback && typeof callback !== 'function') {
throw new Error(`The optional callback on bootup must be a function if defined`)
throw new Error('The optional callback on bootup must be a function if defined')
}

@@ -14,0 +14,0 @@

{
"name": "microboot",
"version": "0.1.0",
"version": "1.0.0",
"description": "Boot your app.",
"main": "index.js",
"scripts": {
"test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js"
"test": "node_modules/.bin/mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js",
"coverage": "node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec --require test/bootstrap/node test/*.test.js test/**/*.test.js && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
},

@@ -16,2 +17,4 @@ "author": "Jack Williams <jack@tagstr.co>",

"chai": "^3.5.0",
"coveralls": "^2.11.9",
"istanbul": "^0.4.3",
"mocha": "^2.5.3",

@@ -18,0 +21,0 @@ "sinon": "^1.17.4",

@@ -1,2 +0,2 @@

module.exports = function second (next) {
module.exports = function third (next) {
global.end3 = new Date().getTime()

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

module.exports = function second (next) {
module.exports = function fourth (next) {
global.end4 = new Date().getTime()

@@ -3,0 +3,0 @@

@@ -27,2 +27,6 @@ var up = require('../../lib/up')

it('should succeed if passed valid phases but no callback', function () {
expect(up.bind(up, ['test/data/fake'])).to.not.throw()
})
it('should search for phases based on CWD', function () {

@@ -40,15 +44,19 @@ expect(up.bind(up, ['na'])).to.throw(process.cwd() + '/na')

it('should run database phase', function () {
it('should run database phase', function (done) {
up(['test/data/fake'], function () {
expect(global.database).to.equal(true)
done()
})
})
it('should run items in order', function () {
it('should run items in order', function (done) {
up(['test/data/timings/first'], function () {
expect(global.end1).to.be.below(global.end2)
done()
})
})
it('should run phases in order', function () {
it('should run phases in order', function (done) {
up(['test/data/timings/second', 'test/data/timings/first'], function () {

@@ -58,4 +66,10 @@ expect(global.end3).to.be.below(global.end4)

expect(global.end1).to.be.below(global.end2)
done()
})
})
it ('should fail if a non-function callback is provided', function () {
expect(up.bind(up, [], {})).to.throw('optional callback on bootup must be a function')
})
})

@@ -7,6 +7,2 @@ var microboot = require('..')

})
it('should export down function', function () {
expect(microboot.down).to.be.a('function')
})
})
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