Repository navigation
V26.1 - #555
Open
Lewis-Clayton wants to merge 26 commits into
Open
V26.1#555Lewis-Clayton wants to merge 26 commits into
Lewis-Clayton wants to merge 26 commits into
Conversation
stream-json <= 3.4.0 has a quadratic-time denial of service in its path filters (GHSA-528h-pc64-c93x). This library only uses the parser and streamArray, which are not affected, but every install still pulls in a vulnerable stream-json 1.x and gets flagged for it. stream-json 3 is ESM-only and changed its API: - `new Parser(options)` becomes `parser.asStream(options)`, and `streamArray()` becomes `streamArray.asStream()`, imported from `stream-json/streamers/stream-array.js`. - stream-chain, which customer.ts imports directly, is now declared (^4.2.6) instead of arriving through stream-json. - The CJS build loads both packages with require(esm), which Node enables without a flag from 22.12, so engines moves from >=22 to >=22.12. - Neither tsconfig resolves types through package `exports`, so src/stream-json.d.ts points the streamer subpath at its file. - Jest compiles the two ESM packages to CommonJS for tests. New tests pin the error path every failed query() takes (handleStreamError): a GoogleAdsFailure with details, an API message without details, and a non-JSON body. They pass unchanged on stream-json 1.9.1 and 3.7.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Docs: - README: move the note into the optional client settings list and correct it (an empty token is omitted too, not only an absent one); drop the token from the listAccessibleCustomers snippet - examples/basic: drop the token from both runnable examples - CHANGELOG: version the entry as 25.1.1, describe the empty-string behaviour accurately, and note the ClientOptions type change under Breaking Changes - client.ts JSDoc: say empty behaves like unset - service.ts: keep only the comment that justifies the truthiness check Tests: - callHeaders: keep login/linked customer ids in the fixture so an early return cannot pass, cover unset and empty tokens, use toStrictEqual - request headers: assert the header on the outgoing REST request, with and without a token
…per tokens as unset
…e-expansion and fast-uri
… to search, and keep policy exemptions on default creates
…perations, and name LocalServices getters correctly
…n buffered queries, keep non-GoogleAdsFailure REST errors and numeric enums
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…d enums, leave undefined out of field masks, and correct the Jest guidance
…d gax internals, and test a cold require
…ir real expiry, once
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades the library to Google Ads API v26.1, depending on
google-ads-node@26.1.0-beta.0,google-gax@^6.16.0andgoogle-auth-library@^11.3.3. The version26.1.0-beta.0goes out under thebetadist-tag for testing ahead of the stable release.As a new major, this release also makes the package ES module-only, which lets it move to
stream-json3 (#554), makesdeveloper_tokenoptional (#550), and fixes a set of long-standing defects whose fixes change method shapes. CHANGELOG.md lists every breaking change with what to change in calling code.Version upgrade
CustomerBudgetNetworkSettingServiceandLocalServicesEligibilityService, two new resource names and 15 new enumsad_group_bid_modifierandcustomer.conversion_tracking_setting.enhanced_conversions_for_leads_enabledPackaging
"type": "module"with a singletscbuild and an export map oftypes+default, sorequire("google-ads-api")keeps working on Node 22.12+ throughrequire(esm)and returns the same module instance asimporttests/package.mjsasserts therequire/importidentity, andtests/package.cjsloads the package with a coldrequire()in its own process; arethetypeswrong runs with--profile esm-onlymodule: "nodenext"(TypeScript 5.8+) or"node20"(TypeScript 5.9+);node16andnode18report TS1479allowJsandesModuleInterop); the changelog carries a config verified on Jest 29 and 30tsc -p tsconfig.json);filesexcludesbuild/*.tsbuildinfoBreaking changes
customers,customerClientLinks,billingSetups…) take one resource instead of an arraymutateOptionson every path;BaseMutationHookArgsrequires it[]clears a repeated field,nullclears a field,undefinedleaves it alone (inmutateResourcestoo), and a key that names no field reaches the APIqueryStream,reportStreamandreportStreamRawtakeStreamRequestOptions/ReportStreamOptions; streams request summary rows withsummary_row_setting; stream hooks receiveReportStreamOptions, query hooks keepReportOptionsqueryandreportsendpage_tokenandvalidate_onlytosearch, and enforcemax_reporting_rowson decoded rows; query hooks no longer write into the caller's optionsGoogleAdsFailures only when a detail's@typenames one; every other REST failure surfaces as anErrorwith the API message (or the axioscodeand HTTPstatus) ascause, never the axios errorLROperationtypeslocalServicesLeadsandlocalServicesEligibilitiesClientOptions["developer_token"]has the typestring | undefinedFixes
operations, which protobuf serialisation dropped, so the API received onlycustomer_iddeveloper-tokenheader when the token holds nothing, an empty string or only whitespaceconfig.headersheld bothvalidate_onlyformutateResources, so a hook could not tell a dry run from a real mutationmutateResourceskeeps policy exemption keys whenoperationdefaults tocreate[]google.rpc.ErrorInfodetails, keep their diagnostic instead of aTypeErroror an emptyGoogleAdsFailure@grpc/grpc-js1.14.7,follow-redirects,brace-expansionandfast-uri;yarn auditreports nothing for runtime dependenciesTest plan
yarn lint,tsc -p tsconfig.json,yarn test(276 tests) andyarn test:packageon Node 22.23 and 24.21--profile esm-onlyon the packed tarball; a fresh project loads the tarball through bothrequire()andimportnodenextandnode2026.1.0-beta.0under thebetadist-tag and test downstream26.1.0under thelatestdist-tag