profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/jhillacre/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Joel Hillacre jhillacre @arrai-innovations Edmonton, Alberta, Canada https://403forbidden.ca

jhillacre/oh-my-git 0

An opinionated git prompt for bash and zsh

push eventarrai-innovations/dcrf-client

Joel Hillacre

commit sha 0aceab2c73cf3a2b64bfbf1798e0a689d40ad1ab

fix: silence dcrf-client

view details

push time in 20 days

create barncharrai-innovations/dcrf-client

branch : remove-winston

created branch time in 20 days

issue commenttheY4Kman/dcrf-client

setImmediate is not defined in browsers

How do you feel about changing dcrf-client to use console.log by default, with configuration options to use winston? Node specific dependencies in an otherwise pure JS module are making my life miserable trying to convert a vue app served by vue-cli to a vue app served by vite.

Things like:

index.js:43 Uncaught ReferenceError: global is not defined
    at node_modules/buffer/index.js (index.js:43)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
    at node_modules/winston/node_modules/readable-stream/lib/_stream_readable.js (_stream_readable.js:46)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
    at node_modules/winston/node_modules/readable-stream/readable-browser.js (readable-browser.js:1)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
    at node_modules/winston/dist/winston/logger.js (logger.js:33)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
    at node_modules/winston/dist/winston/create-logger.js (create-logger.js:32)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
util.js:103 Uncaught ReferenceError: Buffer is not defined
    at node_modules/core-util-is/lib/util.js (util.js:103)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
    at node_modules/readable-stream/lib/_stream_writable.js (_stream_writable.js:67)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
    at node_modules/readable-stream/writable-browser.js (writable-browser.js:1)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
    at node_modules/winston-transport/dist/index.js (index.js:4)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
    at node_modules/winston-transport/legacy.js (legacy.js:5)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
supports-colors.js:31 Uncaught ReferenceError: process is not defined
    at node_modules/logform/node_modules/colors/lib/system/supports-colors.js (supports-colors.js:31)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
    at node_modules/logform/node_modules/colors/lib/colors.js (colors.js:41)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
    at node_modules/logform/node_modules/colors/safe.js (safe.js:9)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
    at node_modules/logform/dist/colorize.js (colorize.js:9)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
    at node_modules/logform/dist/levels.js (levels.js:3)
    at __require2 (chunk-IHTDASF6.js?v=9f8d8f17:17)
jhillacre

comment created time in 20 days

pull request commenttheY4Kman/dcrf-client

Streaming pagination support (streamingRequest)

