Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Prevent replacement of global.Promise in node v4 #625

Merged
merged 1 commit into from
Oct 4, 2016

Conversation

marcbachmann
Copy link
Contributor

Currently by requiring phantomjs-prebuilt, the original Promise is replaced by the es6-promise module.
This has been fixed in es6-promise v4.0.3 and we should incorporate it.

How to reproduce the current behavior?

$ nvm use 4
$ node
> console.log(Promise)
[Function: Promise]

> require('phantomjs-prebuilt')

> console.log(Promise)
{ [Function: lib$es6$promise$promise$$Promise]
  all: [Function: lib$es6$promise$promise$all$$all],
  race: [Function: lib$es6$promise$promise$race$$race],
  resolve: [Function: lib$es6$promise$promise$resolve$$resolve],
  reject: [Function: lib$es6$promise$promise$reject$$reject],
  _setScheduler: [Function: lib$es6$promise$asap$$setScheduler],
  _setAsap: [Function: lib$es6$promise$asap$$setAsap],
  _asap: [Function: asap] }

Currently by requiring `phantomjs-prebuilt`, the original Promise is replaced by the `es6-promise` module.
In es6-promise v4.0.3 this has been fixed and we should incorporate it.

How to reproduce the current behavior?
```
> console.log(Promise)
[Function: Promise]

> require('phantomjs-prebuilt')

> console.log(Promise)
{ [Function: lib$es6$promise$promise$$Promise]
  all: [Function: lib$es6$promise$promise$all$$all],
  race: [Function: lib$es6$promise$promise$race$$race],
  resolve: [Function: lib$es6$promise$promise$resolve$$resolve],
  reject: [Function: lib$es6$promise$promise$reject$$reject],
  _setScheduler: [Function: lib$es6$promise$asap$$setScheduler],
  _setAsap: [Function: lib$es6$promise$asap$$setAsap],
  _asap: [Function: asap] }
```
@nicks
Copy link
Contributor

nicks commented Oct 4, 2016

thanks!

@nicks nicks merged commit ac0da0b into Medium:master Oct 4, 2016
@nicks
Copy link
Contributor

nicks commented Oct 4, 2016

published as 2.1.13

@marcbachmann marcbachmann deleted the patch-1 branch October 4, 2016 16:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants