From fc90b052ac4c824e1a9620f3f06a5b2b42fcb5ca Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Mon, 4 Dec 2017 12:38:32 -0500 Subject: [PATCH] =?UTF-8?q?Update=20dependencies=20to=20enable=20Greenkeep?= =?UTF-8?q?er=20=F0=9F=8C=B4=20(#13)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(package): update dependencies * Fixed sinon syntax change --- package.json | 10 +++++----- test/filter.js | 38 ++++++++++++++------------------------ test/mutation.js | 4 +--- test/table.js | 6 ++---- 4 files changed, 22 insertions(+), 36 deletions(-) diff --git a/package.json b/package.json index 966070874..f2eaeae01 100644 --- a/package.json +++ b/package.json @@ -52,12 +52,12 @@ "system-test": "repo-tools test run --cmd mocha -- system-test/*.js --no-timeouts" }, "dependencies": { - "@google-cloud/common": "^0.13.0", + "@google-cloud/common": "^0.15.1", "@google-cloud/common-grpc": "^0.4.0", "arrify": "^1.0.0", "concat-stream": "^1.5.0", "create-error-class": "^3.0.2", - "dot-prop": "^3.0.0", + "dot-prop": "^4.2.0", "extend": "^3.0.0", "is": "^3.0.1", "lodash.flatten": "^4.2.0", @@ -71,7 +71,7 @@ "devDependencies": { "@google-cloud/nodejs-repo-tools": "^2.1.0", "async": "^2.5.0", - "codecov": "^2.3.1", + "codecov": "^3.0.0", "eslint": "^4.9.0", "eslint-config-prettier": "^2.6.0", "eslint-plugin-node": "^5.2.0", @@ -79,12 +79,12 @@ "ink-docstrap": "^1.3.0", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", - "mocha": "^3.5.3", + "mocha": "^4.0.1", "nyc": "^11.2.1", "power-assert": "^1.4.4", "prettier": "^1.7.4", "proxyquire": "^1.7.10", - "sinon": "^1.17.4", + "sinon": "^4.1.2", "uuid": "^3.0.1" } } diff --git a/test/filter.js b/test/filter.js index 80676579d..4217d3513 100644 --- a/test/filter.js +++ b/test/filter.js @@ -226,9 +226,7 @@ describe('Bigtable/Filter', function() { name: 'fake-column', }; - var spy = sinon.stub(Filter, 'convertToRegExpString', function(value) { - return value; - }); + var spy = sinon.stub(Filter, 'convertToRegExpString').returnsArg(0); filter.set = function(filterName, value) { assert.strictEqual(filterName, 'columnQualifierRegexFilter'); @@ -298,9 +296,7 @@ describe('Bigtable/Filter', function() { fail: {c: 'c'}, }; - var spy = sinon.stub(Filter, 'parse', function(value) { - return value; - }); + var spy = sinon.stub(Filter, 'parse').returnsArg(0); filter.set = function(filterName, value) { assert.strictEqual(filterName, 'condition'); @@ -324,9 +320,7 @@ describe('Bigtable/Filter', function() { it('should create a family name regex filter', function(done) { var familyName = 'fake-family'; - var spy = sinon.stub(Filter, 'convertToRegExpString', function(value) { - return value; - }); + var spy = sinon.stub(Filter, 'convertToRegExpString').returnsArg(0); filter.set = function(filterName, value) { assert.strictEqual(filterName, 'familyNameRegexFilter'); @@ -343,9 +337,7 @@ describe('Bigtable/Filter', function() { it('should create an interleave filter', function(done) { var fakeFilters = [{}, {}, {}]; - var spy = sinon.stub(Filter, 'parse', function(value) { - return value; - }); + var spy = sinon.stub(Filter, 'parse').returnsArg(0); filter.set = function(filterName, value) { assert.strictEqual(filterName, 'interleave'); @@ -383,9 +375,9 @@ describe('Bigtable/Filter', function() { }; var convertedKey = 'abcd'; - var spy = sinon.stub(Filter, 'convertToRegExpString', function() { - return convertedKey; - }); + var spy = sinon + .stub(Filter, 'convertToRegExpString') + .returns(convertedKey); filter.set = function(filterName, value) { assert.strictEqual(filterName, 'rowKeyRegexFilter'); @@ -531,9 +523,9 @@ describe('Bigtable/Filter', function() { var fakeRegExValue = 'abcd'; var fakeConvertedValue = 'dcba'; - var regSpy = sinon.stub(Filter, 'convertToRegExpString', function() { - return fakeRegExValue; - }); + var regSpy = sinon + .stub(Filter, 'convertToRegExpString') + .returns(fakeRegExValue); var bytesSpy = (FakeMutation.convertToBytes = sinon.spy(function() { return fakeConvertedValue; @@ -556,9 +548,9 @@ describe('Bigtable/Filter', function() { var fakeRegExValue = 'abcd'; var fakeConvertedValue = 'dcba'; - var regSpy = sinon.stub(Filter, 'convertToRegExpString', function() { - return fakeRegExValue; - }); + var regSpy = sinon + .stub(Filter, 'convertToRegExpString') + .returns(fakeRegExValue); var bytesSpy = (FakeMutation.convertToBytes = sinon.spy(function() { return fakeConvertedValue; @@ -585,9 +577,7 @@ describe('Bigtable/Filter', function() { end: 'b', }; - var spy = sinon.stub(Filter, 'createRange', function() { - return fakeRange; - }); + var spy = sinon.stub(Filter, 'createRange').returns(fakeRange); filter.set = function(filterName, val) { assert.strictEqual(filterName, 'valueRangeFilter'); diff --git a/test/mutation.js b/test/mutation.js index a81a575dd..f50cf00a0 100644 --- a/test/mutation.js +++ b/test/mutation.js @@ -274,9 +274,7 @@ describe('Bigtable/Mutation', function() { qualifier: null, }; - sinon.stub(Mutation, 'parseColumnName', function() { - return fakeColumnName; - }); + sinon.stub(Mutation, 'parseColumnName').returns(fakeColumnName); var mutation = Mutation.encodeDelete(['follows']); diff --git a/test/table.js b/test/table.js index 232486e3d..79e63f616 100644 --- a/test/table.js +++ b/test/table.js @@ -133,9 +133,7 @@ describe('Bigtable/Table', function() { it('should inherit from GrpcServiceObject', function() { var FAKE_TABLE_NAME = 'fake-table-name'; - sinon.stub(Table, 'formatName_', function() { - return FAKE_TABLE_NAME; - }); + sinon.stub(Table, 'formatName_').returns(FAKE_TABLE_NAME); var table = new Table(INSTANCE, TABLE_ID); var config = table.calledWith_[0]; @@ -570,7 +568,7 @@ describe('Bigtable/Table', function() { var formattedRows = [{key: 'c', data: {}}, {key: 'd', data: {}}]; beforeEach(function() { - sinon.stub(table, 'row', function() { + sinon.stub(table, 'row').callsFake(function() { return {}; });