5 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
5d9eae8042 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).
2023-04-06 14:59:33 +02:00
Sara Arjona
f0a20c0a76 MDL-76802 core: Create a grunt task to get upgradable libs
A new grunt task, upgradablelibs, has been added in order to get the
list of libraries that have a newer version in their repositories.

Co-author: Andrew Lyons <andrew@moodle.com>
2023-03-13 11:53:23 +01:00
Andrew Nicols
ffac002f0d MDL-75783 javascript: Add optional jsconfig configuration
This commit adds a new Grunt task which generates a jsconfig.json file.

This file is described at
https://code.visualstudio.com/docs/languages/jsconfig and can be used
to configure vscode and other similar editors to understand our module
loading.

This task is an optional task for Grunt and can be run with:

    npx grunt jsconfig

The file is git-ignored and will not affect normal usage.
2022-10-18 09:33:04 +08:00
Andrew Nicols
32638b3a45 MDL-68496 Grunt: Stylelint should only lint relevant component files
Prior to this change the Grunt stylelint command was too greedy when
determining which files hsould be linted.

This change modifies the watch command to only watch relevant files and
subdirectories of each component directories. This means that unrelated
CSS and SCSS files are no longer watched for changes, and has the added
benefit of significantly increaseing the startup speed of grunt.

Without this patch applied the watch tasks were checking for matches in
the node_modules, and vendor directories.
2021-03-22 15:18:47 +08:00
Andrew Nicols
61fca0e05c MDL-68496 grunt: Restructure grunt tasks into subdirectories
Prior to this change all Grunt features were in a single Gruntfile.js
but this has become difficult to manage and maintain.

This commit moves the existing dependencies for component calculation
and babel moduel definition into a new .grunt directory, and
restructures the existing tasks in Gruntfile.js into separate task
configuration files.

This improves the maintainability of the Grunt build system and allows
for easier future expansion.
2021-03-19 12:56:35 +08:00