-
Notifications
You must be signed in to change notification settings - Fork 20
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
Useful stuff #20
Useful stuff #20
Conversation
@@ -52,7 +52,7 @@ module.exports = function upload(stream, idOrPath, tag, done) { | |||
}).chain(function() { | |||
return File.whereUpdate({id: fileId}, {version: version.id}) | |||
.execWithin(tx); | |||
}).map(function() { | |||
}).then(function() { |
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.
Good catch.
Rebased and ready to merge (fast-forward?). |
@@ -27,12 +27,13 @@ | |||
], | |||
"scripts": { | |||
"build-dist": "mkdirp dist && rollup -c", | |||
"build": "npm run build-dist && uglifyjs -c 'warnings=false' -m -o dist/creed.min.js -- dist/creed.js", | |||
"build-es6": "mkdirp dist && rollup -f cjs -o dist/creed.js src/main.js", |
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.
indentation
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.
ooops.
Thanks for rebasing this into a smaller chunk. I made some comments on the source, but haven't made it through the tests yet. I should have time tonight to review those. |
"preversion": "npm run build", | ||
"check-coverage": "istanbul check-coverage --statements 100 --branches 100 --lines 100 --functions 100 coverage/coverage*.json", | ||
"lint": "jsinspect src && eslint src", | ||
"pretest": "npm run lint", | ||
"test": "istanbul cover _mocha", | ||
"test": "istanbul cover node_modules/mocha/bin/_mocha", |
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.
This shouldn't be necessary, since _mocha
gets linked in node_modules/.bin/
(I've used istanbul cover _mocha
in quite a few other projects without any problem). Did you have problems with it?
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.
Yes, like many others: gotwarlost/istanbul/issues/90. The problem is that on Windows, node_modules/.bin/_mocha
is a bash file and istanbul throws when trying to load it as a js module.
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.
Drat, windows 🔫 😭 Oh well, good to know!
* fix quotes of argument to uglify * not sure whether specifying the path node_modules/mocha/bin/ is an antipattern (some comments by npm authors claim so) but istanbul does not seem to take the PATH into account
Ready to merge now, I think. |
return assertSame(p, res) | ||
}) | ||
|
||
/* it('should have never state for never', () => { |
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.
Hmmm, I might have missed these isNever-related tests. Why are they commented out?
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.
They're commented out because they all fail :-) See #30
This is a good example for a difference between futures that are resolved before the method call and those that are resolved "asynchronously".
Thanks for being patient with my radio silence lately :) I left a couple more comments: one about silencer, and another with a question about some commented-out tests that I just noticed. |
Hmmm, and oddly enough, I'm seeing more difference between the |
just use "npm run build-es6" instead of "npm run build" and the /dist/creed.js file will contain native ES6 except for the module syntax benchmarks will automatically use it instead of /src/main.js as entry point
Considering your comment, I did some benchmarks myself as well. And indeed, the
This kinda makes sense as |
Hmmm, strange. I was able to observe a 10% difference by just flipping back and forth between IOW, on my laptop in node 6.3.x, when the only variable is I agree Indexed is a cleaner solution. I'm cool with it. |
@@ -47,6 +47,7 @@ export function silenceError (p) { | |||
p._runAction(silencer) | |||
} | |||
|
|||
// implements Action |
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 for adding this comment, too.
I'll give this another quick once-over tonight, and then hopefully merge it. |
Have you thought about how we can implement bifunctor with Action? |
I guess you'd have to do
The alternative would be the to pass |
Thanks for the thoughts on bifunctor. I think we can merge this ahead of #34, and figure out a good way to implement bifunctor in the new Action-based world. We can probably refactor to parameterize a bit more. |
Thanks for all the work on this, @bergus! |
I just tried merging this and am curious why you did rebase/squash all these commits instead of doing a regular merge? This kinda fragments my history :-/ |
…that occurred to me during working on cancellation (#21) and handles (#9).
Feel free not to like 130aed7 ("better module structure") and I'll drop it from this PR. The other commits shouldn't be so controversial I hope.