Merge branch 'MDL-67536-master' of https://github.com/dcai/moodle

This commit is contained in:
Andrew Nicols 2021-06-24 11:21:55 +08:00
commit 728b3d6a7a
8 changed files with 781 additions and 7222 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -1,6 +0,0 @@
Installation instructions can be found at https://babeljs.io/docs/en/babel-polyfill.html#usage-in-browser
The steps are essentially:
1.) npm install @babel/polyfill
2.) copy polyfill.js and polyfill.min.js from the "dist" folder from the npm release into lib/babel-polyfill/
3.) npm uninstall --save @babel/polyfill (don't want to include that with Moodle package.json)

View file

@ -1614,14 +1614,6 @@ EOF;
// First the skip links.
$output = $renderer->render_skip_links($this->skiplinks);
// The polyfill needs to load before the other JavaScript in order to make sure
// that we have access to the functions it provides.
if (empty($CFG->cachejs)) {
$output .= html_writer::script('', $this->js_fix_url('/lib/babel-polyfill/polyfill.js'));
} else {
$output .= html_writer::script('', $this->js_fix_url('/lib/babel-polyfill/polyfill.min.js'));
}
// Include the Polyfills.
$output .= html_writer::script('', $this->js_fix_url('/lib/polyfills/polyfill.js'));

File diff suppressed because one or more lines are too long

View file

@ -1,15 +1,23 @@
The steps are essentially:
1) Install mdn-polyfills and url-polyfill packages
1) Install required packages
npm install --no-save mdn-polyfills url-polyfill
npm install --no-save mdn-polyfills url-polyfill regenerator-runtime core-js-bundle
2) Join them all together:
cd node_modules/mdn-polyfills
cat CustomEvent.* Element.* Function.* HTMLCanvasElement.* MouseEvent.* Node.prototype.* NodeList.* > ../../lib/polyfills/polyfill.js
cd ../url-polyfill/
cat url-polyfill.min.js >> ../../lib/polyfills/polyfill.js
cd ../regenerator-runtime
cat runtime.js >> ../../lib/polyfills/polyfill.js
cd ../core-js-bundle
cat minified.js >> ../../lib/polyfills/polyfill.js
sed -i '/\/\/\# sourceMappingURL=minified.js.map/d' ../../lib/polyfills/polyfill.js
3) Uninstall the packages again
npm uninstall --no-save mdn-polyfills url-polyfill
npm uninstall --no-save mdn-polyfills url-polyfill regenerator-runtime core-js-bundle

View file

@ -303,10 +303,16 @@
<licenseversion>3-Clause</licenseversion>
</library>
<library>
<location>babel-polyfill</location>
<name>babel-polyfill</name>
<location>polyfills</location>
<name>regenerator-runtime</name>
<license>MIT</license>
<version>7.7.0</version>
<version>0.13.7</version>
</library>
<library>
<location>polyfills</location>
<name>core-js-bundle</name>
<license>MIT</license>
<version>3.15.0</version>
</library>
<library>
<location>polyfills</location>

View file

@ -25,6 +25,7 @@ information provided here is intended especially for developers.
* The completion_info function display_help_icon() which returned the 'Your progress' help icon has been deprecated and
should no longer be used.
* The completion_info function print_help_icon() which has been deprecated since Moodle 2.0 should no longer be used.
* @babel/polyfill has been removed in favour of corejs@3
=== 3.11 ===
* PHPUnit has been upgraded to 9.5 (see MDL-71036 for details).