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

A complete refactor using promises instead of thunks with other new features and API changes. #18

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

brentropy
Copy link
Owner

@brentropy brentropy commented Jul 5, 2016

Remaining things to do before merging:

  • Write tests for new code in src/ (could be based on old test that are not removed yet)
  • Add prepublish build step
  • Update dependencies, this hasn't been touched in a long time
  • Update examples (use async await instead of co, with maybe one co specific example)
  • Recreate async.js in the new code
  • Fix bugs
  • Remove old code in lib/

package.json Outdated
@@ -4,7 +4,7 @@
"description": "A go style channel implementation that works nicely with co",
"main": "index.js",
"scripts": {
"test": "mocha"
"test": "babel-node --stage=0 node_modules/.bin/blue-tape src/**/*.test.js"
Copy link
Owner Author

Choose a reason for hiding this comment

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

I was on a kick where I really liked tape when I wrote this, but I am good with sticking with mocha

@brentropy brentropy mentioned this pull request Jul 5, 2016
src/select.js Outdated
@@ -0,0 +1,30 @@
import Deferred from './deferred'

function pairs ()
Copy link
Owner Author

Choose a reason for hiding this comment

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

oops, shouldn't have commited this line :(, thats what I get for just commiting stuff in a half complete state.

@brentropy
Copy link
Owner Author

@coderhaoxin I have had some time to work on this. I will try to push up some stuff by tomorrow morning. I am updating the dependencies, writing tests, and improving the select functionality.

@brentropy
Copy link
Owner Author

@coderhaoxin I just pushed up a bunch of stuff, there is still more to be done, but I will try to take some time over the weekend.

Let me know if you have any feedback on what I am doing in this branch.

brentropy and others added 13 commits July 9, 2016 23:33
gitignore: add lib

fix entry
including adding type annotations for everything as well as some
refactoring/api changes to make it fit better with static types.

why typescript? i really like typescript and wanted to al least
publish a typescript definition file with the package. it will
be much easier to keep in sync if i write the src in typescript
as well. it works out really nice for a lot of things. for
example: directional channels (similar to golang) can now be
acheived and checked at compile time by using specialized
directional interface types `InChannel<T>` and `OutChannel<T>`.

chan will continue to be just as usable from javascript.

updates to the build and tests as well as removal of the old
babel dependencies will come in future commits. this is a big
enough chunck already.
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 this pull request may close these issues.

1 participant