Repository navigation
Adds support for gulpfiles using ESM. - #113505
Conversation
New Node versions support ECMAScript modules beside the classic CommonJS modules. This means gulp does so too. So we endup with three entry points: The legacy gulfile.js and the new gulpfile.cjs as well as gulpfile.mjs. When using only ESM or the ESM package, gulp suggest: Rename 'gulpfile.js' to 'gulpfile.esm.js'
Alex Ross (alexr00)
left a comment
There was a problem hiding this comment.
Thanks for the PR!
| @@ -70,21 +89,23 @@ function showError() { | |||
| } | |||
|
|
|||
| async function findGulpCommand(rootPath: string): Promise<string> { | |||
There was a problem hiding this comment.
While I cannot deny that the refactoring here is clearer, it's easier/faster/less cognitive load to review PRs that don't include refactors and features together. The greater the number of lines changed, the less likely I am to get to it quickly (and I know I'm not alone on that :))
|
I'm using VSCode Insiders and this error started appearing a few days ago while running tasks. Note that I do not use gulp. The output tab logs: I'm not sure if this PR is relevant but wanted to report it. |
|
Thank you Andrei Alecu (@andreialecu) for reporting this! Not the first time it would have been good to have some linter error for checking truthiness of a promise. Fixed with bebd066 |

New Node versions support ECMAScript modules beside
the classic CommonJS modules.
This means gulp does so too. So we endup with three entry points:
The legacy gulfile.js and the new gulpfile.cjs as well as gulpfile.mjs.
When using only ESM or the ESM package, gulp suggest:
Rename 'gulpfile.js' to 'gulpfile.esm.js'. This entry point is also added.
For more details refer to https://github.com/gulpjs/gulp#use-latest-javascript-version-in-your-gulpfile
This PR fixes #