Conversation
|
cc @babel/contributors |
|
This seems like a great idea to me |
|
See: danez/pirates#3 Breaking changes already being discussed. Should be sorted soon. |
|
@thejameskyle: thanks! @sebmck: actually, could you wait till tomorrow morning (PST) to move forward with this? We're going to make some API changes (danez/pirates#3), so may as well wait for that. (I'll update the PR with the new version at the time). Thanks! |
|
Will hold off, please ping us when you've finalized it |
|
@thejameskyle: Thanks, should be tomorrow, but I'll ping you regardless. |
|
Ok, @sebmck, @thejameskyle, @jamestalmage, @babel/contributors: Breaking API changes have been dealt with, Pirates@2.0.0 has been published, and this PR has been updated. I hope you enjoy! |
packages/babel-register/src/node.js
Outdated
There was a problem hiding this comment.
Why is revert an array if you only ever have one?
There was a problem hiding this comment.
Umm... I'll fix that. Thanks!
|
@thejameskyle: fixed, Sorry! |
packages/babel-register/src/node.js
Outdated
There was a problem hiding this comment.
travis just has a linting error after removing the each - just remove this line.
|
@hzoo: Fixed. (Although for some reason that was never a problem on my machine) |
|
Looks like Travis is still failing. Happy to merge this once CI is passing and all commits have been squashed. Thanks for doing this! |
28e9d02 to
28e3d73
Compare
|
@sebmck: I can't really figure out why travis is failing, because it appears to be completely unrelated to this PR. I also don't really have any experience with the babel build process, so it might be obvious to someone with experience. Is there any way you might be able to take a look at it? If not, or it's not immediately obvious, I'll just try re-implementing this, as it wasn't that difficult. |
dda5fd4 to
077a893
Compare
|
Ok, @sebmck: I've done some debugging, I really think it's something else (I could be wrong though). |
|
@ariporad Yeah you can probbaly see the output of the test had something to do with babel-plugin-flow-comments. I'm not sure why you're pr is the only one that has the issue but the problem is that the plugin doens't have a babel 6 version and its trying to run the plugin with babel 6 - I have a PR for it #3157 |
|
@hzoo: Ok, Thanks! It's good to know it's not me. |
|
Actually, @hzoo: I figured out the problem, and it's not that. The problem is that
Istanbul 1.0.0 hooks require properly, and by the time it's released will actually use pirates. |
|
ping |
|
Given the complexity with integrating with Istanbul that you mentioned in https://phabricator.babeljs.io/T6997, is there a chance this PR is going to be a breaking change? If so, I'd worry about releasing it in a non-major release. |
|
@loganfsmyth: Well... It shouldn't be. The current implementation of Since you have the proper permissions, could you try re-running the travis build? I have a sneaking suspicion of what the problem might be. |
|
Looks like there's conflicts but yeah can rebuild after that |
|
What... What did I do? |
Pirates is a simple module that enables easy require hooking. It makes sure that your require hook works properly. It also makes the implimentation of babel-register a lot simpler. For more on pirates: http://ariporad.link/piratesjs
|
😢 I would rebase your changes on top if you can/haven't lost those changes |
|
@hzoo: I thought... I thought I did. Ok, that fixed it. (The git history, not the travis build, unfortunately). |
|
rebuilding |
|
Ok this again (which doesn't make sense) |
|
@hzoo: I have no clue what that's about. It looks like the version of |
|
Nope, that didn't work. @hzoo: I'm not really familiar with |
|
Yeah I still don't get why only this PR has that error. Nah, we don't need to bump it since babel is built with babel 5. |
|
FYI babel-plugin-istanbul works great with babel-register |
|
Now that babel is build with babel 6 maybe this issue can be finally tackled? |
|
uh ya just need to rebase |
|
Closing in favor of #3609, maybe another PR |

Hi!
As was discussed in #3062, this PR uses
piratesto implement require hooks. That means that thebabel-registerrequire hook implementation is drastically simpler, and plays nicely with other hooks.This change is completely transparent (a patch version bump), and all the tests still pass.
Fixes #3062.