Commit fd8ce7b
committed
Provide compatibility with Node 18 and a few more little things
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 bin` command is not available
anymore, and that's what we used both for:
1) Search if a given binary has been installed (say, grunt-cli...)
2) Launch a number of binaries (grunt, eslint, gherkin-lint....)
So here we are geting rid of all those uses, changing them by:
1) `npm list` to verify if a package is already installed.
2) `npx` to 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.
Going to run some tests now...1 parent 33e6cd2 commit fd8ce7b
File tree
3 files changed
+49
-82
lines changed- grunt_process
- prepare_npm_stuff
- remote_branch_checker
3 files changed
+49
-82
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
121 | 107 | | |
122 | 108 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | 109 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
149 | 114 | | |
| 115 | + | |
| 116 | + | |
150 | 117 | | |
151 | 118 | | |
152 | 119 | | |
153 | 120 | | |
154 | 121 | | |
155 | 122 | | |
156 | 123 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
161 | 128 | | |
| 129 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
| 373 | + | |
| 374 | + | |
379 | 375 | | |
380 | 376 | | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
| 428 | + | |
| 429 | + | |
441 | 430 | | |
442 | 431 | | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
448 | | - | |
449 | | - | |
| 447 | + | |
| 448 | + | |
450 | 449 | | |
451 | 450 | | |
452 | 451 | | |
| |||
456 | 455 | | |
457 | 456 | | |
458 | 457 | | |
459 | | - | |
| 458 | + | |
460 | 459 | | |
461 | 460 | | |
462 | | - | |
| 461 | + | |
463 | 462 | | |
464 | 463 | | |
465 | 464 | | |
| |||
0 commit comments