Skip to content

Google Ads v24.1#140

Open
Lewis-Clayton wants to merge 2 commits into
masterfrom
google-ads-v24
Open

Google Ads v24.1#140
Lewis-Clayton wants to merge 2 commits into
masterfrom
google-ads-v24

Conversation

@Lewis-Clayton

@Lewis-Clayton Lewis-Clayton commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrade to Google Ads API v24.1 (google-ads-node 24.1.0-beta.0, google-gax 5.0.7), plus a batch of correctness fixes around parsing, field masks, report streams, and the service cache.

Breaking change

  • parse() now returns plain objects for message-typed leaves (e.g. change_event.old_resource) instead of protobuf message instances, and converts all nested int64 values from Long to JavaScript number. Code reading .low/.high on nested values, calling protobuf methods on nested messages, or relying on protobuf prototypes must use the plain values. Nested int64s above 2^53 lose precision (consistent with the existing top-level behaviour). See src/parser.ts and src/parser.spec.ts.

Codegen / new surface

  • New services: ReservationService, YouTubeVideoUploadService
  • New resource names: AppTopCombinationView, CartDataSalesView, VideoEnhancement, YouTubeVideoUpload
  • New enums (ReservationRequestType, PreviewType) and new ExperimentType values (ADOPT_AI_MAX, ADOPT_BROAD_MATCH_KEYWORDS, OPTIMIZE_ASSETS, PMAX_REPLACEMENT_SHOPPING)
  • New fields including segments.mobile_device_platform and customer_user_access.passkey_enabled

Fixes

  • Codegen regex bug — a stateful /g regex in scripts/fields.ts dropped resource_name for consecutive view resources. Nine pre-existing views (keyword_view, paid_organic_search_term_view, ad_schedule_view, display_keyword_view, hotel_performance_view, location_view, matched_location_interest_view, targeting_expansion_view, travel_activity_group_view) now expose resource_name in parsed rows.
  • getFieldMask() hardening — throws a descriptive Error on circular references instead of overflowing the stack; treats Buffer / Uint8Array / Long values as leaves. Update masks built from payloads containing Long values no longer emit .low/.high/.unsigned paths that the API rejected.
  • Report streamsstreamer() now destroys the pipeline, JSON parser, and underlying response stream in a finally, so consumers that break out of for await early don't leak sockets.
  • Service cache TTL/dispose@isaacs/ttlcache floor bumped to ^1.4.0 for checkAgeOnGet: true (stale entries past TTL no longer returned), and loadService now calls get() once to close a TOCTOU race where expired-awaiting-purge resolved to undefined. Eviction calls close() defensively so a rejected promise or sync throw can't leak the channel.
  • listAccessibleCustomers() — uses a one-shot CustomerServiceClient with skipCache: true and closes it in finally, instead of polluting the long-lived service cache.
  • FAILURE_KEY drift guard — explicit check so a future google-ads-node bump that renames the key fails loudly rather than silently breaking error parsing.

@Lewis-Clayton Lewis-Clayton requested a review from avermeil June 11, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant