Set __moduleName from context.id argument#6688
Conversation
|
Hi @guybedford, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
|
@guybedford, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR. |
|
👍, looks like we have two unit tests that need to be updated. |
|
I think this variable has to be injected after the prologue directive "use strict" |
There was a problem hiding this comment.
this should be var __moduleName = ${contextObjectForFile} && ${contextObjectForFile}.id; to avoid breaking users of older JSPM versions.
7d11859 to
793da33
Compare
|
Thanks, I've made these corrections. |
|
@guybedford can you please fix two remaining failing tests so we can pull in this PR? |
793da33 to
16c4fa3
Compare
16c4fa3 to
94fe3e0
Compare
|
@vladima sure I've got them passing now. |
Set __moduleName from context.id argument
|
thanks! |
|
@vladima can you merge this in release-1.8 as well. |
Set __moduleName from context.id argument
|
👍 Thanks for all the help getting this in. |
This resolves #6359 using the method suggested by @vladima as the replacement to the original PR at #6098.
This context object is described at https://github.com/ModuleLoader/es6-module-loader/wiki/System.register-Explained#how-it-works, and was considered more extensible for future spec changes than a string second argument directly.