From bca78993f0a6250b8f42b7c04a4abe48964568ed Mon Sep 17 00:00:00 2001 From: remojansen Date: Sat, 4 Nov 2017 19:25:37 +0000 Subject: [PATCH 1/4] Upgrade dependencies --- .gitignore | 1 + .npmignore | 3 +- package.json | 40 +++++++++---------- src/index.ts | 4 +- src/serializers/text/colors.ts | 7 ++++ src/serializers/text/text_serializer.ts | 2 +- src/serializers/text/text_serializer_utils.ts | 4 +- tslint.json | 1 - 8 files changed, 35 insertions(+), 27 deletions(-) create mode 100644 src/serializers/text/colors.ts diff --git a/.gitignore b/.gitignore index dc534ea..3dfd7d2 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,4 @@ type_definitions/**/*.js type_definitions/*.js .typingsrc +package-lock.json diff --git a/.npmignore b/.npmignore index b0eede3..1a75997 100644 --- a/.npmignore +++ b/.npmignore @@ -19,4 +19,5 @@ wallaby.js .travis.yml .gitignore .vscode -type_definitions \ No newline at end of file +type_definitions +package-lock.json \ No newline at end of file diff --git a/package.json b/package.json index 8ef48b8..cddf765 100644 --- a/package.json +++ b/package.json @@ -29,27 +29,27 @@ }, "homepage": "https://github.com/inversify/inversify-logger-middleware#readme", "dependencies": { - "chalk": "^2.0.0" + "chalk": "2.3.0" }, "devDependencies": { - "@types/chai": "^4.0.0", - "@types/chalk": "^0.4.28", - "@types/mocha": "^2.2.35", - "@types/sinon": "^2.1.0", - "chai": "^4.0.0", - "gulp": "^3.9.1", - "gulp-istanbul": "^1.0.0", - "gulp-mocha": "^4.0.1", - "gulp-tslint": "^7.1.0", - "gulp-typescript": "^3.1.4", - "harmonize": "^2.0.0", - "inversify": "^4.0.0", - "mocha": "^4.0.0", - "publish-please": "^2.1.4", - "reflect-metadata": "^0.1.9", - "run-sequence": "^1.2.0", - "sinon": "^3.0.0", - "tslint": "^5.0.0", - "typescript": "^2.2.0" + "@types/chai": "4.0.4", + "@types/chalk": "2.2.0", + "@types/mocha": "2.2.44", + "@types/sinon": "2.3.7", + "chai": "4.1.2", + "gulp": "3.9.1", + "gulp-istanbul": "1.1.2", + "gulp-mocha": "3.0.1", + "gulp-tslint": "8.1.2", + "gulp-typescript": "3.2.3", + "harmonize": "2.0.0", + "inversify": "4.5.1", + "mocha": "4.0.1", + "publish-please": "2.3.1", + "reflect-metadata": "0.1.10", + "run-sequence": "2.2.0", + "sinon": "4.1.1", + "tslint": "5.8.0", + "typescript": "2.6.1" } } diff --git a/src/index.ts b/src/index.ts index 7f76a81..e892fe9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,8 +16,8 @@ function makeLoggerMiddleware( next: inversify.interfaces.Next ): inversify.interfaces.Next { - if (settings === undefined || settings === null) { settings = deatultOptions; }; - if (renderer === undefined || renderer === null) { renderer = consoleRenderer; }; + if (settings === undefined || settings === null) { settings = deatultOptions; } + if (renderer === undefined || renderer === null) { renderer = consoleRenderer; } return (args: inversify.interfaces.NextArgs) => { diff --git a/src/serializers/text/colors.ts b/src/serializers/text/colors.ts new file mode 100644 index 0000000..c9c272f --- /dev/null +++ b/src/serializers/text/colors.ts @@ -0,0 +1,7 @@ +import * as Chalk from "chalk"; + +const yellow = Chalk.default.yellow; +const green = Chalk.default.green; +const red = Chalk.default.red; + +export { yellow, green, red, Chalk }; diff --git a/src/serializers/text/text_serializer.ts b/src/serializers/text/text_serializer.ts index f8d06ae..e83a979 100644 --- a/src/serializers/text/text_serializer.ts +++ b/src/serializers/text/text_serializer.ts @@ -1,5 +1,5 @@ import serializeRequest from "./request_serializer"; -import { green, red } from "./text_serializer_utils"; +import { green, red } from "./colors"; import interfaces from "../../interfaces/interfaces"; function textSerializer(entry: interfaces.LogEntry) { diff --git a/src/serializers/text/text_serializer_utils.ts b/src/serializers/text/text_serializer_utils.ts index b3b7fb2..b53cc94 100644 --- a/src/serializers/text/text_serializer_utils.ts +++ b/src/serializers/text/text_serializer_utils.ts @@ -1,4 +1,4 @@ -import { yellow, green, red } from "chalk"; +import { yellow } from "./colors"; let tree = { item: "└──" @@ -38,4 +38,4 @@ function makePropertyLogger(indentationForDepth: string) { }; } -export { getIndentationForDepth, makePropertyLogger, yellow, green, red }; +export { getIndentationForDepth, makePropertyLogger }; diff --git a/tslint.json b/tslint.json index b949f42..b5f6b8a 100644 --- a/tslint.json +++ b/tslint.json @@ -35,7 +35,6 @@ "no-switch-case-fall-through": false, "no-trailing-whitespace": true, "no-unused-expression": true, - "no-use-before-declare": true, "no-var-keyword": true, "object-literal-sort-keys": true, "one-line": [true, From ef9e7d03b0746aa037b8e36b7e2f8736a2f097b6 Mon Sep 17 00:00:00 2001 From: remojansen Date: Sat, 4 Nov 2017 19:27:37 +0000 Subject: [PATCH 2/4] Preparing release --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cddf765..d6cf2dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "inversify-logger-middleware", - "version": "3.0.0", + "version": "3.1.0", "description": "A basic logger middleware for InversifyJS", "main": "lib/index.js", "typings": "./dts/index.d.ts", From 1e1c7ff721ee2be913da6a6acbf32786c7102a9e Mon Sep 17 00:00:00 2001 From: remojansen Date: Sat, 4 Nov 2017 19:28:53 +0000 Subject: [PATCH 3/4] Upgraded nodejs versions on CI --- .travis.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5d9fad1..aefbefc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,8 @@ language: node_js node_js: - stable -- 5.4.1 -- 5.4.0 -- 5.3.0 -- 5.2.0 -- 5.1.1 -- 4.4.6 +- 8.8.1 +- 7.10.1 before_install: - npm install -g codeclimate-test-reporter after_success: From d819e2c0b0bf4244e35f37886ad91803c2e06872 Mon Sep 17 00:00:00 2001 From: remojansen Date: Sat, 4 Nov 2017 19:33:03 +0000 Subject: [PATCH 4/4] Updated PR template --- PULL_REQUEST_TEMPLATE.md | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 7f0a9b7..c44826d 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -1,36 +1,45 @@ +# PR Details + ## Description + ## Related Issue + ## Motivation and Context + -## How Has This Been Tested? +## How Has This Been Tested + ## Types of changes + + +- [ ] Docs change / refactoring / dependency upgrade - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) -## Checklist: +## Checklist + + - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. -- [ ] My change requires a change to the type definitions. -- [ ] I have updated the type definitions accordingly. - [ ] I have read the **CONTRIBUTING** document. - [ ] I have added tests to cover my changes. -- [ ] All new and existing tests passed. \ No newline at end of file +- [ ] All new and existing tests passed.