Skip to content

Commit

Permalink
[Dev Deps] update babel-cli, cheerio, eslint, `eslint-config-ai…
Browse files Browse the repository at this point in the history
…rbnb`, `eslint-plugin-import`, `eslint-plugin-jsx-a11y`, `eslint-plugin-react`, `mocha`, `mocha-wrap`, `rimraf`, `sinon`
  • Loading branch information
ljharb committed Sep 6, 2016
1 parent f5e02d3 commit 3fdef34
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 31 deletions.
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,21 @@
},
"homepage": "https://github.com/airbnb/hypernova",
"devDependencies": {
"babel-cli": "^6.9.0",
"babel-cli": "^6.14.0",
"babel-plugin-add-module-exports": "^0.2.1",
"babel-preset-airbnb": "^2.0.0",
"chai": "^3.5.0",
"cheerio": "^0.20.0",
"eslint": "^2.11.1",
"eslint-config-airbnb": "^9.0.1",
"eslint-plugin-import": "^1.8.1",
"eslint-plugin-jsx-a11y": "^1.3.0",
"eslint-plugin-react": "^5.1.1",
"cheerio": "^0.22.0",
"eslint": "^3.4.0",
"eslint-config-airbnb": "^10.0.1",
"eslint-plugin-import": "^1.14.0",
"eslint-plugin-jsx-a11y": "^2.2.1",
"eslint-plugin-react": "^6.2.0",
"istanbul": "^1.0.0-alpha.2",
"mocha": "^2.5.3",
"mocha-wrap": "^2.0.4",
"rimraf": "^2.5.2",
"sinon": "^1.17.4",
"mocha": "^3.0.2",
"mocha-wrap": "^2.0.5",
"rimraf": "^2.5.4",
"sinon": "^1.17.5",
"sinon-sandbox": "^1.0.2"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/coordinator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import './environment';
import cluster from 'cluster';
import os from 'os';

import './environment';
import logger from './utils/logger';
import { raceTo } from './utils/lifecycle';

Expand Down
3 changes: 2 additions & 1 deletion src/createGetComponent.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import createVM from './createVM';
import fs from 'fs';
import has from 'has';

import createVM from './createVM';

// This function takes in an Object of files and an Object that configures the VM. It will return
// a function that can be used as `getComponent` for Hypernova.
// The file's object structure is [componentName]: 'AbsolutePath.js'
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* globals document */

const LEFT = '<!--';
const RIGHT = '-->';

Expand Down
14 changes: 6 additions & 8 deletions src/server.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import './environment';
import cluster from 'cluster';
import express from 'express';

import './environment';
import Module from './Module';
import cluster from 'cluster';
import coordinator from './coordinator';
import createGetComponent from './createGetComponent';
import express from 'express';
import getFiles from './getFiles';
import loadModules from './loadModules';
import logger from './utils/logger';
Expand Down Expand Up @@ -36,12 +36,10 @@ export default function hypernova(userConfig, onServer) {

if (config.devMode) {
worker(app, config, onServer);
} else if (cluster.isMaster) {
coordinator();
} else {
if (cluster.isMaster) {
coordinator();
} else {
worker(app, config, onServer, cluster.worker.id);
}
worker(app, config, onServer, cluster.worker.id);
}

return app;
Expand Down
3 changes: 2 additions & 1 deletion src/worker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import './environment';
import bodyParser from 'body-parser';

import './environment';
import logger from './utils/logger';
import renderBatch from './utils/renderBatch';
import { runAppLifecycle, errorSync, raceTo } from './utils/lifecycle';
Expand Down
5 changes: 5 additions & 0 deletions test/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"env": {
"mocha": true
},
"rules": {
"import/no-extraneous-dependencies": [2, {
"devDependencies": true
}],
}
}
3 changes: 2 additions & 1 deletion test/BatchManager-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { assert } from 'chai';
import { makeJob, COMPONENT_NAME } from './helper';
import sinon from 'sinon-sandbox';

import { makeJob, COMPONENT_NAME } from './helper';
import BatchManager from '../lib/utils/BatchManager';

function mockPlugin() {
Expand Down
3 changes: 2 additions & 1 deletion test/Module-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { assert } from 'chai';
import has from 'has';
import { Module } from '../server';
import mutableArray from './mutableArray';

Expand Down Expand Up @@ -27,7 +28,7 @@ describe('Module', () => {

it('loads a module and return the instance', () => {
const module = Module.load('./test/mutableArray.js');
assert(module.hasOwnProperty('exports') === true, 'module has exports property');
assert(has(module, 'exports') === true, 'module has exports property');
assert.isArray(module.exports, 'module.exports is our array');
});

Expand Down
2 changes: 1 addition & 1 deletion test/createGetComponent-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assert } from 'chai';
import { createGetComponent } from '../server';
import path from 'path';
import { createGetComponent } from '../server';

describe('createGetComponent', () => {
const files = {
Expand Down
3 changes: 2 additions & 1 deletion test/getFiles-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { assert } from 'chai';
import { getFiles } from '../server';
import path from 'path';

import { getFiles } from '../server';

describe('getFiles', () => {
it('retrieves files', () => {
const files = getFiles(path.join('test', 'components'));
Expand Down
3 changes: 2 additions & 1 deletion test/hypernova-runner-test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { assert } from 'chai';
import hypernova from '..';
import sinon from 'sinon-sandbox';
import wrap from 'mocha-wrap';

import hypernova from '../';

describe('the runner', () => {
it('runs server if window is not defined', () => {
const server = sinon.spy();
Expand Down
3 changes: 2 additions & 1 deletion test/init.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require('airbnb-js-shims');
import 'airbnb-js-shims';

import sinon from 'sinon-sandbox';

afterEach(() => {
Expand Down
5 changes: 3 additions & 2 deletions test/lifecycle-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import '../lib/environment';
import { assert } from 'chai';
import { makeJob } from './helper';
import sinon from 'sinon';

import '../lib/environment';
import { makeJob } from './helper';
import * as lifecycle from '../lib/utils/lifecycle';
import BatchManager from '../lib/utils/BatchManager';

Expand Down
3 changes: 2 additions & 1 deletion test/server-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import hypernova from '../server';
import { assert } from 'chai';

import hypernova from '../server';

describe('Hypernova server', () => {
it('blows up if hypernova does not get getComponent', () => {
assert.throws(hypernova, TypeError);
Expand Down

0 comments on commit 3fdef34

Please sign in to comment.