Skip to content

Conversation

@alubbe
Copy link
Member

@alubbe alubbe commented May 14, 2019

To make the most of async/await (performance & stack traces), we need to use the native Promises. This PR does not change that the default export uses promish, but it does add two new exports that allow access to the modern codebase and native promises. I've also fixed a couple of eslint failures in the affected files.

const Excel = require('exceljs/modern.nodejs');
import Excel from 'exceljs/modern.browser';

Copy link
Contributor

@defshift defshift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alubbe alubbe force-pushed the no-promise-polyfill-on-modern-setups branch from 274a84e to 791292a Compare May 14, 2019 09:54
if (value instanceof Date) {
if (dateFormat) {
dateUTC ? moment.utc(value).format(dateFormat) : moment(value).format(dateFormat);
return dateUTC ? moment.utc(value).format(dateFormat) : moment(value).format(dateFormat);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure the missing return here was a bug

Copy link
Collaborator

@guyonroche guyonroche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@guyonroche guyonroche merged commit ea2b1d2 into exceljs:master May 15, 2019
@alubbe alubbe deleted the no-promise-polyfill-on-modern-setups branch May 15, 2019 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants