diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a0c9ebc6..ed9774c00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://www.npmjs.com/package/@google-cloud/datastore?activeTab=versions +### [5.0.2](https://www.github.com/googleapis/nodejs-datastore/compare/v5.0.1...v5.0.2) (2019-12-12) + + +### Bug Fixes + +* update datastore_transactional_single_entity_group_read_only to consistently use transaction ([#551](https://www.github.com/googleapis/nodejs-datastore/issues/551)) ([fbff2e7](https://www.github.com/googleapis/nodejs-datastore/commit/fbff2e7d2f054b157cc669c979a9e5acb09dd7a1)) +* **deps:** update dependency @grpc/grpc-js to v0.6.14 ([#552](https://www.github.com/googleapis/nodejs-datastore/issues/552)) ([f4df89c](https://www.github.com/googleapis/nodejs-datastore/commit/f4df89c50059541c75a7576c7264e3b7818871ea)) + ### [5.0.1](https://www.github.com/googleapis/nodejs-datastore/compare/v5.0.0...v5.0.1) (2019-12-05) diff --git a/package.json b/package.json index d877cb0d7..80dbdce38 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/datastore", "description": "Cloud Datastore Client Library for Node.js", - "version": "5.0.1", + "version": "5.0.2", "license": "Apache-2.0", "author": "Google LLC.", "engines": { @@ -48,7 +48,7 @@ "dependencies": { "@google-cloud/projectify": "^1.0.0", "@google-cloud/promisify": "^1.0.0", - "@grpc/grpc-js": "0.6.13", + "@grpc/grpc-js": "0.6.14", "@types/duplexify": "^3.6.0", "@types/long": "^4.0.0", "arrify": "^2.0.1", diff --git a/samples/concepts.js b/samples/concepts.js index 0a1147de0..099d620bc 100644 --- a/samples/concepts.js +++ b/samples/concepts.js @@ -1143,13 +1143,13 @@ class Transaction extends TestHelper { const taskListKey = datastore.key(['TaskList', 'default']); await transaction.run(); - const [taskList] = await datastore.get(taskListKey); + const [taskList] = await transaction.get(taskListKey); const query = datastore.createQuery('Task').hasAncestor(taskListKey); - const [taskListEntities] = await datastore.runQuery(query); + const [taskListEntities] = await transaction.runQuery(query); await transaction.commit(); return [taskList, taskListEntities]; } catch (err) { - transaction.rollback(); + await transaction.rollback(); } } // [END datastore_transactional_single_entity_group_read_only] diff --git a/samples/package.json b/samples/package.json index b637546af..571e75f15 100644 --- a/samples/package.json +++ b/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout=600000" }, "dependencies": { - "@google-cloud/datastore": "^5.0.1", + "@google-cloud/datastore": "^5.0.2", "sinon": "^7.3.2" }, "devDependencies": {