-
Notifications
You must be signed in to change notification settings - Fork 26
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
fix(api-object): cross-module-version instanceof
is broken
#1112
Conversation
b06c472
to
65fc05f
Compare
This pull fixes the issue with instanceof (cdk8s-team#581) by implementing Symbol.hasInstance (thanks to @fikisipi for pointing it out) Docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/hasInstance Signed-off-by: Gjorgji Kjosev <gorgi.kosev@gmail.com>
65fc05f
to
364e395
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @spion!
Yeah I think testing the multi version module scenario is pretty crazy to do in a unit test. I think that we can let it go without it
👍
instanceof
is broken
Signed-off-by: Gjorgji Kjosev <gorgi.kosev@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet. Thanks @spion !
(notice there are still some build failures)
Signed-off-by: Gjorgji Kjosev <gorgi.kosev@gmail.com>
fbb3355
to
726d98c
Compare
This pull request fixes the issue with `instanceof` (#581) by implementing `Symbol.hasInstance` (thanks to @fikisipi for pointing it out) Docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/hasInstance I welcome any ideas on how to write tests demonstrating the issue is fixed, as to set things up one needs to have multiple versions (or instances) of the same module. Fixes #581 (cherry picked from commit fea71cc) Signed-off-by: Gorgi Kosev <gorgi.kosev@gmail.com>
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…1121) # Backport This will backport the following commits from `2.x` to `1.x`: - [fix(api-object): cross-module-version `instanceof` is broken (#1112)](#1112) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport)
This pull request fixes the issue with
instanceof
(#581) by implementingSymbol.hasInstance
(thanks to @fikisipi for pointing it out)Docs: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/hasInstance
I welcome any ideas on how to write tests demonstrating the issue is fixed, as to set things up one needs to have multiple versions (or instances) of the same module.
Fixes #581