From aa2c76e99028a7c392430d4dd5d8a97aba4eca0a Mon Sep 17 00:00:00 2001 From: Gagan Gupta Date: Thu, 17 Oct 2024 07:09:07 +0000 Subject: [PATCH 1/2] docs: Make usage example in samples consistent. Currently, usage examples start in 2 ways * `node samples/...` * `node ...` If all steps of Before you Begin section is followed, the latter with throw `MODULE_NOT_FOUND` error. --- samples/README.md | 74 +++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/samples/README.md b/samples/README.md index 5276e8710..526cccbfe 100644 --- a/samples/README.md +++ b/samples/README.md @@ -129,8 +129,6 @@ Before running the samples, make sure you've followed the steps outlined in `npm install` -`cd ..` - ## Samples @@ -161,7 +159,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/backups-cancel.js` +`node backups-cancel.js` ----- @@ -195,7 +193,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/backups-create-with-encryption-key.js` +`node backups-create-with-encryption-key.js` ----- @@ -212,7 +210,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/backups-create.js` +`node backups-create.js` ----- @@ -229,7 +227,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/backups-delete.js` +`node backups-delete.js` ----- @@ -246,7 +244,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/backups-get-database-operations.js` +`node backups-get-database-operations.js` ----- @@ -263,7 +261,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/backups-get-operations.js` +`node backups-get-operations.js` ----- @@ -280,7 +278,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/backups-get.js` +`node backups-get.js` ----- @@ -297,7 +295,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/backups-restore-with-encryption-key.js` +`node backups-restore-with-encryption-key.js` ----- @@ -314,7 +312,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/backups-restore.js` +`node backups-restore.js` ----- @@ -331,7 +329,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/backups-update.js` +`node backups-update.js` ----- @@ -348,7 +346,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/backups.js` +`node backups.js` ----- @@ -382,7 +380,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/batch.js` +`node batch.js` ----- @@ -399,7 +397,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/crud.js` +`node crud.js` ----- @@ -433,7 +431,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/database-create-with-encryption-key.js` +`node database-create-with-encryption-key.js` ----- @@ -450,7 +448,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/database-create-with-version-retention-period.js` +`node database-create-with-version-retention-period.js` ----- @@ -535,7 +533,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/datatypes.js` +`node datatypes.js` ----- @@ -620,7 +618,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/dml.js` +`node dml.js` ----- @@ -654,7 +652,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/get-commit-stats.js` +`node get-commit-stats.js` ----- @@ -790,7 +788,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/indexing.js` +`node indexing.js` ----- @@ -909,7 +907,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/instance-with-processing-units.js` +`node instance-with-processing-units.js` ----- @@ -926,7 +924,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/instance.js` +`node instance.js` ----- @@ -943,7 +941,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/json-add-column.js` +`node json-add-column.js` ----- @@ -960,7 +958,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/json-query-parameter.js` +`node json-query-parameter.js` ----- @@ -977,7 +975,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/json-update-data.js` +`node json-update-data.js` ----- @@ -1045,7 +1043,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/numeric-add-column.js` +`node numeric-add-column.js` ----- @@ -1062,7 +1060,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/numeric-query-parameter.js` +`node numeric-query-parameter.js` ----- @@ -1079,7 +1077,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/numeric-update-data.js` +`node numeric-update-data.js` ----- @@ -1504,7 +1502,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/proto-query-data.js` +`node proto-query-data.js` ----- @@ -1538,7 +1536,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/proto-update-data-dml.js` +`node proto-update-data-dml.js` ----- @@ -1555,7 +1553,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/proto-update-data.js` +`node proto-update-data.js` ----- @@ -1572,7 +1570,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/queryoptions.js` +`node queryoptions.js` ----- @@ -1589,7 +1587,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/quickstart.js` +`node quickstart.js` ----- @@ -1742,7 +1740,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/schema.js` +`node schema.js` ----- @@ -1810,7 +1808,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/struct.js` +`node struct.js` ----- @@ -1878,7 +1876,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/timestamp.js` +`node timestamp.js` ----- @@ -1912,7 +1910,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node samples/transaction.js` +`node transaction.js` From 477c69b15998235e44f11bbd601bd10774360d61 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 21 Oct 2024 07:23:21 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- samples/README.md | 74 ++++++++++++++++++++++++----------------------- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/samples/README.md b/samples/README.md index 6e75ab7e8..9a2d55d5b 100644 --- a/samples/README.md +++ b/samples/README.md @@ -140,6 +140,8 @@ Before running the samples, make sure you've followed the steps outlined in `npm install` +`cd ..` + ## Samples @@ -170,7 +172,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node backups-cancel.js` +`node samples/backups-cancel.js` ----- @@ -221,7 +223,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node backups-create-with-encryption-key.js` +`node samples/backups-create-with-encryption-key.js` ----- @@ -255,7 +257,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node backups-create.js` +`node samples/backups-create.js` ----- @@ -272,7 +274,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node backups-delete.js` +`node samples/backups-delete.js` ----- @@ -289,7 +291,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node backups-get-database-operations.js` +`node samples/backups-get-database-operations.js` ----- @@ -306,7 +308,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node backups-get-operations.js` +`node samples/backups-get-operations.js` ----- @@ -323,7 +325,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node backups-get.js` +`node samples/backups-get.js` ----- @@ -340,7 +342,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node backups-restore-with-encryption-key.js` +`node samples/backups-restore-with-encryption-key.js` ----- @@ -374,7 +376,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node backups-restore.js` +`node samples/backups-restore.js` ----- @@ -391,7 +393,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node backups-update.js` +`node samples/backups-update.js` ----- @@ -408,7 +410,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node backups.js` +`node samples/backups.js` ----- @@ -442,7 +444,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node batch.js` +`node samples/batch.js` ----- @@ -493,7 +495,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node crud.js` +`node samples/crud.js` ----- @@ -527,7 +529,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node database-create-with-encryption-key.js` +`node samples/database-create-with-encryption-key.js` ----- @@ -561,7 +563,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node database-create-with-version-retention-period.js` +`node samples/database-create-with-version-retention-period.js` ----- @@ -646,7 +648,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node datatypes.js` +`node samples/datatypes.js` ----- @@ -748,7 +750,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node dml.js` +`node samples/dml.js` ----- @@ -799,7 +801,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node get-commit-stats.js` +`node samples/get-commit-stats.js` ----- @@ -935,7 +937,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node indexing.js` +`node samples/indexing.js` ----- @@ -1071,7 +1073,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node instance-with-processing-units.js` +`node samples/instance-with-processing-units.js` ----- @@ -1088,7 +1090,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node instance.js` +`node samples/instance.js` ----- @@ -1105,7 +1107,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node json-add-column.js` +`node samples/json-add-column.js` ----- @@ -1122,7 +1124,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node json-query-parameter.js` +`node samples/json-query-parameter.js` ----- @@ -1139,7 +1141,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node json-update-data.js` +`node samples/json-update-data.js` ----- @@ -1224,7 +1226,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node numeric-add-column.js` +`node samples/numeric-add-column.js` ----- @@ -1241,7 +1243,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node numeric-query-parameter.js` +`node samples/numeric-query-parameter.js` ----- @@ -1258,7 +1260,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node numeric-update-data.js` +`node samples/numeric-update-data.js` ----- @@ -1683,7 +1685,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node proto-query-data.js` +`node samples/proto-query-data.js` ----- @@ -1717,7 +1719,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node proto-update-data-dml.js` +`node samples/proto-update-data-dml.js` ----- @@ -1734,7 +1736,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node proto-update-data.js` +`node samples/proto-update-data.js` ----- @@ -1751,7 +1753,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node queryoptions.js` +`node samples/queryoptions.js` ----- @@ -1768,7 +1770,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node quickstart.js` +`node samples/quickstart.js` ----- @@ -1921,7 +1923,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node schema.js` +`node samples/schema.js` ----- @@ -1989,7 +1991,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node struct.js` +`node samples/struct.js` ----- @@ -2057,7 +2059,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node timestamp.js` +`node samples/timestamp.js` ----- @@ -2091,7 +2093,7 @@ View the [source code](https://github.com/googleapis/nodejs-spanner/blob/main/sa __Usage:__ -`node transaction.js` +`node samples/transaction.js` -----