diff --git a/handwritten/bigquery-storage/package.json b/handwritten/bigquery-storage/package.json index a095062f6e3..76514c7021a 100644 --- a/handwritten/bigquery-storage/package.json +++ b/handwritten/bigquery-storage/package.json @@ -35,7 +35,6 @@ "@google-cloud/precise-date": "^5.0.0", "apache-arrow": "^21.0.0", "core-js": "^3.41.0", - "extend": "^3.0.2", "google-auth-library": "^10.0.0", "google-gax": "^5.0.0", "long": "^5.2.0" @@ -45,7 +44,6 @@ }, "devDependencies": { "@google-cloud/bigquery": "^8.0.0", - "@types/extend": "^3.0.4", "@types/mocha": "^10.0.10", "@types/node": "^22.13.14", "@types/sinon": "^17.0.4", diff --git a/handwritten/bigquery-storage/src/managedwriter/encoder.ts b/handwritten/bigquery-storage/src/managedwriter/encoder.ts index f3172339eda..118620e9706 100644 --- a/handwritten/bigquery-storage/src/managedwriter/encoder.ts +++ b/handwritten/bigquery-storage/src/managedwriter/encoder.ts @@ -19,7 +19,6 @@ import { isProtoCompatible, normalizeDescriptor, } from '../adapt/proto'; -import * as extend from 'extend'; import {JSONObject, JSONValue} from './json_writer'; import {PreciseDate} from '@google-cloud/precise-date'; @@ -94,7 +93,7 @@ export class JSONEncoder { } private convertRow(source: JSONObject, ptype: protobuf.Type): JSONObject { - const row = extend(true, {}, source); + const row = structuredClone(source); const keys = Object.keys(row).map(key => { if (!isProtoCompatible(key)) { const newFieldName = generatePlaceholderFieldName(key);