Skip to content

V24.1#546

Merged
Lewis-Clayton merged 18 commits into
masterfrom
v24.1
Jun 15, 2026
Merged

V24.1#546
Lewis-Clayton merged 18 commits into
masterfrom
v24.1

Conversation

@Lewis-Clayton

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

Copy link
Copy Markdown
Contributor

Summary

Upgrades the library to Google Ads API v24.1, depending on google-ads-node@24.1.0-beta.0 and google-gax@^5.0.7. Published to npm under the beta dist-tag as 24.1.0-beta.0 for testing ahead of the stable release.

Alongside the version upgrade, this branch fixes several bugs surfaced during a review of the parsing, streaming, and service-caching code paths.

Version upgrade

  • google-ads-api → v24.1; google-ads-node → v24.1.0; google-gax → v5.0.7
  • @isaacs/ttlcache floor raised to ^1.4.0 (required for checkAgeOnGet)
  • New services: ReservationService, YouTubeVideoUploadService
  • New resource names, enums (ReservationRequestType, PreviewType, new ExperimentType values), and fields (segments.mobile_device_platform, customer_user_access.passkey_enabled)

Breaking changes

  • parse() message-typed leaves now return plain objects instead of protobuf message instances, with all nested int64 values converted from Long to JavaScript numbers (e.g. change_event.old_resource). Code reading .low/.high from nested values must use the plain numbers. Values above Number.MAX_SAFE_INTEGER lose precision, consistent with existing behaviour for directly-selected fields.

Fixes

  • resource_name for ten view resources (incl. keyword_view, paid_organic_search_term_view) were dropped from parsed results by a code-generation bug; they are now included.
  • getFieldMask() now throws a descriptive Error on circular references (was a RangeError stack overflow) and treats typed arrays and Long values as leaves instead of recursing into them. Update masks built from payloads containing Long values previously included invalid .low/.high/.unsigned paths that the API rejected.
  • Report streams destroy their underlying response stream and JSON parser when consumers exit iteration early
  • Rejected close() calls during gRPC service cache eviction are now caught instead of surfacing as unhandled promise rejections (the dispose callback was previously async and fire-and-forget)
  • Expired-but-unpurged cache entries no longer resolve to undefined from loadService; stale clients past TTL are not returned
  • listAccessibleCustomers() closes its one-shot CustomerServiceClient instead of caching it
  • A guard test now fails if FAILURE_KEY drifts from the installed package's API version

Code-generation fix

  • The resource_name detection regex used the /g flag with .test(), carrying lastIndex between calls and skipping resource names tested consecutively — the cause of the ten missing entries above.

Test plan

  • yarn test green
  • Lint clean, formatted
  • CHANGELOG updated for 24.1.0
  • Beta validated downstream before promoting to latest

@Lewis-Clayton Lewis-Clayton requested a review from avermeil June 15, 2026 10:51
@Lewis-Clayton Lewis-Clayton merged commit e066efb into master Jun 15, 2026
2 checks passed
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.

2 participants