Made those requested changes and responded to the individual comments, but not sure if that triggers a GitHub notification. (So here is a top-level comment to trigger a notification in case one wasn't generated.)

jhillacre

comment created time in 24 days

Pull request review commenttheY4Kman/dcrf-client

Streaming pagination support (requestMultiple)

 type DispatchListener<T> = (response: T) => any; export type SubscriptionHandler = (payload: {[prop: string]: any}, action: string) => any; +export+type RequestMultipleHandler = (error: {response_status: number, data: any} | null, payload: {[prop: string]: any} | null) => any;++export+type RequestMultipleCancel = () => void;

In b90ec59, I'm being more certain that callback is not called after cancel;

jhillacre

comment created time in a month

PullRequestReviewEvent

push eventarrai-innovations/dcrf-client

Joel Hillacre

commit sha b90ec590dfa327c374d2fbeef131b7b265660f44

refactor: be more defensive re: callbacks after cancel on streamingRequest.

view details

push time in a month

PullRequestReviewEvent

Pull request review commenttheY4Kman/dcrf-client

Streaming pagination support (requestMultiple)

 type DispatchListener<T> = (response: T) => any; export type SubscriptionHandler = (payload: {[prop: string]: any}, action: string) => any; +export+type RequestMultipleHandler = (error: {response_status: number, data: any} | null, payload: {[prop: string]: any} | null) => any;++export+type RequestMultipleCancel = () => void;

Added a StreamingRequestPromise to replace StreamingRequestCanceler as the return type for DCRFClient#streamingRequest in 88d1b53.

jhillacre

comment created time in a month

push eventarrai-innovations/dcrf-client

Joel Hillacre

commit sha 88d1b53af56ddc3c08ba531b64e34a2fc187ef14

fix: make streamingRequest return a CancelablePromise, similar to subscribe.

view details

push time in a month

Pull request review commenttheY4Kman/dcrf-client

Streaming pagination support (requestMultiple)

 interface IStreamingAPI {    *    On failure, the promise will be rejected with the entire API response.    */   request(stream: string, payload: object, requestId?: string): Promise<object>;++  requestMultiple(stream: string, payload: object, callback:RequestMultipleHandler, requestId?: string): RequestMultipleCancel;

Added some JSDocs for this in 635369f.

jhillacre

comment created time in a month

PullRequestReviewEvent

Pull request review commenttheY4Kman/dcrf-client

Streaming pagination support (requestMultiple)

 describe('DCRFClient', function() {     });   }); +  describe('requestMultiple', function() {+    it('sends request and listen for responses until cancel', function () {+      const responses: any[] = [];+      const cancel = api.requestMultiple('test', {'key': 'unique'}, (error, response) => {+        responses.push(response);+      });++      expect(transport.send).to.have.been.calledOnce;+      const msg = transport.send.getCall(0).args[0];+      const stream = msg.stream;+      const requestId = msg.payload.request_id;

Made this refactor in 635369f.

jhillacre

comment created time in a month

PullRequestReviewEvent

Pull request review commenttheY4Kman/dcrf-client

Streaming pagination support (requestMultiple)

 type DispatchListener<T> = (response: T) => any; export type SubscriptionHandler = (payload: {[prop: string]: any}, action: string) => any; +export+type RequestMultipleHandler = (error: {response_status: number, data: any} | null, payload: {[prop: string]: any} | null) => any;++export+type RequestMultipleCancel = () => void; 

Made this name change in 635369f.

jhillacre

comment created time in a month

PullRequestReviewEvent

push eventarrai-innovations/dcrf-client

Joel Hillacre

commit sha 635369fde6786d4ae83ef38eb311ce43218bae24

fix: deceptive naming, white space, more useful (async) return value.

view details

push time in a month

PR opened theY4Kman/dcrf-client

Streaming pagination support (requestMultiple)

This PR adds a method to DCRFClient, allowing for a single request to listening for responses until the returned cancel function is called. The intention of creating this method is to support streaming pagination from djangochannelsrestframework, as described in #22.

+160 -11

0 comment

3 changed files

pr created time in a month

push eventarrai-innovations/dcrf-client

Joel Hillacre

commit sha 2fbf973dff1802ee0fe1153c463c18cf9153129c

chore: fix unintentional whitespace change.

view details

push time in a month

push eventarrai-innovations/dcrf-client

Joel Hillacre

commit sha 665b57a7ef54f88c8c4decce4712befdfe40f428

fix: cancel listener when receiving an error, and add a couple tests.

view details

push time in a month

push eventarrai-innovations/dcrf-client

Joel Hillacre

commit sha 24ce331aa6e4eaa042d7edd273ca95711cc7f159

fix: sending the message in requestMultiple would be helpful.

view details

push time in a month

push eventarrai-innovations/dcrf-client

Joel Hillacre

commit sha d5ef552a44224aa088a145fd857641164a8ec235

fix: move required args before optional, add requestMultiple to IStreamingAPI.

view details

push time in a month

create barncharrai-innovations/dcrf-client

branch : streaming-pagination-support

created branch time in a month

push eventarrai-innovations/dcrf-client

Zach "theY4Kman" Kanzler

commit sha 0359290dcd319bfab12a0beec4805373b8d58c19

fix(tests): resolve exit code 5 (no tests collected) returned from pytest

view details

Zach "theY4Kman" Kanzler

commit sha b7fad8f658fde06591e586eefe501874951c9f42

chore(ci): add unit/integration test GitHub actions

view details

Zach Kanzler

commit sha 3af391a6cf2748732b01b32abe0e0403e80c020d

Merge pull request #28 from theY4Kman/chore/github/actions-ci-playground

view details

Zach "theY4Kman" Kanzler

commit sha a8ad13c3e3521f9b2653e2b5899485ac4e20f5ac

chore(deps): update package-lock to lockfileVersion 2

view details

Zach "theY4Kman" Kanzler

commit sha 9bd7e58366f3e3f62214cd212e40a073d21aea2e

doc: add @jhillacre to package.json contributors Whoops! Forgot about that field

view details

Zach "theY4Kman" Kanzler

commit sha 67cdd1400d8a9c43a47a8bed455aef69a0fbb616

fix(deps): appease dependabot (update ws, glob-parent, lodash, y18n deps)

view details

push time in a month

push eventarrai-innovations/dcrf-client

Zach "theY4Kman" Kanzler

commit sha 962015efb58e596b7952ba24495412f30813c039

feat(test): add pytest cmdline flags to customize Mocha test runner debugging

view details

Zach "theY4Kman" Kanzler

commit sha 05f5ad91f075aa4ca1b604c76d7c82f6e5be4267

chore(deps): pin python test deps to more concrete versions

view details

Zach "theY4Kman" Kanzler

commit sha 10292003ef968c7d60a195d7571a74ed156b0a79

ref: switch to winston for logging

view details

Zach "theY4Kman" Kanzler

commit sha de75dbcd482e190d8866e5551f9e5a2abd16eca4

test: add test for changes to multiple objects

view details

Zach "theY4Kman" Kanzler

commit sha a26e9a4b8cdd606a863e1ca04665e90813896b26

chore(deps): upgrade python deps To appease dependabot

view details

Joel Hillacre

commit sha 6488db2de173863a7e16388c68667051244bb360

feat(subscribe): modify subscribe method to allow custom subscribe action names & arguments. allow subscribe to handle create events for subscriptions, if the user indicates that it makes sense to do so.

view details

Joel Hillacre

commit sha f309a79767af76027f0b13bf09fd7a788222e3f3

fix(subscribe): resubscribe will now resend subscription messages at most once per request id, since subscription listeners are not one-to-one with subscription actions.

view details

Joel Hillacre

commit sha 3582572cf817e1d2b1a6a7cc4295dd81c37cb297

feat(subscribe): SubscribePromise.cancel is now async and triggers an unsubscribe message to be sent. unsubscribeAll now sends unsubscribe messages, but does not change to async.

view details

Joel Hillacre

commit sha 7668908a92815aeb1deb5682aca62240a957dab2

fix: change uniqBy import from lodash to use direct dependanices with typescript types, similar to how isMatch is imported.

view details

Joel Hillacre

commit sha 789c5962c9ae756cebc5f1dee9db734ccb98e12f

fix: get unsubscribeMessage build using unsubscribePayload, not subscribe payload.

view details

Joel Hillacre

commit sha ac9de84ccb29c5c9d06ea657a2bf8151cea2c117

fix: give unsubscribe payload to this.request, not unsubscribe message (for sendNow later in unsubscribeAll.)

view details

Zach "theY4Kman" Kanzler

commit sha ee483f5237d5a7d6b1d5bcbd2d692388ece4d50c

fix(test): only finish test in pytest when all afterEach hooks have run

view details

Zach "theY4Kman" Kanzler

commit sha e39e6c85129be57907ef0b15b71190d61c6471bf

chore(deps): pin DCRF reqs to specific versions

view details

Zach "theY4Kman" Kanzler

commit sha 8b69fed403cff39d5d1e64599a0187a702bf7178

fix(README): use proper pipenv install invocation for tests

view details

Zach "theY4Kman" Kanzler

commit sha 921e0cd0d9b5f97cad16ba98f65dbe5663d00a3c

fix(test): split mocha runner stdout to chunks to avoid buffering hangs When using process.stdout.write, a buffer larger than 4096 bytes would cause the process to hang indefinitely. Seems like unexpected behaviour to me...

view details

Zach "theY4Kman" Kanzler

commit sha a0c5b797da7aa02913ff146c29c1eacbb892f3c7

chore(deps): upgrade TypeScript to gain optional chaining & nullish coalescing

view details

Zach "theY4Kman" Kanzler

commit sha e285bb8415c4594b3d274badddaddd8921f5d616

feat: return a Promise from unsubscribeAll

view details

Zach "theY4Kman" Kanzler

commit sha 97ed7d5020fd2e1b1af11f6138e29837b65bd8d8

feat: return a Promise from close()

view details

Zach "theY4Kman" Kanzler

commit sha ee2fe31bbd5e297b74d79d0910485f237a54964b

ref: rename ISubscriptionDescriptor.message to subscribeMessage, and SubscribeOptions.create to includeCreateEvents

view details

Zach "theY4Kman" Kanzler

commit sha 36bb12b756e3edb03d9148c24cfa40df47d7356e

doc: add overloads and expand docs for subscribe Plus, changing indentation style to 4 spaces, instead of alignment

view details

push time in a month

delete branch arrai-innovations/dcrf-client

delete branch : subscribe-pull-request

delete time in a month

startedpetersasi/deluge2-win-build

started time in 2 months

issue openedtheY4Kman/dcrf-client

setImmediate is not defined in browsers

Seems like Winston uses setImmediate which isn't available in browser environments.

Uncaught ReferenceError: setImmediate is not defined
    at Console.log (webpack-internal:///./node_modules/winston/dist/winston/transports/console.js:88)
    at Console._write (webpack-internal:///./node_modules/winston-transport/dist/index.js:90)
    at doWrite (webpack-internal:///./node_modules/readable-stream/lib/_stream_writable.js:428)
    at writeOrBuffer (webpack-internal:///./node_modules/readable-stream/lib/_stream_writable.js:417)
    at Console.Writable.write (webpack-internal:///./node_modules/readable-stream/lib/_stream_writable.js:334)
    at DerivedLogger.ondata (webpack-internal:///./node_modules/winston/node_modules/readable-stream/lib/_stream_readable.js:681)
    at DerivedLogger.emit (webpack-internal:///./node_modules/events/events.js:153)
    at addChunk (webpack-internal:///./node_modules/winston/node_modules/readable-stream/lib/_stream_readable.js:298)
    at readableAddChunk (webpack-internal:///./node_modules/winston/node_modules/readable-stream/lib/_stream_readable.js:280)
    at DerivedLogger.Readable.push (webpack-internal:///./node_modules/winston/node_modules/readable-stream/lib/_stream_readable.js:241)

I was able to work around the issue using a polyfill, as mentioned in this issue: https://github.com/winstonjs/winston/issues/1354#issuecomment-546271943. Not sure that there is anything to do about this in dcrf-client, other than adding this workaround to documentation.

created time in 2 months

startedrsinger86/drf-flex-fields

started time in 2 months

pull request commenttheY4Kman/dcrf-client

Custom subscription actions

Handler as option property or as options argument seems reasonable to me.

Although we kept the arguments for subscribe() backwards-compatible, the return types for those few public functions were changed, and by strict semantic versioning rules, a major version bump is warranted. It's a shame I'm not using this opportunity to move the callback/handler arg to the back of the prototype, where it belongs :P

It's early in the project, more major bumps now are good. I always say we aren't running out of version numbers. One thing to help users coming for the journey might be a CHANGES.md, detailing breaking changes.

I just added a few more commits to resolve those testing woes from #10. Now, in this PR:

  • The README says to use pipenv install --dev to get the deps
  • The npm run test:integration now performs pipenv run py.test
  • The Python version has been bumped to 3.8 to resolve the weird importlib_metadata error (which I was able to reproduce > * when using pipenv's auto-created virtualenv)

I can confirm that the tests work for me on the new branch. 👍👍

TypeScript was upgraded to 3.7+ to gain support for optional chaining (a?.b?.c instead of a && a.b && a.b.c) and nullish coalescing (a ?? b instead of a == null ? b : a), because I believe it makes the code more succinct and easier to read.

I needed to blow away my old node_modules to get the build to work. Seemed like the old 'tsc' is used during 'prepare' instead of the new one, but I wasn't able to reproduce by manually installing old 'typescript' versions then reinstalling using npm install.

src/index.ts:70:37 - error TS1109: Expression expected.

70     this.pkField = options.pkField ?? 'pk';
                                       ~

src/index.ts:70:43 - error TS1005: ':' expected.

70     this.pkField = options.pkField ?? 'pk';
theY4Kman

comment created time in 2 months