Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix failing builds (#50)
Browse files Browse the repository at this point in the history
* dependency tidy

* bump node

* no npm-prepublish
 🐿 v2.6.0

* use ignore instead of only in babel-register
 🐿 v2.6.0
  • Loading branch information
doramatadora authored Jan 5, 2018
1 parent 773b8a8 commit 9e31223
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/.idea/
/dist/
/node_modules/
*.env*
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ build: $(shell find src -type f)

unit-test: build
@echo "Unit Testing…"
@mocha --require test/setup --recursive --reporter spec test
@mocha --require test/setup --recursive --exit --reporter spec test

test: verify unit-test
8 changes: 4 additions & 4 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
machine:
node:
version: 4.7.3

version: 8.9.3
deployment:
release:
tag: /v.*/
tag: /^v?\d+\.\d+\.\d+(?:-beta\.\d+)?$/
owner: Financial-Times
commands:
- make npm-publish
- npm version --no-git-tag-version ${CIRCLE_TAG}
- npm publish --access public
27 changes: 12 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,22 @@
"prepush": "make verify -j3"
},
"dependencies": {
"request": "^2.67.0",
"winston": "^2.3.1"
"request": "^2.83.0",
"winston": "^2.4.0"
},
"devDependencies": {
"@financial-times/n-gage": "^1.2.0",
"babel-cli": "^6.5.1",
"babel-preset-env": "^1.1.8",
"babel-register": "^6.5.1",
"chai": "^3.4.0",
"chai-string": "^1.1.6",
"eslint": "^3.0.1",
"lintspaces-cli": "^0.6.0",
"mocha": "^3.2.0",
"npm-prepublish": "^1.2.1",
"sinon": "^1.17.0",
"sinon-chai": "^2.8.0"
"@financial-times/n-gage": "^1.19.1",
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.6.1",
"babel-register": "^6.26.0",
"chai": "^4.1.2",
"chai-string": "^1.4.0",
"mocha": "^4.1.0",
"sinon": "^4.1.3",
"sinon-chai": "^2.14.0"
},
"config": {},
"engines": {
"node": ">=4.7.3"
"node": "^8.9.3"
}
}
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const getLogger = () => {

logger.addConsole(process.env.CONSOLE_LOG_LEVEL || 'silly');

// only log to splunk in production
// log to splunk only in production
if (process.env.NODE_ENV === 'production' && process.env.SPLUNK_URL) {
logger.addSplunk(process.env.SPLUNK_URL, process.env.SPLUNK_LOG_LEVEL || 'warn');
}
Expand Down
4 changes: 2 additions & 2 deletions test/lib/app-logger.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('Logger', () => {

it('should be able to instantiate', () => {
const logger = new Logger();
logger.should.be.defined;
logger.should.not.equal(undefined);
});

describe('#log', () => {
Expand Down Expand Up @@ -64,7 +64,7 @@ describe('Logger', () => {
logSpy.should.always.have.been.calledWithExactly('info', 'a message', { foo: 'foo' });
});

it('should pass meta only through', () => {
it('should pass meta solely through', () => {
const logSpy = sinon.spy();
const winston = winstonStub({ log: logSpy });
const logger = new Logger({ winston });
Expand Down
4 changes: 2 additions & 2 deletions test/lib/function-logger.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('Logger', () => {

it('should be able to instantiate', () => {
const logger = new Logger();
logger.should.be.defined;
logger.should.not.equal(undefined);
});

describe('#log', () => {
Expand Down Expand Up @@ -50,7 +50,7 @@ describe('Logger', () => {
console.log.should.always.have.been.calledWithExactly('a message foo=foo level=info');
});

it('should pass meta only through', () => {
it('should pass meta solely through', () => {
const logger = new Logger();
logger.log('info', { foo: 'bar' });
console.log.should.always.have.been.calledWithExactly('foo=bar level=info');
Expand Down
2 changes: 1 addition & 1 deletion test/setup.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require('babel-register')({
// just transpile the tests
only: filename => /n-logger\/test/.test(filename)
ignore: filename => !(/n-logger\/test/.test(filename))
});

0 comments on commit 9e31223

Please sign in to comment.