Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: shift typeless bot invocation into library package #1972

Merged
merged 5 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import synthtool.languages.node as node
from synthtool.languages import node
from synthtool import shell
from synthtool.log import logger

# Generate JS samples from TS.
node.typeless_samples_hermetic()
# node.typeless_samples_hermetic()

# We need to run this before the main owlbot processing, to make
# sure quickstart.js gets gts fixed before the README is generated.
# This needs to be worked out more properly, this is temporary.
logger.debug("Run typeless sample bot")
node.install()
node.fix()
shell.run(["npm", "run", "typeless"])

# node.fix()


# Main OwlBot processing.
node.owlbot_main(templates_excludes=[
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@
"predocs-test": "npm run docs",
"benchwrapper": "node bin/benchwrapper.js",
"prelint": "cd samples; npm link ../; npm install",
"precompile": "gts clean"
"precompile": "gts clean",
"typeless": "npx typeless-sample-bot --outputpath samples --targets samples --recursive",
"posttypeless": "cd samples; npm i; cd ..; npm run fix"
},
"dependencies": {
"@google-cloud/paginator": "^5.0.0",
Expand All @@ -63,6 +65,7 @@
"p-defer": "^3.0.0"
},
"devDependencies": {
"@google-cloud/typeless-sample-bot": "^2.1.0",
"@grpc/proto-loader": "^0.7.0",
"@opentelemetry/core": "^1.17.0",
"@opentelemetry/sdk-trace-base": "^1.17.0",
Expand Down
1 change: 1 addition & 0 deletions test/pubsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ describe('PubSub', () => {
const options: pubsubTypes.ClientConfig = {
enableOpenTelemetryTracing: true,
};
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const pubsub = new PubSub(options);
assert.strictEqual(
tracing.isEnabled(),
Expand Down
Loading