Fix how global define is unset #73

Merged
merged 1 commit into from Apr 25, 2016

Projects

None yet

3 participants

@novemberborn
Member

define was just a local variable. Actually unset the global define when requiring a Node module.

Looks like there was no test for this behavior. I'd add it but not quite sure where to start.


This fixes TypeError: ESP.parse is not a function output in test runs, see this Travis build for an example. In this case Intern uses loader to load a custom reporter, which then requires istanbul/lib/instrumenter. This module requires esprima which erroneously selects the AMD loader.

@novemberborn novemberborn fix how global define is unset
`define` was just a local variable. Actually unset the global `define` when
requiring a Node module.
bfa061f
@kitsonk kitsonk self-assigned this Apr 25, 2016
@kitsonk kitsonk added this to the 2016.04 milestone Apr 25, 2016
@kitsonk kitsonk added the bug label Apr 25, 2016
@kitsonk kitsonk merged commit c4b4503 into master Apr 25, 2016

2 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
jQuery Foundation CLA All authors have signed the CLA
Details
@novemberborn novemberborn added a commit to novemberborn/routing that referenced this pull request Apr 25, 2016
@novemberborn novemberborn patch dojo-loader dd6f876
@novemberborn novemberborn deleted the fix-unset-global-define branch Apr 26, 2016
@novemberborn novemberborn referenced this pull request in dojo/meta Apr 29, 2016
Closed

Distribution Formats #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment