Skip to content

Commit 4d7690b

Browse files
chore: pull request #143 from googleapis/gax-nodejs-migration
chore: migrate code from googleapis/gax-nodejs
2 parents 3eef61a + 49a717a commit 4d7690b

File tree

213 files changed

+133843
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+133843
-3
lines changed

.release-please-manifest.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
"dev-packages/jsdoc-fresh": "5.0.2",
33
"dev-packages/jsdoc-region-tag": "4.0.1",
44
"dev-packages/pack-n-play": "4.2.1",
5+
"dev-packages/logging-utils": "1.1.1",
56
"packages/gaxios": "7.1.2",
67
"packages/gcp-metadata": "8.1.1",
7-
"packages/proto3-json-serializer-nodejs": "3.0.3"
8+
"packages/proto3-json-serializer-nodejs": "3.0.3",
9+
"packages/google-gax": "5.0.4",
10+
"packages/gapic-tools": "1.0.3"
811
}

bin/migrate-split-repo.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ ARTIFACT_NAME=$2
3030
SCRIPT_DIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
3131

3232
export UPDATE_SCRIPT="${SCRIPT_DIR}/split-repo-post-process.sh"
33-
export PACKAGE_PATH="packages/${ARTIFACT_NAME}"
34-
33+
export PACKAGE_PATH="generator/${ARTIFACT_NAME}"
34+
3535
# run the migrate script, remove .kokoro and .github folders
3636
# keep the .github/.OwlBot.yaml config
3737
${SCRIPT_DIR}/migrate-git-history.sh \
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
options:
16+
dynamic_substitutions: true
17+
18+
substitutions:
19+
_BUILD_TYPE: "presubmit"
20+
_TEST_TYPE: "system"
21+
_NODE_VERSION: "18"
22+
_REPO_OWNER: "googleapis"
23+
_REPO_NAME: "google-cloud-node-core"
24+
25+
logsBucket: 'gs://${_LOGS_BUCKET}/logs/google-cloud-node-core/${_BUILD_TYPE}/${COMMIT_SHA}/${TRIGGER_NAME}'
26+
timeout: 32400s
27+
28+
steps:
29+
- id: 'Clone Showcase'
30+
name: 'gcr.io/cloud-builders/git'
31+
args: ['clone', 'https://github.com/googleapis/gapic-showcase.git']
32+
33+
- id: 'Build Showcase'
34+
name: 'golang:1.24'
35+
entrypoint: 'go'
36+
args: ['install', './cmd/gapic-showcase']
37+
dir: 'gapic-showcase'
38+
env:
39+
- 'GOPATH=/workspace'
40+
- 'GOCACHE=/workspace/.cache/go-build'
41+
waitFor: ['Clone Showcase']
42+
- name: 'gcr.io/kaniko-project/executor:v1.24.0'
43+
args: [
44+
'--log-format=text',
45+
'--context=dir:///workspace/testing',
46+
'--build-arg=NODE_VERSION=${_NODE_VERSION}',
47+
'--dockerfile=ci/Dockerfile',
48+
'--cache=true',
49+
'--destination=gcr.io/${PROJECT_ID}/google-cloud-node-core-${_NODE_VERSION}',
50+
'--push-retry=3',
51+
'--image-fs-extract-retry=3'
52+
]
53+
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
54+
entrypoint: "bash"
55+
args: ["ci/deletecloudbuild.sh"]
56+
env:
57+
- 'REF_NAME=${REF_NAME}'
58+
- name: gcr.io/${PROJECT_ID}/google-cloud-node-core-${_NODE_VERSION}
59+
id: "run-tests"
60+
timeout: 32400s
61+
entrypoint: "bash"
62+
args:
63+
- '-c'
64+
- |
65+
echo "Starting gapic-showcase server in background..."
66+
/workspace/bin/gapic-showcase run &
67+
echo "Waiting for server at localhost:7469..."
68+
until bash -c "exec 3<>/dev/tcp/localhost/7469" 2>/dev/null; do
69+
echo "Waiting for server..."
70+
sleep 1
71+
done
72+
echo "Server is ready!"
73+
echo "Running conditional tests: ci/run_conditional_tests.sh"
74+
ci/run_conditional_tests.sh
75+
env:
76+
- 'BUILD_TYPE=${_BUILD_TYPE}'
77+
- 'TEST_TYPE=${_TEST_TYPE}'
78+
- 'BUILD_ID=$BUILD_ID'
79+
- 'PROJECT_ID=$PROJECT_ID'
80+
- 'REPO_OWNER=${_REPO_OWNER}'
81+
- 'REPO_NAME=${_REPO_NAME}'
82+
- 'COMMIT_SHA=$COMMIT_SHA'
83+
waitFor: ['Build Showcase']
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
**/node_modules
2+
**/coverage
3+
test/fixtures
4+
build/
5+
docs/
6+
protos/
7+
samples/generated/
8+
samples/typescript/**
9+
samples/system-test/**
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "./node_modules/gts",
3+
"root": true
4+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
coverage
2+
npm-debug.log
3+
**/*.log
4+
**/node_modules
5+
.coverage
6+
.nyc_output
7+
docs/
8+
protos/google/
9+
out/
10+
system-test/secrets.js
11+
system-test/*key.json
12+
build
13+
.vscode
14+
package-lock.json
15+
.system-test-run/
16+
.kitchen-sink/
17+
.showcase-server-dir/
18+
.compileProtos-test/
19+
.minify-test/
20+
__pycache__
21+
doc/
22+
dist/
23+
*.tgz
24+
**/*.tgz
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
**/node_modules
2+
**/coverage
3+
test/fixtures
4+
build/
5+
docs/
6+
protos/
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright 2024 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
module.exports = {
16+
...require('gts/.prettierrc.json')
17+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Changelog
2+
3+
## [1.1.1](https://github.com/googleapis/gax-nodejs/compare/google-logging-utils-v1.1.0...google-logging-utils-v1.1.1) (2025-03-08)
4+
5+
6+
### Bug Fixes
7+
8+
* bypass colour checks when in browsers (or other non-Node-compatible runtimes) ([#1725](https://github.com/googleapis/gax-nodejs/issues/1725)) ([be7811d](https://github.com/googleapis/gax-nodejs/commit/be7811dc7bde121a64923549dfcaf665b742c924))
9+
10+
## [1.1.0](https://github.com/googleapis/gax-nodejs/compare/google-logging-utils-v1.0.1...google-logging-utils-v1.1.0) (2025-03-06)
11+
12+
13+
### Features
14+
15+
* allow users to turn on logging without the environment variable ([#1704](https://github.com/googleapis/gax-nodejs/issues/1704)) ([5ef89de](https://github.com/googleapis/gax-nodejs/commit/5ef89de55db98618cd6945f45287de96f34950e6))
16+
17+
## [1.0.1](https://github.com/googleapis/gax-nodejs/compare/google-logging-utils-v1.0.0...google-logging-utils-v1.0.1) (2024-12-20)
18+
19+
20+
### Bug Fixes
21+
22+
* actually run tests for logging, fix any problems ([#1685](https://github.com/googleapis/gax-nodejs/issues/1685)) ([613d6e3](https://github.com/googleapis/gax-nodejs/commit/613d6e3dbc838919ea13dd87fb9a2fa2bc0bcd76))
23+
24+
## 1.0.0 (2024-12-19)
25+
26+
27+
### Features
28+
29+
* add adhoc debug logger package ([#1669](https://github.com/googleapis/gax-nodejs/issues/1669)) ([8a5cb86](https://github.com/googleapis/gax-nodejs/commit/8a5cb861ff653fdb03b6546ff086dd8354c1a25b))
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<!-- # Generated by synthtool. DO NOT EDIT! !-->
2+
# Code of Conduct
3+
4+
## Our Pledge
5+
6+
In the interest of fostering an open and welcoming environment, we as
7+
contributors and maintainers pledge to making participation in our project and
8+
our community a harassment-free experience for everyone, regardless of age, body
9+
size, disability, ethnicity, gender identity and expression, level of
10+
experience, education, socio-economic status, nationality, personal appearance,
11+
race, religion, or sexual identity and orientation.
12+
13+
## Our Standards
14+
15+
Examples of behavior that contributes to creating a positive environment
16+
include:
17+
18+
* Using welcoming and inclusive language
19+
* Being respectful of differing viewpoints and experiences
20+
* Gracefully accepting constructive criticism
21+
* Focusing on what is best for the community
22+
* Showing empathy towards other community members
23+
24+
Examples of unacceptable behavior by participants include:
25+
26+
* The use of sexualized language or imagery and unwelcome sexual attention or
27+
advances
28+
* Trolling, insulting/derogatory comments, and personal or political attacks
29+
* Public or private harassment
30+
* Publishing others' private information, such as a physical or electronic
31+
address, without explicit permission
32+
* Other conduct which could reasonably be considered inappropriate in a
33+
professional setting
34+
35+
## Our Responsibilities
36+
37+
Project maintainers are responsible for clarifying the standards of acceptable
38+
behavior and are expected to take appropriate and fair corrective action in
39+
response to any instances of unacceptable behavior.
40+
41+
Project maintainers have the right and responsibility to remove, edit, or reject
42+
comments, commits, code, wiki edits, issues, and other contributions that are
43+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
44+
contributor for other behaviors that they deem inappropriate, threatening,
45+
offensive, or harmful.
46+
47+
## Scope
48+
49+
This Code of Conduct applies both within project spaces and in public spaces
50+
when an individual is representing the project or its community. Examples of
51+
representing a project or community include using an official project e-mail
52+
address, posting via an official social media account, or acting as an appointed
53+
representative at an online or offline event. Representation of a project may be
54+
further defined and clarified by project maintainers.
55+
56+
This Code of Conduct also applies outside the project spaces when the Project
57+
Steward has a reasonable belief that an individual's behavior may have a
58+
negative impact on the project or its community.
59+
60+
## Conflict Resolution
61+
62+
We do not believe that all conflict is bad; healthy debate and disagreement
63+
often yield positive results. However, it is never okay to be disrespectful or
64+
to engage in behavior that violates the project’s code of conduct.
65+
66+
If you see someone violating the code of conduct, you are encouraged to address
67+
the behavior directly with those involved. Many issues can be resolved quickly
68+
and easily, and this gives people more control over the outcome of their
69+
dispute. If you are unable to resolve the matter for any reason, or if the
70+
behavior is threatening or harassing, report it. We are dedicated to providing
71+
an environment where participants feel welcome and safe.
72+
73+
Reports should be directed to *googleapis-stewards@google.com*, the
74+
Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to
75+
receive and address reported violations of the code of conduct. They will then
76+
work with a committee consisting of representatives from the Open Source
77+
Programs Office and the Google Open Source Strategy team. If for any reason you
78+
are uncomfortable reaching out to the Project Steward, please email
79+
opensource@google.com.
80+
81+
We will investigate every complaint, but you may not receive a direct response.
82+
We will use our discretion in determining when and how to follow up on reported
83+
incidents, which may range from not taking action to permanent expulsion from
84+
the project and project-sponsored spaces. We will notify the accused of the
85+
report and provide them an opportunity to discuss it before any action is taken.
86+
The identity of the reporter will be omitted from the details of the report
87+
supplied to the accused. In potentially harmful situations, such as ongoing
88+
harassment or threats to anyone's safety, we may take action without notice.
89+
90+
## Attribution
91+
92+
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
93+
available at
94+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

0 commit comments

Comments
 (0)