MDL-73610 nodejs: Small updates to required packages

The main goal of this issue is to avoid scanners (Dependabot
and friends), reporting about security issues with the current
xmldom 0.6.0 package.

Note that this doesn't affect prod at all, because it's a dev
dependency, hardly exploitable. So it's not a security fix, just
a security_benefit, if something.

So here, we are updating from xmldom 0.6.0 to @xmldom/xmldom 0.8.7
(note that the package was renamed in 0.7.0, so it's the very same)

Also, when proceeding with the changes, it was detected that we
are incorrectly declaring @babel/eslint-parser as a normal dependency
instead of a development one, so we are also fixing that little detail.

The commands executed to get the changes above applied have been:

- nvm use
- npm install @xmldom/xmldom@^0.8.7 --save-dev
- npm uninstall xmldom
- npm install @babel/eslint-parser@^7.17.0 --save-dev

(we haven't run a complete re-install because we only want to modify
the minimum possible at this stage).
This commit is contained in:
Eloy Lafuente (stronk7)
2023-04-06 15:00:14 +02:00
parent 0b15830a44
commit 7e6d3caab7
3 changed files with 475 additions and 171 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ module.exports = function(grunt) {
const path = require('path');
const tasks = {};
const async = require('async');
const DOMParser = require('xmldom').DOMParser;
const DOMParser = require('@xmldom/xmldom').DOMParser;
const xpath = require('xpath');
const semver = require('semver');
const watchman = require('fb-watchman');
+472 -166
View File
File diff suppressed because it is too large Load Diff
+2 -4
View File
@@ -4,11 +4,13 @@
"description": "Moodle",
"devDependencies": {
"@babel/core": "7.17.5",
"@babel/eslint-parser": "^7.21.3",
"@babel/plugin-proposal-class-properties": "7.16.7",
"@babel/plugin-proposal-json-strings": "7.16.7",
"@babel/plugin-syntax-dynamic-import": "7.8.3",
"@babel/plugin-syntax-import-meta": "7.10.4",
"@babel/preset-env": "7.16.11",
"@xmldom/xmldom": "^0.8.7",
"ajv": "8.10.0",
"async": "3.2.3",
"babel-eslint": "10.1.0",
@@ -37,13 +39,9 @@
"stylelint": "13.3.3",
"stylelint-checkstyle-formatter": "0.1.2",
"stylelint-csstree-validator": "1.8.0",
"xmldom": "^0.6.0",
"xpath": "0.0.32"
},
"engines": {
"node": ">=16.14.0 <17"
},
"dependencies": {
"@babel/eslint-parser": "^7.17.0"
}
}