Skip to content

Commit

Permalink
Merge pull request #123 from Opteo/v17.1
Browse files Browse the repository at this point in the history
Update to Google Ads API v17.1
  • Loading branch information
avermeil authored Sep 9, 2024
2 parents c8e40bb + d8e4019 commit 3c4e9c0
Show file tree
Hide file tree
Showing 1,474 changed files with 309,135 additions and 218,096 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ARG GOOGLE_ADS_VERSION
# Install dependencies
RUN apt update --allow-releaseinfo-change
RUN apt-get update -y
RUN apt-get install git wget pkg-config zip g++ zlib1g-dev unzip python-is-python3 -y
RUN apt-get install git wget pkg-config zip g++ zlib1g-dev unzip python-is-python3 software-properties-common default-jre -y
RUN apt-get install \
python3 \
python3-distutils \
Expand Down Expand Up @@ -50,7 +50,7 @@ RUN tar -xvzf googleads-nodejs.tar.gz -C .

RUN cd googleads-nodejs && \
npm uninstall google-gax && \
npm install opteo/gax-nodejs && \
npm install google-gax && \
rm -rf test/ system-test/

# horrible hack but no easy way to resolve this
Expand All @@ -61,4 +61,5 @@ RUN sed -i 's/request.keywordPlan/request.keyword_plan/' googleads-nodejs/src/${
sed -i 's/request.campaignExperiment/request.campaign_experiment/' googleads-nodejs/src/${GOOGLE_ADS_VERSION}/*.ts && \
sed -i 's/request.campaignDraft/request.campaign_draft/' googleads-nodejs/src/${GOOGLE_ADS_VERSION}/*.ts && \
sed -i 's/request.resourceName/request.resource_name/' googleads-nodejs/src/${GOOGLE_ADS_VERSION}/*.ts && \
sed -i 's/request.customerId/request.customer_id/' googleads-nodejs/src/${GOOGLE_ADS_VERSION}/*.ts
sed -i 's/request.customerId/request.customer_id/' googleads-nodejs/src/${GOOGLE_ADS_VERSION}/*.ts && \
sed -i 's/request.adGroupAd/request.ad_group_ad/' googleads-nodejs/src/${GOOGLE_ADS_VERSION}/*.ts
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Google Ads API version
# This only needs changing for major versions e.g. v8 -> v9
GOOGLE_ADS_VERSION=v16
GOOGLE_ADS_VERSION=v17

BUNDLE=googleads-nodejs.tar.gz
PACKAGE_BUILD=/package/googleads-nodejs
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<p align="center">
<a href="https://developers.google.com/google-ads/api/docs/release-notes">
<img src="https://img.shields.io/badge/google%20ads-v16-009688.svg?style=flat-square">
<img src="https://img.shields.io/badge/google%20ads-v17-009688.svg?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/google-ads-node">
<img src="https://img.shields.io/npm/v/google-ads-node.svg?style=flat-square">
Expand Down Expand Up @@ -40,10 +40,10 @@ npm install google-ads-node

## Upgrading API Versions

1. Fetch the latest changes in [Opteo/gax-nodejs](https://github.com/Opteo/gax-nodejs).
1. Update the official google-gax dependency to the latest version in `package.json`.
1. Update to the latest `gapic-tools` version in `/package/googleads-nodejs/package.json`.
1. Update to the latest `google-gax` version in `/package/googleads-nodejs/package.json` & `/package.json`.
1. Update `GOOGLE_ADS_VERSION` in the Makefile to the latest version (if required).
1. Run `make protos` to pull in the new protos and compile them.
1. Run `make protos` to pull in the new protos and compile them. This command will take around 10 minutes. There are often errors here that need to be fixed due to changes in bazel, the docker image, or the protos themselves. Fix these errors as they come up.
1. If upgrading to a new major version delete the old version folders from `package/googleads-nodejs/protos/google/ads/googleads/{OLD_VERSION}`, `package/googleads-nodejs/src/{OLD_VERSION}` and `package/googleads-nodejs/samples/generated/{OLD_VERSION}`.
1. Run `yarn` to prepare the package and install the latest dependencies.
1. Run `yarn test` to make sure everything worked (you may need to update the version numbers here).
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "google-ads-node",
"version": "13.0.0",
"version": "14.0.0",
"description": "Google Ads API client library",
"main": "build/src/index.js",
"files": [
Expand All @@ -15,12 +15,12 @@
"prepare": "sh ./init.sh"
},
"dependencies": {
"google-gax": "^4.3.1",
"google-gax": "^4.4.1",
"lru-cache": "^10.2.0"
},
"devDependencies": {
"prettier": "^2.2.1",
"typescript": "^4.1.3"
"typescript": "^5.5.4"
},
"keywords": [
"google ads api",
Expand Down
21 changes: 12 additions & 9 deletions package/googleads-nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"keyword plan service",
"keyword theme constant service",
"label service",
"local services lead service",
"offline user data job service",
"payments account service",
"product link invitation service",
Expand All @@ -124,19 +125,21 @@
"recommendation service",
"recommendation subscription service",
"remarketing action service",
"shareable preview service",
"shared criterion service",
"shared set service",
"smart campaign setting service",
"smart campaign suggest service",
"third party app analytics link service",
"travel asset suggestion service",
"user data service",
"user list customer type service",
"user list service"
],
"scripts": {
"clean": "gts clean",
"compile": "tsc -p . && cp -r protos build/ && minifyProtoJson",
"compile-protos": "compileProtos src ",
"compile-protos": "compileProtos --keep-case --force-number src",
"docs": "jsdoc -c .jsdoc.js",
"fix": "gts fix",
"lint": "gts check",
Expand All @@ -146,19 +149,19 @@
},
"devDependencies": {
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.20",
"@types/node": "^20.12.12",
"@types/sinon": "^10.0.20",
"c8": "^8.0.1",
"google-gax": "^4.3.1",
"gts": "5.2.0",
"jsdoc": "^4.0.2",
"c8": "^9.1.0",
"gapic-tools": "^0.4.2",
"google-gax": "^4.4.1",
"gts": "5.3.0",
"jsdoc": "^4.0.3",
"jsdoc-fresh": "^3.0.0",
"jsdoc-region-tag": "^3.0.0",
"mocha": "^10.3.0",
"mocha": "^10.4.0",
"pack-n-play": "^2.0.3",
"sinon": "^15.2.0",
"typescript": "5.1.6",
"gapic-tools": "https://gitpkg.now.sh/Opteo/gax-nodejs/tools?keep-case"
"typescript": "5.1.6"
},
"engines": {
"node": ">=v14"
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 3c4e9c0

Please sign in to comment.