Skip to content

V25.1 - #549

Open
Lewis-Clayton wants to merge 21 commits into
masterfrom
v25.1
Open

V25.1#549
Lewis-Clayton wants to merge 21 commits into
masterfrom
v25.1

Conversation

@Lewis-Clayton

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

Copy link
Copy Markdown
Contributor

Summary

Upgrades the library to Google Ads API v25.1, depending on google-ads-node@25.1.0-beta.1, google-gax@^6.3.0 and google-auth-library@^11. Published under the beta dist-tag as 25.1.0-beta.0, then 25.1.0-beta.1 with the review fixes, for testing ahead of the stable release.

Alongside the version upgrade, the package now ships CommonJS and ES module builds behind an export map, and two open issues are addressed.

Version upgrade

  • google-ads-api → v25.1; google-ads-node → v25.1.0; google-gax → v6.3.0; google-auth-library → v11
  • Node.js 22 or newer is required (engines, CI matrix 22.x and 24.x)
  • New service: MultiPartyAuthReviewService; new resource names for the lift measurement resources and MultiPartyAuthReview; 21 new enums
  • Service clients are pinned to the googleapis.com universe domain so the new auth stack does not walk the application-default-credentials chain (about three seconds per new service client, plus a MetadataLookupWarning outside Google Cloud)
  • gRPC credentials adapt google-auth-library 11's Headers return value to the plain object @grpc/grpc-js expects

ESM export map

  • build/cjs and build/esm are emitted from the same source; exports maps ., ./enums, ./fields and ./package.json with import/require conditions and their own types
  • googleAdsVersion is exported from the package root
  • Relative imports carry .js extensions and the codegen template emits them too; stream-chain/stream-json are imported as defaults because Node's ESM loader cannot see their named exports
  • CI runs a package smoke test (tests/package.mjs: ESM import, CommonJS require, subpaths, deep imports rejected) and @arethetypeswrong/cli@0.18.5 --profile node16 --pack .
  • Generated files are formatted with prettier on regeneration (postcompile), which keeps their diffs reviewable

Breaking changes

  • Node.js 22+
  • Deep imports of build files (e.g. google-ads-api/build/src/protos/autogen/enums) no longer resolve; use the root, google-ads-api/enums or google-ads-api/fields
  • Removed with v25: CampaignLifecycleGoalService, CustomerLifecycleGoalService, the two lifecycle goal resources, and the CustomerAcquisitionOptimizationMode enum

Fixes

  • getGoogleAdsError crashes decoding a REST-style structured error (e.g. SERVICE_DISABLED), masking the real error #548: getGoogleAdsError() returns the original error instead of throwing a TypeError when no GoogleAdsFailure trailer is present
  • Expose gRPC channel options (keepalive) so an unusable channel fails fast instead of hanging #547: new grpc_channel_options client option forwards gRPC channel settings (keepalive etc.) to every service client; cached service clients are keyed by client id, refresh token and these options, and sslCreds/universeDomain stay under library control
  • Upgrade JWS version #529: google-ads-api never pinned jws; the repo lockfile now resolves 4.0.1 and the changelog tells consumers to refresh theirs
  • The repository lockfile was regenerated: runtime dependencies now resolve to patched versions (protobufjs 7.6.6, @grpc/grpc-js 1.14.4, axios 1.20.0, form-data 4.0.6, follow-redirects 1.16, @protobufjs/utf8 1.1.1), which closes every runtime advisory yarn audit reported except stream-json (fix requires its 3.x major; the affected filter classes are not used here). ts-jest is pinned at 29.3.4 because 29.4 resolves axios's dual typings inconsistently and breaks a spec

Test plan

  • yarn lint, yarn test (197 tests) on Node 22.23 and 24.19
  • yarn build; arethetypeswrong and publint clean on the packed tarball; ESM and CommonJS runtime smoke through the export map
  • Published 25.1.0-beta.0 under the beta dist-tag
  • Publish 25.1.0-beta.1 (depends on google-ads-node 25.1.0-beta.1; carries the review fixes) under the beta dist-tag and test downstream, including OAuth token refresh on Node 24.17+
  • Update version to 25.1.0 after review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-10T12:41:54.137945Z e7feda2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e7feda2ec9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/service.ts Outdated
const client = new protoService({
sslCreds: this.getCredentials(),
universeDomain: "googleapis.com",
...this.clientOptions.grpc_channel_options,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include channel options in the service cache key

When two GoogleAdsApi instances use the same client ID and refresh token but different grpc_channel_options, the module-level cache key at line 149 treats their service clients as identical. After the first instance populates the cache, the second returns that existing client before this spread is evaluated, so its keepalive, proxy, message-size, or other channel settings are silently ignored for up to ten minutes. Partition the cache by the channel configuration or scope cached services to the owning client instance.

Useful? React with 👍 / 👎.

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