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

Added support for promises #4

Merged
merged 6 commits into from
Sep 14, 2021
Merged

Added support for promises #4

merged 6 commits into from
Sep 14, 2021

Conversation

BluuArc
Copy link

@BluuArc BluuArc commented May 22, 2018

Added support for promises in input functions. Even though all 34 integration tests and 242 unit tests pass at time of writing, I think more extensive testing is needed. Should theoretically fix the Promise cloning issue in #3 .

@mgesmundo
Copy link

Hi @israelss ,
are you abandoned this repo? Any chance to merge this helpful PR into your awesome repo?
All the best!

etiennea
etiennea previously approved these changes May 6, 2021
@etiennea
Copy link

etiennea commented May 6, 2021

This should definatelly be merged!

@israelss
Copy link
Owner

Hello!

First of all, I am so truly sorry for the long hiatus on this project!

@BluuArc thank you for your contribution!!

Can you include some documentation, complementing the README regarding the possibilities to use Promises?

@israelss
Copy link
Owner

Hi @israelss ,
are you abandoned this repo? Any chance to merge this helpful PR into your awesome repo?
All the best!

Hi @mgesmundo!
Thank you for your kind words!
It was not my intention to abandon this child of mine, but life happened and i was drafted away from any coding activities for a long time!
But now that I'm able to dedicate some time to it again, I'll try my best to mantain this project, as long as it is needed.

@israelss israelss self-assigned this Aug 21, 2021
@israelss israelss added enhancement waiting response waiting response from PR author labels Aug 21, 2021
@israelss israelss assigned BluuArc and unassigned israelss Aug 24, 2021
@BluuArc
Copy link
Author

BluuArc commented Aug 24, 2021

Can you include some documentation, complementing the README regarding the possibilities to use Promises?

Glad to hear that you're back! I'm usually busy during the week days, but I'll see if I can get to this by the end of the week.

README.md Outdated
### **1.2.1**
* Added support for promises as input functions
* TODO: more extensive testing needed, but all 34 integration tests and 242 unit tests pass at time of writing

### **1.2.0**

#### _Highlights:_
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some reference/examples on how to use it with Promises on API section.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some examples in my recent commits.

@israelss
Copy link
Owner

Can you include some documentation, complementing the README regarding the possibilities to use Promises?

Glad to hear that you're back! I'm usually busy during the week days, but I'll see if I can get to this by the end of the week.

Thank you for your patience and contribution!
I'll wait.

@israelss israelss removed the waiting response waiting response from PR author label Aug 24, 2021
… with browsers that do not support arrow functions; minor cleanup of worker function to reduce duplication
…error message when converting a circular structure to JSON
@@ -1,5 +1,7 @@
# Changelog

## Unreleased
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved my previous changes in the README for changelog updates to the changelog file under a new Unreleased header since I'm not sure under what version you'd release this under, and it didn't feel right being presumptuous about the version being made in the README since I'm not the one producing a new package.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll release under v1.2.1, you were right before 😄
But I do understand why you did change. I'll ask you to maintain like that, because I do intend to make some other changes, and I'll change it back to 1.2.1 when it's time to merge at master. Thank you!

@@ -51,7 +51,7 @@ const argumentError = ({ expected = '', received, extraInfo = '' }) => {
try {
return new TypeError(`${'You should provide ' + expected}${'\n' + extraInfo}${'\nReceived: ' + JSON.stringify(received)}`)
} catch (err) {
if (err.message === 'Converting circular structure to JSON') {
if (err.message.indexOf('Converting circular structure to JSON') > -1) {
Copy link
Author

@BluuArc BluuArc Aug 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated this line to fix a failing unit test and because apparently on newer browsers the error message itself includes more details on the property having a circular dependency.

image

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that also. Thank you for the update!

@israelss
Copy link
Owner

israelss commented Sep 1, 2021

@BluuArc between work and studies I am very busy in the last couple of weeks. I will do my best to review your changes this weekend. Also, I'm thinking of include your work into another branch, and later merge it with master. This weekend I will let you know. Thank you again for your contribution and patience!

Copy link
Owner

@israelss israelss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes!
I'll merge it to a new branch, where I'll do some work for the next version, instead of master, and sooner than later your work will make its way into master! Thank you again!

@@ -1,5 +1,7 @@
# Changelog

## Unreleased
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll release under v1.2.1, you were right before 😄
But I do understand why you did change. I'll ask you to maintain like that, because I do intend to make some other changes, and I'll change it back to 1.2.1 when it's time to merge at master. Thank you!

@@ -51,7 +51,7 @@ const argumentError = ({ expected = '', received, extraInfo = '' }) => {
try {
return new TypeError(`${'You should provide ' + expected}${'\n' + extraInfo}${'\nReceived: ' + JSON.stringify(received)}`)
} catch (err) {
if (err.message === 'Converting circular structure to JSON') {
if (err.message.indexOf('Converting circular structure to JSON') > -1) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that also. Thank you for the update!

@israelss israelss changed the base branch from master to v1.2.1 September 14, 2021 15:50
@israelss israelss merged commit a932af8 into israelss:v1.2.1 Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOMException: Failed to execute 'postMessage' on 'Worker': function (a, b, c) {
4 participants