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
Fixup system - follow up on #4356 #4373
Conversation
rewrite affected modules
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.
It's not good that you mixed ES6 refactoring with other changes in this PR! This makes reviewing difficult. Stay focused with PRs.
@@ -1,5 +1,5 @@ | |||
it("should polyfill System", function() { | |||
if (typeof System === "object" && typeof System.register === "function") { | |||
if (typeof System.register === "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.
Why are changes to the tests necessary?
lib/ParserHelpers.js
Outdated
parser.state.current.addVariable(name, expression, deps); | ||
return true; | ||
}; | ||
module.exports = class ParserHelpers { |
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.
ParserHelpers is not a real class. Stay with the exports.addParsedVaraibleToModule
style. It's more aligned with the future style export function addParsedVariableToModule()
.
test/cases/parsing/typeof/index.js
Outdated
@@ -45,7 +45,6 @@ it("should not parse filtered stuff", function() { | |||
if(typeof module === "undefined") module = require("fail"); | |||
if(typeof module != "object") module = require("fail"); | |||
if(typeof exports == "undefined") exports = require("fail"); | |||
if(typeof System !== "object") exports = require("fail"); |
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.
Why are changes to the tests necessary?
typeof System
should object
in webpack.
reverted the refactor. |
changes are reverted. |
buildin/system.js
Outdated
@@ -1,3 +1,6 @@ | |||
/* global System */ | |||
// "fix" for users of "System" global |
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.
fix comment
use webpacks "own" System polyfill, do not try to access a previously existing one. Instead make sure everything will be "shadowed" by the webpack System. thx @sokra for the help!
Thanks |
followup on #4356
see there for detailed description