-
Bug
-
Resolution: Fixed
-
Blocker
-
3.9.10, 3.10.7, 3.11.3, 4.0
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
-
Policy: Keeping us on top of nodejs/npm LTS versions (including jumps to next LTS)
Since September 2018 (MDL-63346):
- This policy will be applied to ALL supported branches, normal and security-only.
- This policy won't update any tool per se, unless strictly needed by nodejs/npm own dependencies/changes. It won't include npm audit changes either. Those are handled apart. So, normally, only changes to .nvmrc and package.json will happen. That will be achieved by:
- update .nvmrc to the new version.
- run nvm install && nvm alias default node && nvm use to install, set it as new default and use it for the next steps.
- update package.json and set engines to the new restriction (>= new version and < next major).
- When needed to bump components or run some audit, a new issue, similar to this, will be created and these steps performed in order to get a renewed npm-shrinkwrap.json file:
- remove node_modules & npm-shrinkwrap.json
- npm cache clear --force
- npm install
- npm shrinkwrap
- In any case, simple update or complete components bump, run grunt and verify that all the generated css/js/map stuff remains the same. If there are differences in the generation... it will need to be analysed and decided if:
- accepted (so everything, shrinkwrap and generated css/js/map) lands [or]
- not accepted (and only change .nvmrc and package.json) instead).
- The resulting branches will be sent to github (or similar), making a peer-review request here so both travis and cibot will verify that all them pass ok.
- Changes will be normally integrated and the NodeJSVersion template and NodeJSExactVersion templates will be updated with latest information in the Docs.
- TODO (MDLSITE-5536): A job @ CI servers will be, daily, using latest lts/current version to detect if there are npm-shrinkwrap.json changes. It will fail when that happens and inform integrators. Jumps to lts/next will be detected manually,.
TARGET A) As far as nodejs/npm v14 (current LTS) has been advancing over the last months (since MDL-69815) from v14.15.0 to current v14.18.0:
TARGET B) And, because nodejs/npm v16 (next LTS) also has been advancing to v16.9.1 and it will become LTS next 26th October 2021:
https://nodejs.org/en/about/releases/
This is about to consider to bump to it for all our supported branches (39 and up, right now) to one of the 2 alternatives (A or B TARGETS) above. This requires:
- with TARGET nodejs/npm installed, regenerate npm-shrinkwrap.json (see instructions above)
- optionally (not part of the policy): look for deprecated and audit results, trying to update as many as possible.
- apply all the changes to core.
- review 3rd part systems: travis, CI servers, docs.moodle.org
- share about it in all channels as possible
This check should be performed some weeks before majors (part of the release process), hence creating it now (-6 weeks).
Ciao