Convert scripts/Gulpfile to checked mjs/cjs so they can run without compilation - #50988
Merged
Jake Bailey (jakebailey) merged 13 commits intoOct 7, 2022
Merged
Conversation
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This overall makes the build and branch switches faster. It's also a prerequisite for sharing some code between scripts and the
scripts/builtmodules (which are only used from the gulpfile).To prevent any annoying gitignore troubles, all files are either
mjsorcjs, any.jsfiles are ignored so going forward/back in the commit history shouldn't leave any annoying files around.I had to update
node-fetch; the previous version hits the new-ish issues with 4.8'sdefaultbehavior. I don't think this has any major impact on daily use of the repo, so differences in the versions shouldn't cause annoyances when bisecting.Leaving this as a draft until I go around to figure out what all are using these scripts directly, e.g.open-cherry-pick-prand such are not referenced in this repo so probably are defined in some build somewhere.Things that have to change external to this PR:
if [ -f "./scripts/open-cherry-pick-pr.mjs" ]; then ... else ... fi.chalk; this should be a no-op at this point given we now pin a specific verison, but when we're mjs, it's never a problem since the whole reason for the fix is to get around ESM stuff anyway.