googleapis / nodejs-pubsub

Node.js client for Google Cloud Pub/Sub: Ingest event streams from anywhere, at any scale, for simple, reliable, real-time stream analytics.
https://cloud.google.com/pubsub/
Apache License 2.0
516 stars 227 forks source link

Dependency "types/long" no longer available in package.json file #1944

Closed angelmzn closed 2 weeks ago

angelmzn commented 2 weeks ago

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Is your feature request related to a problem? Please describe. I am trying to use the @types/long dependency for Cloud Run, but it is no longer available for the application. It used to be as per this changes log https://github.com/googleapis/nodejs-pubsub/compare/v4.3.3...v4.4.0 It was supposed to be updated from V4 to V5, but somehow it was removed. Describe the solution you'd like Add @types/long to the package.json again. Describe alternatives you've considered I have been able to use it by adding it manually on my end, but this should be included by default as has always been Additional context NA

feywind commented 2 weeks ago

@angelmzn That package (@types/long) is literally a shim now - it's been moved into the mainline long package. The Pub/Sub library doesn't even use it, looks like, so you'd need to include it in your project.

It's generally not a good practice to depend on another package's dependencies for yourself anyhow; this probably only worked because it was a TypeScript typing in question (and the TS compiler is greedy about looking for .d.ts files). It's an interesting question though, whether that constitutes part of the interface we expose. I'll have to run that by some coworkers to see what they think.

feywind commented 2 weeks ago

Internal consensus agrees, so I'm going to go ahead and close this. Stick with the workaround :) Though I'd also recommend switching over to long since the devs say that's the way forward.