chore: update dependencies
This commit is contained in:
parent
c4ab39c4e0
commit
d598c3738a
|
@ -1,7 +1,7 @@
|
|||
sudo: false
|
||||
language: node_js
|
||||
node_js:
|
||||
- "4"
|
||||
- "6"
|
||||
- "7"
|
||||
- "8"
|
||||
- "10"
|
||||
|
||||
|
|
|
@ -16,14 +16,15 @@
|
|||
"url": "https://github.com/strongloop/loopback-boot"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
"node": ">=6"
|
||||
},
|
||||
"main": "index.js",
|
||||
"browser": "browser.js",
|
||||
"scripts": {
|
||||
"test": "mocha",
|
||||
"posttest": "npm run lint",
|
||||
"lint": "eslint ."
|
||||
"lint": "eslint .",
|
||||
"lint:fix": "eslint . --fix"
|
||||
},
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
@ -39,7 +40,7 @@
|
|||
"devDependencies": {
|
||||
"browserify": "^4.2.3",
|
||||
"chai": "^3.5.0",
|
||||
"coffee-script": "^1.10.0",
|
||||
"coffeescript": "^2.3.1",
|
||||
"coffeeify": "^2.0.1",
|
||||
"dirty-chai": "^1.2.2",
|
||||
"eslint": "^3.19.0",
|
||||
|
|
|
@ -68,12 +68,19 @@ describe('Bootstrapper', function() {
|
|||
expect(instructions.application, 'application').to.be.an('object');
|
||||
expect(instructions.tracker, 'instruction: tracker').to.eql('compile');
|
||||
expect(context.executions.tracker, 'execution: tracker').to.eql('start');
|
||||
expect(process.bootFlags, 'process: bootFlags').to.eql(['barLoaded',
|
||||
expect(process.bootFlags, 'process: bootFlags').to.eql([
|
||||
'barLoaded',
|
||||
'barSyncLoaded',
|
||||
'fooLoaded',
|
||||
'promiseLoaded',
|
||||
'thenableLoaded',
|
||||
'barStarted',
|
||||
'barFinished',
|
||||
'barSyncExecuted',
|
||||
'promiseStarted',
|
||||
'promiseFinished',
|
||||
'thenableStarted',
|
||||
'thenableFinished',
|
||||
]);
|
||||
done();
|
||||
});
|
||||
|
|
|
@ -17,7 +17,7 @@ var createBrowserLikeContext = require('./helpers/browser').createContext;
|
|||
var printContextLogs = require('./helpers/browser').printContextLogs;
|
||||
|
||||
var compileStrategies = {
|
||||
'default': function(appDir) {
|
||||
default: function(appDir) {
|
||||
var b = browserify({
|
||||
basedir: appDir,
|
||||
debug: true,
|
||||
|
@ -26,7 +26,7 @@ var compileStrategies = {
|
|||
return b;
|
||||
},
|
||||
|
||||
'coffee': function(appDir) {
|
||||
coffee: function(appDir) {
|
||||
var b = browserify({
|
||||
basedir: appDir,
|
||||
extensions: ['.coffee'],
|
||||
|
@ -55,8 +55,10 @@ describe('browser support', function() {
|
|||
// configured in fixtures/browser-app/boot/configure.js
|
||||
expect(app.settings).to.have.property('custom-key', 'custom-value');
|
||||
expect(Object.keys(app.models)).to.include('Customer');
|
||||
expect(app.models.Customer.settings)
|
||||
.to.have.property('_customized', 'Customer');
|
||||
expect(app.models.Customer.settings).to.have.property(
|
||||
'_customized',
|
||||
'Customer'
|
||||
);
|
||||
|
||||
// configured in fixtures/browser-app/component-config.json
|
||||
// and fixtures/browser-app/components/dummy-component.js
|
||||
|
@ -88,7 +90,7 @@ describe('browser support', function() {
|
|||
|
||||
it('supports coffee-script files', function(done) {
|
||||
// add coffee-script to require.extensions
|
||||
require('coffee-script/register');
|
||||
require('coffeescript/register');
|
||||
|
||||
var appDir = path.resolve(__dirname, './fixtures/coffee-app');
|
||||
|
||||
|
@ -99,8 +101,10 @@ describe('browser support', function() {
|
|||
// configured in fixtures/browser-app/boot/configure.coffee
|
||||
expect(app.settings).to.have.property('custom-key', 'custom-value');
|
||||
expect(Object.keys(app.models)).to.include('Customer');
|
||||
expect(app.models.Customer.settings)
|
||||
.to.have.property('_customized', 'Customer');
|
||||
expect(app.models.Customer.settings).to.have.property(
|
||||
'_customized',
|
||||
'Customer'
|
||||
);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
@ -109,14 +113,13 @@ describe('browser support', function() {
|
|||
|
||||
function browserifyTestApp(options, strategy, next) {
|
||||
// set default args
|
||||
if (((typeof strategy) === 'function') && !next) {
|
||||
if (typeof strategy === 'function' && !next) {
|
||||
next = strategy;
|
||||
strategy = undefined;
|
||||
}
|
||||
if (!strategy)
|
||||
strategy = 'default';
|
||||
if (!strategy) strategy = 'default';
|
||||
|
||||
var appDir = typeof(options) === 'object' ? options.appRootDir : options;
|
||||
var appDir = typeof options === 'object' ? options.appRootDir : options;
|
||||
var b = compileStrategies[strategy](appDir);
|
||||
|
||||
boot.compileToBrowserify(options, b, function(err) {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1188,6 +1188,7 @@ describe('executor', function() {
|
|||
it('should convert dynamic variable for datasource', function(done) {
|
||||
var datasource = {
|
||||
mydb: {
|
||||
connector: 'memory',
|
||||
host: '${DYNAMIC_HOST}',
|
||||
port: '${DYNAMIC_PORT}',
|
||||
},
|
||||
|
@ -1206,7 +1207,10 @@ describe('executor', function() {
|
|||
|
||||
it('should resolve dynamic config via app.get()', function(done) {
|
||||
var datasource = {
|
||||
mydb: {host: '${DYNAMIC_HOST}'},
|
||||
mydb: {
|
||||
connector: 'memory',
|
||||
host: '${DYNAMIC_HOST}',
|
||||
},
|
||||
};
|
||||
var bootInstructions = {
|
||||
application: {DYNAMIC_HOST: '127.0.0.4'},
|
||||
|
@ -1223,7 +1227,10 @@ describe('executor', function() {
|
|||
it('should take ENV precedence over config.json', function(done) {
|
||||
process.env.DYNAMIC_HOST = '127.0.0.2';
|
||||
var datasource = {
|
||||
mydb: {host: '${DYNAMIC_HOST}'},
|
||||
mydb: {
|
||||
connector: 'memory',
|
||||
host: '${DYNAMIC_HOST}',
|
||||
},
|
||||
};
|
||||
var bootInstructions = {
|
||||
application: {DYNAMIC_HOST: '127.0.0.3'},
|
||||
|
@ -1238,7 +1245,10 @@ describe('executor', function() {
|
|||
|
||||
it('empty dynamic conf should resolve as `undefined`', function(done) {
|
||||
var datasource = {
|
||||
mydb: {host: '${DYNAMIC_HOST}'},
|
||||
mydb: {
|
||||
connector: 'memory',
|
||||
host: '${DYNAMIC_HOST}',
|
||||
},
|
||||
};
|
||||
var bootInstructions = {dataSources: datasource};
|
||||
|
||||
|
|
Loading…
Reference in New Issue