diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..9cf9495 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 47aad24..4f05640 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,7 @@ language: node_js node_js: +- '8' - '6' -- '5' -- '4.2' script: npm run citest after_script: npm install coveralls@^2.11.9 && cat ./coverage/lcov.info | coveralls diff --git a/CHANGELOG.md b/CHANGELOG.md index 0db4d63..6d9ea93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] +### Changed +- Update node to v6/v8 and upgrade modules ## [v0.4.0] diff --git a/ElasticLoader.spec.ts b/ElasticLoader.spec.ts index 220d719..d045c63 100644 --- a/ElasticLoader.spec.ts +++ b/ElasticLoader.spec.ts @@ -20,7 +20,7 @@ describe('ElasticLoader', () => { index: o => Observable.of(o) }; - stub = sinon.stub(client, 'index', o => Observable.of(o)); + stub = sinon.stub(client, 'index').callsFake(o => Observable.of(o)); }); it('should resolve on correct usage', done => { diff --git a/helpers/Buffer.ts b/helpers/Buffer.ts index db7855e..90de9ff 100644 --- a/helpers/Buffer.ts +++ b/helpers/Buffer.ts @@ -61,7 +61,7 @@ export class Buffer extends EventEmitter { }); } - public write(object: T): Promise | Promise { + public write(object: T): Promise { if (this.sealed) { return Promise.reject(new BufferSealedError()); } diff --git a/package.json b/package.json index 5f15ad9..ae2182b 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "clean": "rimraf build", - "bootstrap": "npm install && typings install", + "bootstrap": "npm install", "pretest": "npm run bootstrap && npm run clean && tsc", "test": "mocha --ui bdd --recursive ./build", "precitest": "npm run bootstrap && npm run clean && tsc", @@ -21,7 +21,7 @@ "elasticsearch" ], "engines": { - "node": ">=4.2" + "node": ">=6" }, "repository": { "type": "git", @@ -31,21 +31,26 @@ "author": "Christoph Bühler ", "license": "MIT", "devDependencies": { - "chai": "^3.5.0", - "chai-as-promised": "^5.3.0", - "del-cli": "^0.2.0", + "@types/chai": "^4.0.1", + "@types/chai-as-promised": "^0.0.31", + "@types/mocha": "^2.2.41", + "@types/node": "^8.0.16", + "@types/sinon": "^2.3.3", + "@types/sinon-chai": "^2.7.28", + "chai": "^4.1.0", + "chai-as-promised": "^7.1.1", + "del-cli": "^1.1.0", "istanbul": "^0.4.4", - "mocha": "^2.5.3", + "mocha": "^3.4.1", "mocha-lcov-reporter": "^1.2.0", "rimraf": "^2.5.3", - "sinon": "^1.17.4", + "sinon": "^2.4.0", "sinon-chai": "^2.8.0", - "typescript": "^1.8.10", - "typings": "^1.3.1" + "typescript": "^2.4.2" }, "dependencies": { - "elasticsearch": "^11.0.1", + "elasticsearch": "^13.2.0", "proc-that": "^0.4.0", - "rxjs": "^5.0.0-beta.10" + "rxjs": "^5.4.2" } } diff --git a/tsconfig.json b/tsconfig.json index d9bee7e..a63e4e0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es5", + "target": "es6", "module": "commonjs", "moduleResolution": "node", "removeComments": false, diff --git a/typings.json b/typings.json deleted file mode 100644 index 5edf886..0000000 --- a/typings.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "proc-that-elastic-loader", - "dependencies": {}, - "globalDependencies": { - "es6-shim": "registry:dt/es6-shim#0.31.2+20160602141504", - "node": "registry:dt/node#6.0.0+20160709114037" - }, - "globalDevDependencies": { - "mocha": "registry:dt/mocha#2.2.5+20160619032855" - }, - "devDependencies": { - "chai": "registry:npm/chai#3.5.0+20160415060238", - "chai-as-promised": "registry:npm/chai-as-promised#5.1.0+20160310030142", - "sinon": "registry:npm/sinon#1.16.0+20160427193336", - "sinon-chai": "registry:npm/sinon-chai#2.8.0+20160310030142" - } -} \ No newline at end of file