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

Refactor TypeScript definition to CommonJS compatible export #59

Merged
merged 1 commit into from
Apr 6, 2019
Merged

Refactor TypeScript definition to CommonJS compatible export #59

merged 1 commit into from
Apr 6, 2019

Conversation

BendingBender
Copy link
Contributor

Breaking change for the same reasons as PCancelable.

@sindresorhus sindresorhus merged commit 11a0807 into sindresorhus:master Apr 6, 2019
@Codex-
Copy link
Contributor

Codex- commented Apr 7, 2019

@sindresorhus , Fyi, changelog specifies

You need to change import pQueue from 'p-queue'; to import pQueue = require('p-queue');

But import pQueue from 'p-queue'; is still valid from my testing 🤔🤔

@BendingBender
Copy link
Contributor Author

BendingBender commented Apr 7, 2019

This will still work for you if you use either the syntheticDefaultImports or the esModuleInterop compiler flags. If you would disable them, then you would get an error.

In the case of syntheticDefaultImports it will compile but break at runtime if you don't use an additional compile step (WebPack, Babel, ...) that adds the default property to every lib that don't have it.

@Codex-
Copy link
Contributor

Codex- commented Apr 7, 2019

Ah good point, I tested without allowSyntheticDefaultImports enabled, but did have esModuleInterop enabled 👍

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