Skip to content
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

Promise returned by render has or has not .done() method, depending on environment. #2446

Closed
OJezu opened this issue Feb 11, 2015 · 6 comments

Comments

@OJezu
Copy link

OJezu commented Feb 11, 2015

Less.js is using then/promise as shim for Promise if it is not provided by environment. However, promises as created by then/promise have non-standard (but very useful!) .done() method while native ones do not. Which leads to inconsistency.

Related: gulp-community/gulp-less#140 - render().done() is not a function, but only with modern v8.

@lukeapage
Copy link
Member

I don't want to have to always use a dependency just for one function. If the done function becomes standard we can test for it in the native implementation and then decide which version to use. Other team members might disagree so I'm leaving this NeedsDecision

@OJezu
Copy link
Author

OJezu commented Feb 25, 2015

@lukeapage npm will always (at least try to) download then/promise, so if it is there you might as well always use it.
Other solution would be to use a promise-shim that does not surpass standard.

@lukeapage
Copy link
Member

lukeapage commented Feb 25, 2015 via email

@OJezu
Copy link
Author

OJezu commented Feb 25, 2015

I think --no-optional would break things on node v0.10, as then it tries to load then/promise which is not installed.

@lukeapage
Copy link
Member

lukeapage commented Feb 25, 2015 via email

@stale
Copy link

stale bot commented Nov 14, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 14, 2017
@stale stale bot closed this as completed Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants