Skip to content

Latest commit

 

History

History
1337 lines (824 loc) · 89.4 KB

CHANGELOG.md

File metadata and controls

1337 lines (824 loc) · 89.4 KB

Changelog

npm history

7.1.0 (2023-11-16)

Features

  • Add PG.OID type cod annotation (69192b5)
  • spanner: Add autoscaling config to the instance proto (#1935) (fe285c6)
  • spanner: Add directed_read_option in spanner.proto (69192b5)

Bug Fixes

  • deps: Update dependency @types/stack-trace to v0.0.31 (#1924) (96af405)
  • deps: Update dependency @types/stack-trace to v0.0.32 (#1939) (cb66474)
  • deps: Update dependency google-gax to v4.0.4 (#1926) (361fe6a)
  • deps: Update dependency google-gax to v4.0.5 (#1937) (ab26075)

7.0.0 (2023-08-30)

⚠ BREAKING CHANGES

  • upgrade to Node 14 (#1890)

Bug Fixes

Miscellaneous Chores

6.16.0 (2023-08-07)

Features

Bug Fixes

6.15.0 (2023-08-04)

Features

  • Enable leader aware routing by default. This update contains performance optimisations that will reduce the latency of read/write transactions that originate from a region other than the default leader region. (6852d99)

6.14.0 (2023-07-21)

Features

6.13.0 (2023-07-21)

Features

  • Enable leader aware routing by default. This update contains performance optimisations that will reduce the latency of read/write transactions that originate from a region other than the default leader region. (87cd5e6)

Bug Fixes

6.12.0 (2023-06-19)

Features

  • Databoostenabled for Query and Read partitions (#1784) (66ff70c)

6.11.0 (2023-06-06)

Features

  • spanner: Add DdlStatementActionInfo and add actions to UpdateDatabaseDdlMetadata (#1860) (3e86f36)
  • Testing for fgac in pg (#1811) (c48945f)

6.10.1 (2023-05-30)

Bug Fixes

  • Set database admin and instance as having handwritten layers (republish docs) (3e3e624)

6.10.0 (2023-05-17)

Features

Bug Fixes

6.9.0 (2023-04-26)

Features

6.8.0 (2023-04-06)

Features

  • Adding new fields for Serverless analytics (#1816) (2a6ca6f)

Bug Fixes

  • Begin transaction foes not handle error (#1833) (6ecd366)
  • Correcting the proto field Id for field data_boost_enabled (#1827) (7f6d4cc)
  • Logic for retrying specifiied internal errors (#1822) (f915bd1), closes #1808

6.7.2 (2023-02-17)

Bug Fixes

  • Tests emit empty metadata before emitting unspecified error (14ef031)

6.7.1 (2023-01-23)

Bug Fixes

6.7.0 (2023-01-17)

Features

6.6.0 (2022-12-16)

Features

Bug Fixes

  • Add sleep after admin request intensive tests (#1758) (7643ceb)

6.5.0 (2022-11-30)

Features

  • Inline BeginTransaction with first statement (#1692) (d1b95d2)

Bug Fixes

6.4.0 (2022-10-27)

Features

  • Adding support and samples for Jsonb data type in spangres (#1729) (f050354)
  • Update result_set.proto to return undeclared parameters in ExecuteSql API (eaa445e)
  • Update transaction.proto to include different lock modes (#1723) (eaa445e)

6.3.0 (2022-10-03)

Features

  • Support customer managed instance configurations (#1611) (bbe8f69)

Bug Fixes

  • deps: Update dependency @google-cloud/precise-date to v3 (#1676) (3f20ec4)
  • Do not import the whole google-gax from proto JS (#1553) (#1700) (f9c2640)
  • use google-gax v3.3.0 (f9c2640)

6.2.0 (2022-09-16)

Features

Bug Fixes

  • Allow passing gax instance to client constructor (#1698) (588c1a2)
  • deps: Use grpc-gcp v1.0.0 (#1710) (12eab9d)
  • Move runtime dependencies from dev dependencies to dependencies (#1704) (b2c1c0f)
  • Preserve default values in x-goog-request-params header (#1711) (f1ae513)

6.1.4 (2022-09-06)

Bug Fixes

6.1.3 (2022-07-07)

Bug Fixes

  • deps: update dependency @google-cloud/common to v4 (#1663) (487c58c)

6.1.2 (2022-07-07)

Bug Fixes

  • deps: update dependency @google-cloud/kms to v3 (#1664) (42f41e9)

6.1.1 (2022-07-06)

Bug Fixes

  • call Promise.race without a long pending promise to prevent memory leak (#1657) (768acb6)
  • deps: update dependency yargs to v17 (#1537) (1039f68)

6.1.0 (2022-07-04)

Features

  • add Session creator role (91ef6d3)
  • Adding two new fields for Instance create_time and update_time (#1641) (91ef6d3)

Bug Fixes

  • deps: update dependency @google-cloud/promisify to v3 (#1629) (1467956)
  • Improve spanner.date handling of years before 1000AD (#1654) (fd89a29)

6.0.0 (2022-06-07)

⚠ BREAKING CHANGES

  • update library to use Node 12 (#1637)

Features

Bug Fixes

  • deps: update dependency grpc-gcp to ^0.4.0 (#1603) (f00b3c6)
  • fixes for dynamic routing and streaming descriptors (#1639) (977a543)
  • pin version for nodejs gax-node (#1617) (fb0017f)

Build System

5.18.0 (2022-04-03)

Features

Bug Fixes

  • removing table_catalog from schema information (#1595) (8bcbd95)

5.17.0 (2022-03-09)

Features

  • Refactor create database options schema to accept array (#1578) (b1c88ac)

5.16.3 (2022-01-31)

Miscellaneous Chores

5.16.3 (2022-01-21)

Miscellaneous Chores

5.16.3 (2022-01-19)

Bug Fixes

  • for merging when array/struct chunks contain null (#1541) (72871fc)

5.16.2 (2022-01-17)

Bug Fixes

5.16.1 (2021-12-29)

Bug Fixes

5.16.0 (2021-12-09)

Features

Bug Fixes

5.15.2 (2021-09-10)

Bug Fixes

  • never try to create a negative number of sessions (#1467) (13f5153)

5.15.1 (2021-09-08)

Bug Fixes

5.15.0 (2021-08-26)

Features

5.14.0 (2021-08-24)

Features

5.13.1 (2021-08-17)

Bug Fixes

5.13.0 (2021-08-04)

Features

Bug Fixes

5.12.0 (2021-07-08)

Features

5.11.1 (2021-07-07)

Bug Fixes

5.11.0 (2021-07-01)

Features

  • spanner: add leader_options to InstanceConfig and default_leader to Database (#1414) (e67adc2)

5.10.0 (2021-06-30)

Features

Bug Fixes

5.9.3 (2021-06-29)

Bug Fixes

5.9.2 (2021-06-25)

Bug Fixes

5.9.1 (2021-06-24)

Bug Fixes

5.9.0 (2021-06-14)

Features

  • spanner: add processing_units to Instance resource (#1398) (878cd3f)

5.8.1 (2021-06-10)

Bug Fixes

5.8.0 (2021-06-07)

Features

  • support setting optimizerStatisticsPackage (#1225) (dadc6dc)

Bug Fixes

5.7.0 (2021-04-21)

Features

Bug Fixes

  • prevent unhandled promise rejection while projectId or credential not found (#1340) (47ce076)
  • prevent unhandled promise rejections while creating session (#1332) (b62bf5e)

5.6.1 (2021-03-30)

Bug Fixes

  • remove acquire timeout listener on return of session (#1327) (72c7cce), closes #1324

5.6.0 (2021-03-20)

Features

Bug Fixes

5.5.0 (2021-02-19)

Features

Bug Fixes

  • deps: update dependency google-auth-library to v7 (#1305) (329c901)
  • sample-test: ensure instance is created before proceeding with tests (#1291) (577357a)
  • wrong gaxOptions argument in sample (#1294) (8fec23a)

5.4.0 (2020-12-02)

Features

  • support callbacks with database getRestoreInfo(), getState(), getOperations() (#1230) (b56758b)

Bug Fixes

  • browser: check for fetch on window (32ac608)
  • do not modify options object, use defaultScopes (#1264) (6628c6a)
  • deps: update dependency big.js to v6 (#1244) (259a51e)
  • do not create sessions after getDatabases call (#1228) (53d5f37)
  • deps: update dependency @google-cloud/precise-date to v2 (#1240) (38dfec2)
  • deps: update dependency yargs to v16 (#1233) (75fd09a)

5.3.0 (2020-09-04)

Features

Bug Fixes

5.2.1 (2020-07-07)

Bug Fixes

  • remove error listener to prevent memory leak (#1168) (523bd67)

Performance Improvements

5.2.0 (2020-06-30)

Features

  • add code sample for creating an instance (#1073) (ab6dc62)
  • secrets: begin migration to secret manager from keystore (#1092) (2031652)

Bug Fixes

  • handle fallback option properly (#1146) (70d3f2c)
  • samples-test: race condition in deleteData sample (#1156) (39d8f0c)
  • race condition in "should transfer value from one record to another using DML statements within a transaction test" (#1159) (0c46714)
  • set displayName in CreateInstance sample (#1145) (f9e47d9)
  • set instanceId to the given id (#1094) (8973cbc), closes #1093
  • unskip PDML tests when run against emulator (#1150) (8465482)
  • update DELETE samples to match docs (#1072) (3336e04)
  • update node issue template (#1157) (27d0699)

Performance Improvements

5.1.0 (2020-06-04)

Features

  • expose displayName in createInstance (#798) (39efda1)
  • increase sessions in the pool in batches (#963) (91c53cb)
  • support callbacks for exists(), getState(), getExpireTime() methods (#1070) (7736080)

Bug Fixes

5.0.0 (2020-05-14)

⚠ BREAKING CHANGES

  • types: properly format listing methods with gaxOptions (#925)
  • types: types for createInstance (#805)
  • add typings for top level object (#781)
  • deps: update dependency @google-cloud/common to v3 (#875)
  • drop Node.js 8 support.

Features

  • add typings for top level object (#781) (c2b6f68)
  • check status of long running operation by its name (#937) (5035e11)
  • run and runStream can return query stats (#857) (1656e4f)
  • spanner backup and restore support (#855) (967903c)

Bug Fixes

  • deps: update dependency @google-cloud/common to v3 (#875) (f3da343)
  • deps: update dependency @google-cloud/paginator to v3 (#871) (d3b2f2c)
  • deps: update dependency @google-cloud/precise-date to v2 (#873) (8e8b29c)
  • deps: update dependency @google-cloud/projectify to v2 (#870) (e77460b)
  • deps: update dependency @google-cloud/promisify to v2 (#868) (afe4b15)
  • types: fix type of ReadRequest (#876) (990fec2)
  • types: properly format listing methods with gaxOptions (#925) (23958ae)
  • delete old instances then create new instance (#955) (96813f8)
  • remove eslint, update gax, fix generated protos, run the generator (#897) (7cfba21)
  • remove src/common-grpc/operation.ts (#879) (a30d2b4), closes #878
  • remove typescript conversion leftovers (#901) (ccf1b61)
  • skip some tests when run against the emulator (#933) (2d91757)
  • update spanner package in sample (#930) (5624b7b)
  • use DELETE FROM for consistency (#923) (0854c70)
  • types: types for createInstance (#805) (67b0f54)

Build System

  • drop node8 and convert to TypeScript (#888) (4116f81)

4.8.0 (2020-03-12)

Features

4.7.0 (2020-02-27)

Features

  • export protos in src/index.ts (0fa0f93)

4.6.2 (2020-02-14)

Bug Fixes

  • Correctly parse metadata from BatchDML response + fix flaky system test (#825) (8b95da7)
  • retry 'Session not found' errors on getSnapshot (#819) (59bafbf)
  • retry 'Session not found' for r/w tx (#824) (1b393c4)

4.6.1 (2020-01-29)

Bug Fixes

  • enum, bytes, and Long types now accept strings (#816) (e63914d)
  • fixed wrong return type of Database.run(..) (#810) (10c31d8), closes #809
  • retry Session not found for Database.run(..) (#812) (6a48fd6)
  • use PreciseDate instead of Date for min read timestamp (#807) (da8c2f8)

4.6.0 (2020-01-16)

Features

  • add fieldNames option in instance#getMetadata() (#760) (fa3154e)

4.5.2 (2020-01-15)

Bug Fixes

  • max backoff should be 32 seconds (#792) (c697240)
  • retry executeStreamingSql when error code is retryable (#795) (1491858), closes #620

4.5.1 (2020-01-08)

Bug Fixes

  • session pool should only create session if pending<=waiters (#791) (75345b1), closes #790

4.5.0 (2020-01-06)

Features

  • include potential leaked session stacktraces in error (#759) (1c0cf27)

Bug Fixes

  • clear stack of session while preparing new r/w tx (#768) (c852709)
  • delete env var after test if it was not set (#774) (7a1f40d)
  • end readWrite transaction in sample (#766) (f419e27)
  • return different databases for different pool options (#754) (106c7a5)
  • session pool should use push/pop and return sessions lifo (#776) (384bde1)
  • transaction runner should not timeout before first attempt (#789) (c75076e), closes #786
  • year zero was not accepted for SpannerDate (#783) (0ceb862)

4.4.1 (2019-12-16)

Bug Fixes

  • get stacktrace before any async method call (#756) (3091a78)

4.4.0 (2019-12-10)

Features

Bug Fixes

  • changes to default rpc timeouts (da066fc)
  • deps: pin TypeScript below 3.7.0 (7b1e07b)
  • deps: update dependency yargs to v15 (#736) (e289890)
  • docs: snippets are now replaced in jsdoc comments (#731) (843ce6f)
  • createInstance should return a value (#747) (16c013f)
  • include long import in proto typescript declaration file (#732) (6fe0757)
  • restore SessionLeakError name after super call (#745) (d04609b)

4.3.0 (2019-11-05)

Features

Bug Fixes

  • deps: bump google-gax to 1.7.5 (#712) (03384d4)
  • don't wrap SpannerDate so timezone does not affect results (#711) (86c0ae5)

4.2.0 (2019-10-02)

Bug Fixes

Features

4.1.0 (2019-09-16)

Bug Fixes

  • deps: update dependency yargs to v14 (#680) (add2f05)
  • types: import request types from teeny-request (#682) (a1ecd80)
  • set proper version # for x-goog-api-client (#681) (f300fad)

Features

  • load protos from JSON, grpc-fallback support (0b3fb90)
  • support batch create sessions (#685) (7bc58cf)
  • use JSON proto for transaction-runner (#690) (279fc97)

4.0.2 (2019-08-09)

Bug Fixes

  • allow calls with no request, add JSON proto (4a478a7)
  • deps: use the latest extend (#678) (a094fdd)

4.0.1 (2019-07-29)

Bug Fixes

  • deps: update dependency @google-cloud/paginator to v2 (#668) (86d3638)
  • deps: update dependency google-auth-library to v5 (#669) (c6d165e)
  • docs: move docs under overloads to be picked up by JSDoc (#666) (be10eb1)

4.0.0 (2019-07-19)

⚠ BREAKING CHANGES

  • deps: this will ship async/await in the generated code
  • upgrade engines field to >=8.10.0 (#587)

Bug Fixes

  • deps: update dependency @google-cloud/common-grpc to v1 (#607) (084dc8c)
  • deps: update dependency @google-cloud/paginator to ^0.2.0 (#560) (8fe33a1)
  • deps: update dependency @google-cloud/paginator to v1 (#593) (bfb2255)
  • deps: update dependency @google-cloud/precise-date to v1 (#600) (f52494f)
  • deps: update dependency @google-cloud/projectify to v1 (#591) (22713c1)
  • deps: update dependency @google-cloud/promisify to v1 (#592) (cb76922)
  • deps: update dependency arrify to v2 (#577) (6e0ddc8)
  • deps: update dependency google-auth-library to v4 (#599) (21b9995)
  • deps: update dependency google-gax to ^0.26.0 (#586) (0f88be2)
  • deps: update dependency merge-stream to v2 (#624) (3aa676d)
  • deps: update dependency p-queue to v4 (#558) (7547e21)
  • deps: update dependency p-queue to v5 (#578) (7827fb4)
  • deps: update dependency p-queue to v6.0.2 (#643) (ace1359)
  • deps: upgrade to google-gax 1.x (#651) (a32e838)
  • docs: add google.type namespace (#605) (5cc6dc1)
  • docs: link to reference docs section on googleapis.dev (#654) (2379dc2)
  • docs: move to new client docs URL (#647) (7dec1bd)
  • transaction: set/update seqno for all sql requests (#661) (102cae1)
  • DEADLINE_EXCEEDED is no longer retried (#598) (1cac4fc)
  • include 'x-goog-request-params' header in requests (#573) (e0cb9dc)
  • treat deadline errors as idempotent (#602) (b3d494a)
  • update retry config (#650) (f1e8104)

Build System

Features

  • add .repo-metadata.json and move to new README template (#636) (11007cf)
  • support apiEndpoint override (#634) (6a5eb36)
  • support apiEndpoint override in client constructor (#639) (f6ebb27)

Miscellaneous Chores

v3.1.0

03-06-2019 20:13 PST

New Features

  • feat(transaction): batch dml (#550)

Dependencies

  • chore(deps): update dependency @types/sinon to v7.0.9 (#553)
  • chore(deps): fix broken dep types (#549)

Documentation

  • docs: Update grammar (#544)

Internal / Testing Changes

  • chore: update proto docs and code style
  • chore(deps): use bundled p-queue types (#547)
  • build: update release configuration (#545)
  • build: use node10 to run samples-test, system-test etc (#551)

v3.0.0

02-25-2019 12:38 PST

Breaking Changes

  • breaking: refactor(transaction): split logic into new classes (#506)
  • breaking: feat(timestamp): create new date/timestamp classes (#517)
  • fix: run generator to bring in streaming retry configs (#448)

Read-only Transactions (Snapshots) are no longer runnable via Database#runTransaction (#506)

Database#runTransaction is useful if want to replay a Transaction in its entirety in case you run into an ABORTED error. This should never happen with Snapshots, so it felt like it was time to create a new method just for them. This change also means that runTransaction will only ever return read-write transactions.

Before

const bounds = {
  readOnly: true,
  strong: true,
};

database.runTransaction(bounds, (err, transaction) => {
  // ...
});

After

const bounds = {
  strong: true,
};

database.getSnapshot(bounds, (err, snapshot) => {
  // ...
});

Timestamp bounds now offer nanosecond precision (#506)

This change allows you to specify a Snapshot read timestamp with more precision. Previously one could only specify in seconds, but now we support both milliseconds and nanoseconds.

Before

const bounds = {
  exactStaleness: 5
};

const bounds = {
  readTimestamp: Date.now()
};

After

const bounds = {
  // millisecond precision for staleness
  exactStaleness: 5000,

  // or if you need nano/micro precision for staleness
  exactStaleness: {seconds: 5, nanos: 321} // => 5000000321 nanoseconds
};

const bounds = {
  readTimestamp: Spanner.timestamp('2019-01-12T00:30:35.381101032Z')
};

Transaction#end changes. (#506)

Transactions saw a sizeable refactor with this version, previously end() performed a number of asynchronous tasks when called, however this is no longer true. Because of this, there isn't much of a need to track when end is finished, so we've dropped the callback parameter.

Additionally, end() will now be called automatically for failed calls to Transaction#commit() and Transaction#rollback(). If your code calls end after a failed commit/rollback, it will simply no-op.

Before

transaction.end(callback);

After

transaction.end();
callback();

Session#beginTransaction was removed (#506)

Spanner supports 4 different types of Transactions:

  • ReadWrite
  • ReadOnly
  • PartitionedDml
  • Batch

Using one method for all types became cumbersome when trying to manage the various options available to each, now each type has its own method.

Before

const transaction = await session.beginTransaction({readWrite: true});
const snapshot = await session.beginTransaction({readOnly: true});

After

const transaction = session.transaction();
await transaction.begin();

const snapshot = session.snapshot({strong: true});
await snapshot.begin();

Timestamps now represented by @google-cloud/precise-time (#517)

While Spanner supports timestamps with nanosecond precision, JavaScript Dates do not. So we created the PreciseDate object which extends the native Date and adds both microsecond and nanosecond support.

Before

const timestamp = Spanner.timestamp('2019-01-12T00:30:35.381101032Z');
// => {value: '2019-01-12T00:30:35.381Z'}

After

// PreciseDate object
const timestamp = Spanner.timestamp('2019-01-12T00:30:35.381101032Z');
timestamp.toJSON(); // => '2019-01-12T00:30:35.381101032Z'
timestamp.toFullTimeString(); // => '1547253035381101032' (nanoseconds)

SpannerDate now extends the native Date object. (#517)

Since Timestamps saw an update, it made sense to give Spanner Date objects a similar update. The Spanner.date() method now returns a native Date object.

Before

const date = Spanner.date('3-22-2018');
// => {value: '2018-3-22'}

After

// Date object
const date = Spanner.date('3-22-2018');
date.toJSON(); // => '2018-3-22'

New Features

  • refactor(types): enable noImplicitAny in session-pool.ts (#508)
  • refactor(table): improve typescript defs (#495)
  • refactor(ts): partial-result-stream types/refactor (#488)
  • refactor(codec): improve typescript defs (#490)
  • chore(SessionPool): improve typescript types (#479)
  • chore(typescript): add types for spanner gapic (#487)
  • refactor(ts): enable noImplicitAny on src/session.ts (#457)

Bug Fixes

  • fix: throw on invalid credentials (#522)
  • fix(transaction): re-use session in transaction runners (#540)

Dependencies

  • chore(deps): update dependency mocha to v6 (#532)
  • fix(deps): update dependency @google-cloud/promisify to ^0.4.0 (#524)
  • chore(deps): update dependency @types/p-retry to v3 (#521)
  • fix(deps): update dependency yargs to v13 (#520)
  • fix(deps): update dependency @google-cloud/common-grpc to ^0.10.0 (#504)
  • fix(deps): update dependency google-gax to ^0.25.0 (#505)
  • chore(deps): update dependency eslint-config-prettier to v4 (#502)
  • fix(deps): update dependency google-gax to ^0.24.0 (#501)
  • fix(deps): update dependency google-auth-library to v3 (#498)
  • fix(deps): update dependency google-gax to ^0.23.0 (#496)
  • chore(deps): update dependency concat-stream to v2 (#489)
  • refactor: removed async from dependency list (#449)
  • chore(deps): update dependency @types/sinon to v7 (#480)
  • fix(deps): update dependency p-retry to v3 (#481)
  • chore(deps): update dependency typescript to ~3.2.0 (#459)

Documentation

  • docs: fixed example for table.upsert() (#533)
  • docs: update links in contrib guide (#525)
  • docs: update contributing path in README (#515)
  • docs: add lint/fix example to contributing guide (#512)
  • docs: fix example comments (#511)
  • chore: update proto licenses
  • build: check broken links in generated docs (#491)
  • fix(docs): remove unused long running operations and IAM types
  • refactor: modernize sample tests (#484)
  • docs: fix links in docstrings (#467)
  • docs: fix typo (#465)
  • chore: update license file (#464)
  • docs: update readme badges (#462)
  • docs(samples): Add sample to delete using a mutation. (#458)

Internal / Testing Changes

  • chore: add spanner_grpc_config.json and enable grpc-gcp support for spanner (#503)
  • build: use linkinator for docs test (#523)
  • build: create docs test npm scripts (#519)
  • build: test using @grpc/grpc-js in CI (#516)
  • chore: move CONTRIBUTING.md to root (#514)
  • refactor: improve generated code style. (#510)
  • build: ignore googleapis.com in doc link check (#500)
  • fix: fix the sample tests (#486)
  • chore(build): inject yoshi automation key (#478)
  • chore: update nyc and eslint configs (#477)
  • chore: fix publish.sh permission +x (#475)
  • fix(build): fix Kokoro release script (#474)
  • build: add Kokoro configs for autorelease (#473)
  • chore: always nyc report before calling codecov (#469)
  • chore: nyc ignore build/test by default (#468)
  • fix(build): fix system key decryption (#460)
  • chore: temporarily disable gts (#534)

v2.2.1

11-28-2018 10:43 PST

Implementation Changes

  • Update package.json to include the build directory (#454)

v2.2.0

11-27-2018 09:13 PST

Implementation Changes

  • fix: transaction async error handling that not thrown the full error (#447)
  • fix(transaction): accept json options in run/runStream (#446)
  • refactor(transaction): error handling (#360)
  • refactor(ts): enable noImplicitThis in the tsconfig (#411)
  • refactor(ts): use import/export for local files (#408)
  • refactor(ts): add type packages for many things (#406)
  • refactor(ts): convert tests to typescript (#404)
  • refactor(typescript): rename src and system-test files to *.ts (#402)
  • refactor(typescript): perform initial TypeScript conversion (#384)
  • fix: Only run mutations inside of a transaction. (#361)

New Features

  • feat(session): add label support (#373)

Dependencies

  • chore(deps): update dependency @types/sinon to v5.0.7 (#444)
  • fix: Pin @types/sinon to last compatible version (#443)
  • chore(deps): update dependency @types/p-queue to v3 (#440)
  • fix(deps): update dependency google-gax to ^0.22.0 (#435)
  • chore(deps): update dependency gts to ^0.9.0 (#434)
  • chore(deps): update dependency @google-cloud/nodejs-repo-tools to v3 (#429)
  • chore(deps): update dependency @types/is to v0.0.21 (#426)
  • fix(deps): update dependency through2 to v3 (#423)
  • chore: remove unused google-proto-files dep (#421)
  • chore(deps): update dependency eslint-plugin-node to v8 (#407)
  • refactor: drop dependency on delay (#383)
  • fix(deps): update dependency google-proto-files to ^0.17.0 (#369)
  • chore(deps): update dependency sinon to v7 (#371)

Documentation

  • docs(samples): updated samples code to use async await (#385)
  • Add Cloud Spanner DML/PDML samples. (#366)

Internal / Testing Changes

  • chore: add synth.metadata
  • test: fix broken tests (#441)
  • refactor(samples): convert ava tests to mocha (#400)
  • chore: update eslintignore config (#433)
  • chore(build): fix lint rules and build for generated code (#430)
  • chore: drop contributors from multiple places (#427)
  • chore: use latest npm on Windows (#425)
  • fix: update source location for synth (#422)
  • fix: re-enable linting and formatting (#420)
  • chore: improve typescript config and types (#417)
  • chore: update CircleCI config (#416)
  • chore: run gts fix (#413)
  • chore: remove old issue template (#397)
  • chore: update issue templates (#401)
  • build: run tests on node11 (#395)
  • chores(build): do not collect sponge.xml from windows builds (#389)
  • chores(build): run codecov on continuous builds (#386)
  • chore: update new issue template (#382)
  • fix(tests): use unique label for tests (#367)
  • build: fix codecov uploading on Kokoro (#372)
  • build(kokoro): test with spanner key (#364)

v2.1.0

Implementation Changes

  • chore: use arrow functions (#359)
  • fix: change exists to return false on error code 5 (#353)
  • Switch to let/const (#328)
  • Minor: wrap the inner error on retried transactions and return when deadline exceeded (#309)
  • chore: convert index to es6 class (#306)
  • Fix p-retry is accepting function not object/promise (#312)

New Features

  • feat: dml/pdml support (#348)
  • feat(table): drop method and additional error handling to delete (#358)
  • feat(PartialResultStream): emit raw responses as event (#357)
  • feat(transaction): add backup backoff delay (#350)

Dependencies

  • chore(deps): update dependency eslint-plugin-prettier to v3 (#351)
  • fix(deps): update dependency @google-cloud/common-grpc to ^0.9.0 (#339)
  • fix(deps): update dependency google-gax to ^0.20.0 (#327)
  • fix(deps): update dependency delay to v4 (#322)
  • fix: upgrade to the latest common-grpc (#320)
  • fix(deps): update dependency google-auth-library to v2 (#319)
  • fix(deps): update dependency p-queue to v3 (#317)
  • chore(deps): update dependency nyc to v13 (#314)

Documentation

  • docs: add typedefs for commit timestamp (#356)
  • docs: various jsdoc fixes (#352)

Internal / Testing Changes

  • chore: update auto-generated config (#362)
  • chore: change queries to return expected values (#355)
  • Update CI config (#354)
  • chore: make sure workloadb benchmark runs properly (#349)
  • test: Add delay for system test. (#16)
  • Update QuickStart to use "new" syntax for creating Spanner client. (#344)
  • test: remove appveyor config (#342)
  • Update CI config (#341)
  • Fix the failing lint rules (#338)
  • Enable prefer-const in the eslint config (#337)
  • soften assertion in system tests (#335)
  • Update protos and comments (#334)
  • fix string comparison in system test (#333)
  • Enable no-var in eslint (#331)
  • Add synth templates (#330)
  • test: throw on deprecation (#279)
  • Retry npm install in CI (#323)
  • Re-generate library using /synth.py (#316)
  • Fix color highlighting in CHANGELOG.md (#313)
  • Update sample dependency @google-cloud/spanner to v2 (#310)
  • Re-generate library using /synth.py (#308)

v2.0.0

Breaking Changes

  • Drop support for Node.js v4.x.x and v9.x.x (#226)

  • Use es style imports (#302) The import syntax for this library has changed to be es module compliant.

    Old code

    const spanner = require('@google-cloud/spanner')();
    // or
    const Spanner = require('@google-cloud/spanner');
    const spanner = new Spanner();

    New code

    const {Spanner} = require('@google-cloud/spanner');
    const spanner = new Spanner();

New Features

  • add runTransactionAsync method (#294)
    const {Spanner} = require('@google-cloud/spanner');
    const spanner = new Spanner();
    
    const instance = spanner.instance('my-instance');
    const database = instance.database('my-database');
    
    await database.runTransactionAsync(async (transaction) => {
        const [rows] = await transaction.run('SELECT * FROM MyTable');
        const data = rows.map(row => row.thing);
        await transaction.commit();
        return data;
    }).then(data => {
      // ...
    });
  • feature(database): make session pool hot swappable (#243)

Implementation Changes

  • feat: use es style imports (#302)
  • fix: perform type check on grpc value (#300)
  • chore: use es classes in a few places (#297)
  • chore: do not use npm ci (#292)
  • chore: split the common module (#289)
  • test: fix strict equal assertions (#287)
  • chore: ignore package-lock.json (#286)
  • chore: use let and const (#283)
  • chore: update renovate config (#281)
  • Re-generate library using /synth.py (#282)
  • chore: use assert.deepStrictEqual instead of assert.deepEqual (#274)
  • chore: require node 8 for samples (#273)
  • test: use strictEqual in tests (#267)
  • use node_library not not internal generate method (#247)
  • Configure Renovate (#239)
  • fix: drop support for node.js 4.x and 9.x (#226)

Dependencies

  • fix(deps): update dependency google-gax to ^0.19.0 (#298)
  • chore(deps): update dependency eslint-config-prettier to v3 (#295)
  • fix(deps): update dependency google-gax to ^0.18.0 (#278)
  • chore(deps): update dependency eslint-plugin-node to v7 (#266)
  • refactor: update auth library, common-grpc (#256)
  • fix(deps): update dependency yargs to v12 (#254)
  • chore(deps): update dependency yargs to v12 (#252)
  • chore(deps): update dependency sinon to v6.0.1 (#250)
  • chore(package): update eslint to version 5.0.0 (#240)
  • chore: update sample lockfiles (#246)
  • Update to support google-gax v0.17 (#244)
  • fix(package): update @google-cloud/common-grpc to version 0.7.1 (#235)
  • refactor: drop dependency on safe-buffer (#232)
  • refactor: remove dependency generic-pool (#231)
  • refactor: drop dependency on lodash.flatten (#233)
  • refactor: remove array-uniq as dependency (#227)
  • refactor: remove string-obj-format (#229)
  • refactor: remove methmeth as a dependency (#228)
  • chore: upgrade several dependencies (#221)

Internal / Testing Changes

  • chore: move mocha options to mocha.opts (#272)
  • refactor: drop repo-tool as an exec wrapper (#248)
  • fix: update linking for samples (#242)
  • Adding Spanner STRUCT param samples (#219)