Skip to content

Commit

Permalink
Merge branch 'main' into renovate/ts-loader-9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
sofisl authored Aug 15, 2023
2 parents 88165b0 + ea8020f commit 7a720ab
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 15 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@

[1]: https://www.npmjs.com/package/gax-nodejs?activeTab=versions

## [4.0.3](https://github.com/googleapis/gax-nodejs/compare/v4.0.2...v4.0.3) (2023-07-27)


### Bug Fixes

* Make gapic-tools depend on gax-nodejs ([#1480](https://github.com/googleapis/gax-nodejs/issues/1480)) ([d0f410d](https://github.com/googleapis/gax-nodejs/commit/d0f410d2e08f393f2661c8c92568a0b518fddf99))

## [4.0.2](https://github.com/googleapis/gax-nodejs/compare/v4.0.1...v4.0.2) (2023-07-25)


### Bug Fixes

* Update some pnpm deps ([#1478](https://github.com/googleapis/gax-nodejs/issues/1478)) ([39583d5](https://github.com/googleapis/gax-nodejs/commit/39583d5f4faab89b511fe317bd1ec3334c2ea3f5))

## [4.0.1](https://github.com/googleapis/gax-nodejs/compare/v4.0.0...v4.0.1) (2023-07-21)


### Bug Fixes

* `rimraf` version + remove conflicting types ([#1475](https://github.com/googleapis/gax-nodejs/issues/1475)) ([f9f8b13](https://github.com/googleapis/gax-nodejs/commit/f9f8b1328c38718bf621b92338b3d81297525aa6))
* Add missing devDependency for compodoc ([#1470](https://github.com/googleapis/gax-nodejs/issues/1470)) ([115e317](https://github.com/googleapis/gax-nodejs/commit/115e317728c8ae6fa0e61f54d0087e26382d8230))
* **deps:** Update dependency google-auth-library to v9 ([#1476](https://github.com/googleapis/gax-nodejs/issues/1476)) ([8afdd59](https://github.com/googleapis/gax-nodejs/commit/8afdd591646a190fde38728f0df14c604643f5cc))
* **deps:** Update dependency retry-request to v6 ([#1477](https://github.com/googleapis/gax-nodejs/issues/1477)) ([6401a88](https://github.com/googleapis/gax-nodejs/commit/6401a88c50fa0eb3eb8a73cefc830896369c3330))
* **deps:** Update protobufjs ([#1467](https://github.com/googleapis/gax-nodejs/issues/1467)) ([0a7dd94](https://github.com/googleapis/gax-nodejs/commit/0a7dd948573bd9553a0e9548e9ab92dbcfcb7414))
* Replace proto-over-HTTP with REGAPIC ([#1471](https://github.com/googleapis/gax-nodejs/issues/1471)) ([4266f43](https://github.com/googleapis/gax-nodejs/commit/4266f43922d0d582b8eced11f4a21c98a8b451fe))
* The return types for IAM service methods should be arrays, to match ReturnTuple ([#1001](https://github.com/googleapis/gax-nodejs/issues/1001)) ([48eed95](https://github.com/googleapis/gax-nodejs/commit/48eed955e7329f55f9427a7bc0656cfe2af395e8))

## [4.0.0](https://github.com/googleapis/gax-nodejs/compare/v3.6.0...v4.0.0) (2023-05-17)


Expand Down
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "google-gax",
"version": "4.0.0",
"version": "4.0.3",
"description": "Google API Extensions",
"main": "build/src/index.js",
"types": "build/src/index.d.ts",
Expand All @@ -10,21 +10,21 @@
"!build/src/**/*.map"
],
"dependencies": {
"@grpc/grpc-js": "~1.8.0",
"@grpc/grpc-js": "~1.9.0",
"@grpc/proto-loader": "^0.7.0",
"@types/long": "^4.0.0",
"abort-controller": "^3.0.0",
"duplexify": "^4.0.0",
"google-auth-library": "^9.0.0",
"node-fetch": "^2.6.1",
"object-hash": "^3.0.0",
"proto3-json-serializer": "^1.0.0",
"proto3-json-serializer": "^1.1.1",
"protobufjs": "7.2.4",
"retry-request": "^6.0.0"
},
"devDependencies": {
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@compodoc/compodoc": "1.1.19",
"@compodoc/compodoc": "1.1.21",
"@types/mocha": "^9.0.0",
"@types/ncp": "^2.0.1",
"@types/node": "^18.0.0",
Expand All @@ -37,8 +37,7 @@
"c8": "^8.0.0",
"codecov": "^3.1.0",
"execa": "^5.0.0",
"gapic-tools": "^0.1.7",
"google-proto-files": "^3.0.0",
"google-proto-files": "^3.0.3",
"gts": "^3.1.0",
"linkinator": "^4.0.0",
"long": "^4.0.0",
Expand Down Expand Up @@ -74,7 +73,7 @@
"compile-http-protos": "pbjs -t static-module -r http_proto --keep-case google/api/http.proto -p ./protos > protos/http.js && pbts protos/http.js -o protos/http.d.ts",
"compile-showcase-proto": "pbjs -t json google/showcase/v1beta1/echo.proto google/showcase/v1beta1/identity.proto google/showcase/v1beta1/messaging.proto google/showcase/v1beta1/testing.proto -p ./protos > test/fixtures/google-gax-packaging-test-app/protos/protos.json && pbjs -t static-module -r showcase_protos google/showcase/v1beta1/echo.proto google/showcase/v1beta1/identity.proto google/showcase/v1beta1/messaging.proto google/showcase/v1beta1/testing.proto -p ./protos > test/fixtures/google-gax-packaging-test-app/protos/protos.js && pbts test/fixtures/google-gax-packaging-test-app/protos/protos.js -o test/fixtures/google-gax-packaging-test-app/protos/protos.d.ts",
"fix": "gts fix",
"prepare": "npm run compile && prepublishProtos . && mkdirp build/protos && cp -r protos/* build/protos/ && npm run minify-proto-json",
"prepare": "npm run compile && node ./build/tools/src/prepublish.js . && mkdirp build/protos && cp -r protos/* build/protos/ && npm run minify-proto-json",
"system-test": "c8 mocha build/test/system-test --timeout 600000 && npm run test-application",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"docs-test": "linkinator docs",
Expand All @@ -83,8 +82,8 @@
"test-application": "cd test/test-application && npm run prefetch && npm install && npm start",
"prelint": "cd samples; npm link ../; npm install",
"precompile": "gts clean",
"update-protos": "listProtos .",
"minify-proto-json": "minifyProtoJson"
"update-protos": "node ./build/tools/src/listProtos.js .",
"minify-proto-json": "node ./build/tools/src/minify.js"
},
"repository": "googleapis/gax-nodejs",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"*.js"
],
"dependencies": {
"google-gax": "^4.0.0"
"google-gax": "^4.0.3"
},
"devDependencies": {
"c8": "^8.0.0",
Expand Down
7 changes: 4 additions & 3 deletions tools/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "gapic-tools",
"version": "0.1.7",
"version": "0.1.8",
"description": "compiles, updates, and minifies protos",
"main": "build/src/compileProtos.js",
"files": [
"build/tools/src",
"build/src",
"!build/src/**/*.map"
],
"scripts": {
Expand All @@ -28,7 +28,8 @@
"author": "Google API Authors",
"license": "Apache-2.0",
"dependencies": {
"google-proto-files": "^3.0.0",
"google-gax": "^4.0.2",
"google-proto-files": "^3.0.3",
"protobufjs-cli": "1.1.1",
"rimraf": "^5.0.1",
"uglify-js": "^3.17.0",
Expand Down
10 changes: 8 additions & 2 deletions tools/src/compileProtos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ import * as util from 'util';
import * as pbjs from 'protobufjs-cli/pbjs';
import * as pbts from 'protobufjs-cli/pbts';

export const gaxProtos = path.join(
require.resolve('google-gax'),
'..',
'..',
'protos'
);
const readdir = util.promisify(fs.readdir);
const readFile = util.promisify(fs.readFile);
const writeFile = util.promisify(fs.writeFile);
Expand Down Expand Up @@ -246,7 +252,7 @@ async function compileProtos(
'-p',
'protos',
'-p',
path.join(__dirname, '..', '..', '..', 'google-gax', 'build', 'protos'),
gaxProtos,
'-o',
jsonOutput,
];
Expand All @@ -264,7 +270,7 @@ async function compileProtos(
'-p',
'protos',
'-p',
path.join(__dirname, '..', '..', '..', 'google-gax', 'build', 'protos'),
gaxProtos,
'-o',
jsOutput,
];
Expand Down
20 changes: 20 additions & 0 deletions tools/test/compileProtos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,26 @@ describe('compileProtos tool', () => {
process.chdir(cwd);
});

it('fetches gax from the appropriate place', async () => {
assert.deepStrictEqual(fs.readdirSync(compileProtos.gaxProtos), [
'compute_operations.d.ts',
'compute_operations.js',
'compute_operations.json',
'google',
'http.d.ts',
'http.js',
'iam_service.d.ts',
'iam_service.js',
'iam_service.json',
'locations.d.ts',
'locations.js',
'locations.json',
'operations.d.ts',
'operations.js',
'operations.json',
'status.json',
]);
});
it('compiles protos to JSON, JS, TS', async function () {
this.timeout(20000);
await compileProtos.main([
Expand Down
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
},
"include": [
"src/*.ts",
"tools/src/listProtos.ts",
"tools/src/minify.ts",
"tools/src/prepublish.ts",
"src/*/*.ts",
"test/system-test/*.ts",
"test/unit/*.ts",
Expand Down

0 comments on commit 7a720ab

Please sign in to comment.