-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
feat: Upgrade to babel 7, drop Node 4 support. #158
Conversation
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.
LGTM overall :) but as mentioned, my review is not necessarily complete.
package.json
Outdated
"find-up": "^2.1.0", | ||
"istanbul-lib-instrument": "^1.10.1", | ||
"test-exclude": "^4.2.1" | ||
"@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.51", |
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.
We should probably introduce a package-lock.json
since that seems to be our preference :)
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.
I've added this.
- "6" | ||
- "8" |
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.
I've been using the following config recently to not have to worry about keeping this list up to date... however, we do technically support one LTS version back (v6, in this case). It would be nice if there was an alias for that but I don't know of one.
- "lts/*"
- "stable"
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.
I think testing of the oldest version we support is worth it, node.js major release cycle is long enough that adding new versions when needed isn't a big deal.
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.
I think I'm with @coreyfarrell on this one, I like that it's more explicit.
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.
@coreyfarrell regarding this.file.opts.inputSourceMap
, do we have any tests in place related to this feature? I don't 100% remember when this logic was added, it might be worth:
- going through the commit history and finding out when we added this sourceMap handling.
- making sure we have an appropriate test in place, since the logic is changing slightly.
I'm excited to land this rework you've done ... I think we'll want to release it to a next
branch, and then reach out to someone at Jest (CC: @aaronabramov) to make sure that the upgrade is smooth ... I'm a little gun shy about releasing the 2.x Istanbul packages to latest
, without having a plan for synchronizing the release with Jest.
- "6" | ||
- "8" |
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.
I think I'm with @coreyfarrell on this one, I like that it's more explicit.
package.json
Outdated
"find-up": "^2.1.0", | ||
"istanbul-lib-instrument": "^1.10.1", | ||
"test-exclude": "^4.2.1" | ||
"@babel/plugin-syntax-object-rest-spread": "7.0.0-beta.51", |
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.
@loganfsmyth, from the babel project, points out that we should revert using @babel/plugin-syntax-object-rest-spread
; I think this major release is a good time to do so:
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.
Done.
CC: @aaronabramov we're close to switching Istanbul over to using Babel 7; I'd like to coordinate with Jest and make sure this doesn't blow anything up, before we switch over to the |
yeah! i can test it with jest. can you publish an alpha version so i could run it on a few codebases and see if everything works? |
BREAKING CHANGE: Drop node 4 support, upgrade to babel 7. In addition this removes @babel/plugin-syntax-object-rest-spread from this plugin. Users who require this language feature will have to include it manually.
@bcoe Yes we have |
BREAKING CHANGE: Drop node 4 support, upgrade to babel 7.
This is makes use of what is currently istanbul-lib-instrument@next and test-exclude@next. Note I was not able to find documentation about
this.file.inputMap.sourcemap
- this was found by dumping and inspectingthis.file
, looking for the object matchingthis.file.opts.inputSourceMap
from babel@6.