refactor harmonyAcceptDependency to es6#3708
Conversation
| source.insert(dep.range[1], ")(__WEBPACK_OUTDATED_DEPENDENCIES__); }"); | ||
| } else { | ||
| source.insert(dep.range[1] - 0.5, ", function() { " + content + "}"); | ||
| source.insert(dep.range[1] - 0.5, `, function() { ${content}}`); |
There was a problem hiding this comment.
@sokra won't something break if space will be added before closing bracket?
There was a problem hiding this comment.
you probably need to update the stats test, but elsewise it should be fine.
There was a problem hiding this comment.
not sure, which space are you guys referring to? or should i add one here?
There was a problem hiding this comment.
@timse I mean changing this line to
source.insert(dep.range[1] - 0.5, `, function() { ${content} }`)for readability. Notice space before function's body closing curly bracket
There was a problem hiding this comment.
sure should i add it?
will do then tonight!
There was a problem hiding this comment.
Yeah that looks great, I think that is a good approach.
TheLarkInn
left a comment
There was a problem hiding this comment.
Nice work. Getting closer to Null/Const/Dependency.js ;-)
What kind of change does this PR introduce?
refactor
Did you add tests for your changes?
current tests should pass
If relevant, link to documentation update:
N/A
Summary
upgrade HarmonyAcceptDependency and HarmonyAcceptDependencyTemplate to es6
Does this PR introduce a breaking change?
No