Installing the latest version (0.47.0) using npm, the code is missing some fixes that were made before to that release.
One example mismatch is in pubsub/src/subscription.js, line 735, looks like this when installed form npm :
if (self.activeRequest_ && self.activeRequest_.cancel) {
self.activeRequest_.cancel();
}
According to git, it was changed to
if (self.activeRequest_ && self.activeRequest_.abort) {
self.activeRequest_.abort();
}
The commit e92454e3a645c10f7ddd609f52cbd9ac4bbb36df added this change.
Good catch, the release process has gotten a bit more complex since we modularized, and it looks like we made a mistake when we released the bundled package. We didn't first release each sub-module package (or at the very least, we skipped @google-cloud/pubsub). We are doing a release today, and will make sure this is included.
Sorry for the trouble, thank you for bringing this up.
Thanks for the quick answer!
@stephenplusplus I saw you tagged [email protected] in https://github.com/GoogleCloudPlatform/google-cloud-node/commit/61598e937cef6ba564b49c0347cd194898836616
The package.json still lists [email protected] as a dependency for pubsub 0.8.1, however I'm convinced that we need at least [email protected] because the abort() fix which I contributed also required some changes in grpc-common which as far as I can tell were not part of 0.1.1 but should at least be part of grpc-common>=0.1.4.
I believe it's defined as a range, so new installs and re-installs will pick up the new dependency. Is it not working?
@stephenplusplus in situations where people use yarn with lockfiles or npm shrinkwraps they might not necessarily get the latest version in the range (AFAIK updating just pubsub does not necessarily update the transitive dependencies).
Even if it might less of a problem in practice I still think the dependencies in a package.json should correctly specify the _minimum_ required version of a dependency, even when working with ranges. And for this particular version bump of pubsub the minimum version requirement has changed.
Agreed, thanks for the explanation. We should update and put out 0.8.2.
Thanks again @ctavan and @fbreton-jacques, I've put out the new release under @google-cloud/[email protected].