PubSub class is reported as deprecated by TypeScript-based lint tooling
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- node.js, typescript
Research direction
Start by locating the @google-cloud/pubsub package declarations for the exported PubSub class and inspect the deprecation metadata TypeScript exposes. Reproduce with TypeScript 5.9.3 and the sonarjs/deprecation rule as described. Done when the class is no longer reported as deprecated unless it is intentionally deprecated and the issue is clarified with the supported replacement.
Written by the indexing model from the issue text.
Description
Description
When using @google-cloud/[email protected], the PubSub class is flagged as deprecated by lint rules that rely on TypeScript's deprecation diagnostics (specifically sonarjs/deprecation, rule S1874).
Every import and usage of PubSub produces a warning: 'PubSub' is deprecated.
We don't believe PubSub is actually intended to be deprecated — there's no replacement mentioned in the docs, and the class is used in all official examples. Is this a known issue?
Steps to Reproduce
- Create a TypeScript project with
@google-cloud/[email protected] - Use
PubSub:import { PubSub } from '@google-cloud/pubsub' - Run ESLint with the
sonarjs/deprecationrule enabled - Every import and usage of
PubSubis flagged as deprecated
Environment
@google-cloud/pubsub: 6.3.2- TypeScript: 5.9.3
- ESLint rule:
sonarjs/deprecation(S1874) - Node.js: 24.22.2
- Dominant language
- TypeScript
- Stars
- 3.2k
- Forks
- 732
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 117
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleapis/google-cloud-node
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
googleapis/google-cloud-node#9854 ·
Maintainers usually reply within 1 day
-
pubsub: "Operation attempted on ended Span" when a modack is flushed after the message was ackedOpenapi: pubsub
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
googleapis/google-cloud-node#9853 ·
Maintainers usually reply within 1 day
-
storage: V4 getSignedUrl sorts canonical headers with localeCompare, so they disagree with X-Goog-SignedHeadersPossibly taken @itsrayeedscodespace claimed this 6 days ago. Openapi: storage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
googleapis/google-cloud-node#9840 · 1 comment ·
Maintainers usually reply within 1 day
-
firestore: getPartitions() emits gax AutopaginateTrueWarning in every processPossibly taken @TheRealDanii claimed this 9 days ago. Openapi: firestore
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
googleapis/google-cloud-node#9736 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
googleapis/google-cloud-node#9723 ·
Maintainers usually reply within 1 day
All issues in googleapis/google-cloud-node
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pieterjanscheir/belgica#201 ·
Maintainers usually reply within 1 day
-
accessibility
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
numerique-gouv/lasuite-landingpage#311 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
oxc-project/tsgolint#1362 ·
Maintainers usually reply within 1 day
-
bug external xai
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
langchain-ai/langchain#41854 ·
Maintainers usually reply within 1 day
-
ready-for-agent
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
nemchik/biome-plugin-suitescript#137 ·
Maintainers usually reply within 1 day