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

add support for node 6 #67

Merged
merged 4 commits into from Jun 19, 2018
Merged

add support for node 6 #67

merged 4 commits into from Jun 19, 2018

Conversation

ranyitz
Copy link
Contributor

@ranyitz ranyitz commented Jun 16, 2018

Summary

This PR Fixes #64 and adds node 6 support

  • Add a build script that runs babel and transpile all files from lib to dist
  • Add dist to .gitignore
  • Add dist & index.js to the files array in package.json so they will be available on next publish.
  • Add an index.js file on the root, which routes between lib and dist according to the user's Node version.
  • Configure Travis to run on both Node 6 and 8
  • Promisified a part of the tests. I started by using babel-register but then I realized that I couldn't test that they actually run on node 6.
  • Update readme

Test Plan

All tests are passing on CI when using Node 6

@ranyitz ranyitz mentioned this pull request Jun 16, 2018
Copy link
Collaborator

@lukeed lukeed left a comment

Choose a reason for hiding this comment

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

IMO we should add a promise-based solution manually. Babel always makes a mess of async rewrites, or at least embeds a sizable runtime/mapper.

Manual rewrite would be much simpler to maintain than the sync version tbh.

Also, you never want to use stage-* anymore. Tip comes from Babel team. Stages change too often and typically only want an item or two from the set.

Not a fan of the dynamic require personally. Users should be explicit in what they use, just like tiny-glob/sync.

Just my thoughts while on the go~

@terkelg
Copy link
Owner

terkelg commented Jun 17, 2018

Thanks for the review Luke. Is async/await the only thing we need Babel for at the moment? If so, I agree a manual rewrite would be preferable

@ranyitz
Copy link
Contributor Author

ranyitz commented Jun 17, 2018

@lukeed @terkelg, async await is not the only thing, you're also using object-rest-spread which is part of stage-3 preset (moved to stage 4 though). I removed the usage in stage-2 in favor of using this specific plugin only.

Manual rewrite would be much simpler to maintain than the sync version tbh.

There is no sync version, this PR is only about supporting Node 6 without changing any behavior.

@lukeed
Copy link
Collaborator

lukeed commented Jun 17, 2018

Don't mind me 🙃 Reviewing while grocery shopping is bad idea. I thought I was getting emails about the tiny-glob repo 🤦‍♂️

@terkelg
Copy link
Owner

terkelg commented Jun 18, 2018

Thanks @ranyitz! I'll have a look tonight

@terkelg terkelg merged commit 6e18992 into terkelg:master Jun 19, 2018
@ranyitz ranyitz deleted the support-node-6 branch June 19, 2018 05:47
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.

None yet

3 participants