Require Node.js 12.20 and move to ESM#181
Conversation
BREAKING CHANGE: require Node.js >= 12.20
|
Thanks for working on this. You need to update index.d.ts (https://github.com/sindresorhus/typescript-definition-style-guide) and the readme for ESM too. |
| }; | ||
|
|
||
| module.exports = async (patterns, options) => { | ||
| export const globby = async (patterns, options) => { |
There was a problem hiding this comment.
I think there should be the following named exports:
globbyAsyncglobbySyncglobbyStream
There was a problem hiding this comment.
Ok. But let's save globby as globbyAsync alias.
There was a problem hiding this comment.
I disagree. Aliases cause confusion.
There was a problem hiding this comment.
Maybe just globby and globbySync?
BREAKING CHANGES: legacy cjs API was completely removed
|
rfr |
|
I can never decide how to handle named exports with async and sync methods:
The former looks nicer, but the latter is clearer. Any opinion? |
|
My guess is that for most users, the migration will look like this: |
|
Alright. Let's go with |
|
@sindresorhus, your turn |
|
@sindresorhus sorry, why do you avoid the default export here? |
|
I guess for consistency import? But I think maybe we can export both named and default? |
|
It's weird to have one default and one named when there are two main exports. I only do default and named export mix when there's only one main export and some secondary exports (like error, or helper utilities). |
No, there should be only one way to import the thing. Aliases create confusion and inconsistency. |
Uh oh!
There was an error while loading. Please reload this page.