Skip to content

Commit

Permalink
chore!: upgrade to Node 14 (#1900)
Browse files Browse the repository at this point in the history
* chore!: upgrade to Node 14
---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Sofia Leon <sofialeon@google.com>
Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
Co-authored-by: Tom Andersen <tom-andersen@users.noreply.github.com>
  • Loading branch information
5 people committed Oct 3, 2023
1 parent 0afadef commit 1f5abb8
Show file tree
Hide file tree
Showing 36 changed files with 188 additions and 185 deletions.
6 changes: 3 additions & 3 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 Google LLC
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest
digest: sha256:b15a6f06cc06dcffa11e1bebdf1a74b6775a134aac24a0f86f51ddf728eb373e
# created: 2022-08-26T22:34:55.905845397Z
digest: sha256:8b6a07a38d1583d96b6e251ba208bd4ef0bc2a0cc37471ffc518841651d15bd6
# created: 2023-09-25T22:18:27.595486267Z
3 changes: 1 addition & 2 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ branchProtectionRules:
requiredStatusCheckContexts:
- "ci/kokoro: Samples test"
- "ci/kokoro: System test"
- docs
- lint
- test (12)
- test (14)
- test (16)
- test (18)
- cla/google
- windows
- OwlBot Post Processor
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [12, 14, 16]
node: [14, 16, 18, 20]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .kokoro/release/publish.cfg

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ also contains samples.

## Supported Node.js Versions

Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/).
Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule).
Libraries are compatible with all current _active_ and _maintenance_ versions of
Node.js.
If you are using an end-of-life version of Node.js, we recommend that you update
Expand Down
4 changes: 2 additions & 2 deletions dev/src/bulk-writer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -941,8 +941,8 @@ export class BulkWriter {
);

