Node18 compatibility and more #260
Merged
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.
We need to support Node 18 from the CI tools (see MDL-75012). So
this commit provides that, basically.
The main difference is that the
npm bincommand is not availableanymore, and that's what we used both for:
So here we are geting rid of all those uses, changing them by:
npm listto verify if a package is already installed.npxto launch the binaries.Also, we have removed some very-old conditional blocks in the code, that
were providing compatibility with very, very old Moodle branches, before
we used grunt and friends.
Finally, we are now installing stylelint-checkstyle-formatter if
it's detected that core has not installed it. After all, it's a CI
dependency, not a core one, so maybe the more correct thing is to
delegate its installation to the CI / testing tools.
And, basically, that is. I've tested it with both Node 16 (current
master) and Node 18 (MDL-75012) and seems to be working ok.
Let's see if it finally pass testing. It's passing locally but have got some non-sense results in the last execution @ Travis... 🤞