feat(logging): split GAPIC from the logging handwritten package#8929
feat(logging): split GAPIC from the logging handwritten package#8929quirogas wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes auto-generated GAPIC client files and configurations, transitioning the internal ./v2 module to an external dependency on @google-cloud/logging-api. Feedback suggests replacing the require statement for @google-cloud/logging-api with an ES6 import in src/index.ts to preserve TypeScript type safety and eliminate the need for an ESLint suppression comment.
| // eslint-disable-next-line @typescript-eslint/no-var-requires | ||
| const v2 = require('./v2'); | ||
| const v2 = require('@google-cloud/logging-api'); |
There was a problem hiding this comment.
Using 'require' to import '@google-cloud/logging-api' forces the use of an 'eslint-disable' comment and types 'v2' as 'any', which bypasses TypeScript's type safety. Since '@google-cloud/logging-api' is now an external dependency, it can be cleanly imported using ES6 'import' syntax to preserve type safety and eliminate the lint warning suppression.
| // eslint-disable-next-line @typescript-eslint/no-var-requires | |
| const v2 = require('./v2'); | |
| const v2 = require('@google-cloud/logging-api'); | |
| import * as v2 from '@google-cloud/logging-api'; |
Decouple the handwritten Logging wrapper from the auto-generated GAPIC client layer by importing a standalone version of the GAPIC library. Standalone
-apipackages are now generated and maintained independently.src/v2/) and OwlBot files (owlbot.py,.OwlBot.yaml).@google-cloud/logging-api(^0.2.0).v2andprotosdirectly from@google-cloud/logging-api.v2GAPIC sub-clients (LoggingServiceV2Client,ConfigServiceV2Client,MetricsServiceV2Client).Internal: b/531788771