// Use the write with the longest backoff duration when determining backoff.
const highestBackoffDuration = pendingBatch.pendingOps.reduce((prev, cur) =>
prev.backoffDuration > cur.backoffDuration ? prev : cur
const highestBackoffDuration = pendingBatch.pendingOps.reduce(
(prev, cur) => (prev.backoffDuration > cur.backoffDuration ? prev : cur)
).backoffDuration;
const backoffMsWithJitter = BulkWriter._applyJitter(highestBackoffDuration);
const delayedExecution = new Deferred<void>();
Expand Down
6 changes: 3 additions & 3 deletions dev/src/collection-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {compareArrays} from './order';
*/
export class CollectionGroup<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
>
extends Query<AppModelType, DbModelType>
implements firestore.CollectionGroup<AppModelType, DbModelType>
Expand Down Expand Up @@ -197,13 +197,13 @@ export class CollectionGroup<
withConverter(converter: null): CollectionGroup;
withConverter<
NewAppModelType,
NewDbModelType extends firestore.DocumentData = firestore.DocumentData
NewDbModelType extends firestore.DocumentData = firestore.DocumentData,
>(
converter: firestore.FirestoreDataConverter<NewAppModelType, NewDbModelType>
): CollectionGroup<NewAppModelType, NewDbModelType>;
withConverter<
NewAppModelType,
NewDbModelType extends firestore.DocumentData = firestore.DocumentData
NewDbModelType extends firestore.DocumentData = firestore.DocumentData,
>(
converter: firestore.FirestoreDataConverter<
NewAppModelType,
Expand Down
2 changes: 1 addition & 1 deletion dev/src/document-change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type DocumentChangeType = 'added' | 'removed' | 'modified';
*/
export class DocumentChange<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
> implements firestore.DocumentChange<AppModelType, DbModelType>
{
private readonly _type: DocumentChangeType;
Expand Down
12 changes: 6 additions & 6 deletions dev/src/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import api = google.firestore.v1;
*/
export class DocumentSnapshotBuilder<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
> {
/** The fields of the Firestore `Document` Protobuf backing this document. */
fieldsProto?: ApiMapValue;
Expand Down Expand Up @@ -110,7 +110,7 @@ export class DocumentSnapshotBuilder<
*/
export class DocumentSnapshot<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
> implements firestore.DocumentSnapshot<AppModelType, DbModelType>
{
private _ref: DocumentReference<AppModelType, DbModelType>;
Expand Down Expand Up @@ -177,7 +177,7 @@ export class DocumentSnapshot<
*/
static fromUpdateMap<
AppModelType,
DbModelType extends firestore.DocumentData
DbModelType extends firestore.DocumentData,
>(
ref: firestore.DocumentReference<AppModelType, DbModelType>,
data: UpdateMap
Expand Down Expand Up @@ -584,7 +584,7 @@ export class DocumentSnapshot<
*/
export class QueryDocumentSnapshot<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
>
extends DocumentSnapshot<AppModelType, DbModelType>
implements firestore.QueryDocumentSnapshot<AppModelType, DbModelType>
Expand Down Expand Up @@ -950,7 +950,7 @@ export class DocumentMask {
*/
export class DocumentTransform<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
> {
/**
* @private
Expand Down Expand Up @@ -1001,7 +1001,7 @@ export class DocumentTransform<
*/
static fromUpdateMap<
AppModelType,
DbModelType extends firestore.DocumentData
DbModelType extends firestore.DocumentData,
>(
ref: firestore.DocumentReference<AppModelType, DbModelType>,
data: UpdateMap
Expand Down
2 changes: 1 addition & 1 deletion dev/src/query-partition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import api = protos.google.firestore.v1;
*/
export class QueryPartition<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
> implements firestore.QueryPartition<AppModelType, DbModelType>
{
private readonly _serializer: Serializer;
Expand Down
39 changes: 20 additions & 19 deletions dev/src/reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@ const NOOP_MESSAGE = Symbol('a noop message');
* @class DocumentReference
*/
export class DocumentReference<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
> implements
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData,
>
implements
Serializable,
firestore.DocumentReference<AppModelType, DbModelType>
{
Expand Down Expand Up @@ -618,7 +619,7 @@ export class DocumentReference<
withConverter(converter: null): DocumentReference;
withConverter<
NewAppModelType,
NewDbModelType extends firestore.DocumentData = firestore.DocumentData
NewDbModelType extends firestore.DocumentData = firestore.DocumentData,
>(
converter: firestore.FirestoreDataConverter<NewAppModelType, NewDbModelType>
): DocumentReference<NewAppModelType, NewDbModelType>;
Expand Down Expand Up @@ -675,7 +676,7 @@ export class DocumentReference<
*/
withConverter<
NewAppModelType,
NewDbModelType extends firestore.DocumentData = firestore.DocumentData
NewDbModelType extends firestore.DocumentData = firestore.DocumentData,
>(
converter: firestore.FirestoreDataConverter<
NewAppModelType,
Expand Down Expand Up @@ -918,7 +919,7 @@ class FieldFilterInternal extends FilterInternal {
*/
export class QuerySnapshot<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
> implements firestore.QuerySnapshot<AppModelType, DbModelType>
{
private _materializedDocs: Array<
Expand Down Expand Up @@ -1201,7 +1202,7 @@ enum LimitType {
*/
export class QueryOptions<
AppModelType,
DbModelType extends firestore.DocumentData
DbModelType extends firestore.DocumentData,
> {
constructor(
readonly parentPath: ResourcePath,
Expand Down Expand Up @@ -1235,7 +1236,7 @@ export class QueryOptions<
*/
static forCollectionGroupQuery<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
>(
collectionId: string,
converter = defaultConverter<AppModelType, DbModelType>()
Expand All @@ -1257,7 +1258,7 @@ export class QueryOptions<
*/
static forCollectionQuery<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
>(
collectionRef: ResourcePath,
converter = defaultConverter<AppModelType, DbModelType>()
Expand Down Expand Up @@ -1333,7 +1334,7 @@ export class QueryOptions<

withConverter<
NewAppModelType,
NewDbModelType extends firestore.DocumentData = firestore.DocumentData
NewDbModelType extends firestore.DocumentData = firestore.DocumentData,
>(
converter: firestore.FirestoreDataConverter<NewAppModelType, NewDbModelType>
): QueryOptions<NewAppModelType, NewDbModelType> {
Expand Down Expand Up @@ -1402,7 +1403,7 @@ export class QueryOptions<
*/
export class Query<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
> implements firestore.Query<AppModelType, DbModelType>
{
private readonly _serializer: Serializer;
Expand Down Expand Up @@ -2772,7 +2773,7 @@ export class Query<
withConverter(converter: null): Query;
withConverter<
NewAppModelType,
NewDbModelType extends firestore.DocumentData = firestore.DocumentData
NewDbModelType extends firestore.DocumentData = firestore.DocumentData,
>(
converter: firestore.FirestoreDataConverter<NewAppModelType, NewDbModelType>
): Query<NewAppModelType, NewDbModelType>;
Expand Down Expand Up @@ -2828,7 +2829,7 @@ export class Query<
*/
withConverter<
NewAppModelType,
NewDbModelType extends firestore.DocumentData = firestore.DocumentData
NewDbModelType extends firestore.DocumentData = firestore.DocumentData,
>(
converter: firestore.FirestoreDataConverter<
NewAppModelType,
Expand All @@ -2852,7 +2853,7 @@ export class Query<
*/
export class CollectionReference<
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
>
extends Query<AppModelType, DbModelType>
implements firestore.CollectionReference<AppModelType, DbModelType>
Expand Down Expand Up @@ -3107,7 +3108,7 @@ export class CollectionReference<
withConverter(converter: null): CollectionReference;
withConverter<
NewAppModelType,
NewDbModelType extends firestore.DocumentData = firestore.DocumentData
NewDbModelType extends firestore.DocumentData = firestore.DocumentData,
>(
converter: firestore.FirestoreDataConverter<NewAppModelType, NewDbModelType>
): CollectionReference<NewAppModelType, NewDbModelType>;
Expand Down Expand Up @@ -3164,7 +3165,7 @@ export class CollectionReference<
*/
withConverter<
NewAppModelType,
NewDbModelType extends firestore.DocumentData = firestore.DocumentData
NewDbModelType extends firestore.DocumentData = firestore.DocumentData,
>(
converter: firestore.FirestoreDataConverter<
NewAppModelType,
Expand All @@ -3185,7 +3186,7 @@ export class CollectionReference<
export class AggregateQuery<
AggregateSpecType extends firestore.AggregateSpec,
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
> implements
firestore.AggregateQuery<AggregateSpecType, AppModelType, DbModelType>
{
Expand Down Expand Up @@ -3424,7 +3425,7 @@ export class AggregateQuery<
export class AggregateQuerySnapshot<
AggregateSpecType extends firestore.AggregateSpec,
AppModelType = firestore.DocumentData,
DbModelType extends firestore.DocumentData = firestore.DocumentData
DbModelType extends firestore.DocumentData = firestore.DocumentData,
> implements
firestore.AggregateQuerySnapshot<
AggregateSpecType,
Expand Down Expand Up @@ -3587,7 +3588,7 @@ export function validateQueryOperator(
*/
export function validateDocumentReference<
AppModelType,
DbModelType extends firestore.DocumentData
DbModelType extends firestore.DocumentData,
>(
arg: string | number,
value: firestore.DocumentReference<AppModelType, DbModelType>
Expand Down
6 changes: 3 additions & 3 deletions dev/src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export class Transaction implements firestore.Transaction {
get<
AppModelType,
DbModelType extends firestore.DocumentData,
AggregateSpecType extends firestore.AggregateSpec
AggregateSpecType extends firestore.AggregateSpec,
>(
aggregateQuery: firestore.AggregateQuery<
AggregateSpecType,
Expand Down Expand Up @@ -150,7 +150,7 @@ export class Transaction implements firestore.Transaction {
get<
AppModelType,
DbModelType extends firestore.DocumentData,
AggregateSpecType extends firestore.AggregateSpec
AggregateSpecType extends firestore.AggregateSpec,
>(
refOrQuery:
| firestore.DocumentReference<AppModelType, DbModelType>
Expand Down Expand Up @@ -584,7 +584,7 @@ export class Transaction implements firestore.Transaction {
*/
export function parseGetAllArguments<
AppModelType,
DbModelType extends firestore.DocumentData
DbModelType extends firestore.DocumentData,
>(
documentRefsOrReadOptions: Array<
| firestore.DocumentReference<AppModelType, DbModelType>
Expand Down
2 changes: 1 addition & 1 deletion dev/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const defaultConverterObj: FirestoreDataConverter<DocumentData> = {
*/
export function defaultConverter<
AppModelType,
DbModelType extends DocumentData
DbModelType extends DocumentData,
>(): FirestoreDataConverter<AppModelType, DbModelType> {
return defaultConverterObj as FirestoreDataConverter<
AppModelType,
Expand Down
Loading

0 comments on commit 1f5abb8

Please sign in to comment.