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

Update library dependencies #153

Open
tswaters opened this issue Dec 1, 2022 · 0 comments · May be fixed by #154
Open

Update library dependencies #153

tswaters opened this issue Dec 1, 2022 · 0 comments · May be fixed by #154

Comments

@tswaters
Copy link
Member

tswaters commented Dec 1, 2022

@nfantone any interest in updating the library to work with amqplib@latest and seneca@latest ?

I'm working on a bit of this, will likely fork the library into our internal monorepo to update dependencies... I'll also send a PR once it's in a working state. I've noticed the following so far:

  • promises from amqplib are no longer bluebird promises, so a few things need to be fixed up:

    • asCallback(done) need to change to .then(res => done(null, res), err => done(err))
    • thenReturn(someVar) needs to change to .then(() => someVar)
  • was getting an error about passing objects for queue and exchange when calling publish -- this this was a string before, but now it's an object, { queue, messageCount, consumerCount } -- I think it's just passing the result back from an amqp call?

Lots of tests needed to get fixed up to account for these, but I've got the tests passing at least.

tswaters pushed a commit to tswaters/seneca-amqp-transport that referenced this issue Dec 1, 2022
* promises from amqplib are no longer bluebird promises.  Need to update
  a few instances of `thenReturn` and `asCallback` to work w/ native
  promises.

* the `replyQueue` and `exchange` parameters are now objects instead of
  strings with `{queue}` and `{exchange}` referenced as the strings

* re-ran `npm run prettier` as prettier was updated reapplying formatting

Fixes senecajs#153
@tswaters tswaters linked a pull request Dec 1, 2022 that will close this issue
tswaters pushed a commit to tswaters/seneca-amqp-transport that referenced this issue Dec 1, 2022
* promises from amqplib are no longer bluebird promises.  Need to update
  a few instances of `thenReturn` and `asCallback` to work w/ native
  promises.

* the `replyQueue` and `exchange` parameters are now objects instead of
  strings with `{queue}` and `{exchange}` referenced as the strings

* re-ran `npm run prettier` as prettier was updated reapplying formatting

Fixes senecajs#153
tswaters pushed a commit to tswaters/seneca-amqp-transport that referenced this issue Dec 5, 2022
* promises from amqplib are no longer bluebird promises.  Need to update
  a few instances of `thenReturn`, `asCallback`, and `.get` to work w/
  native promises.

* re-ran `npm run prettier` as prettier was updated reapplying formatting.
  Applied a few overrides to cut down on the diff. A few other changes
  are unavoidable (space after function keyword)

Fixes senecajs#153
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant