Skip to content

Commit

Permalink
[4.4] Node 20 (joomla#42331)
Browse files Browse the repository at this point in the history
* Node 20

Signed-off-by: Dimitris Grammatikogiannis <[email protected]>

* Update build.js

* sign drone config

---------

Signed-off-by: Dimitris Grammatikogiannis <[email protected]>
Co-authored-by: Richard Fath <[email protected]>
  • Loading branch information
dgrammatiko and richard67 authored Nov 11, 2023
1 parent ff0670e commit 584d7b0
Show file tree
Hide file tree
Showing 8 changed files with 154 additions and 185 deletions.
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ steps:
- ./libraries/vendor/bin/phan

- name: npm
image: node:18-bullseye-slim
image: node:20-bullseye-slim
depends_on: [ phpcs ]
volumes:
- name: npm-cache
Expand Down Expand Up @@ -471,6 +471,6 @@ trigger:

---
kind: signature
hmac: e6258dbb42f2d93905d0ed3496ccca6e9133d6fd9867ff3b22ccb8b810a01a3e
hmac: 668e2a3bfab925caf4bc0062eaf622d2527f3b8d805e21b663ff1dd89897a431

...
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Build Status
---------------------
| Drone-CI | AppVeyor | PHP | Node | npm |
| ------------- | ------------- | ------------- | ------------- | ------------- |
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=4.4-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/4.4-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V7.2.5-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V18.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v9.6.7-green)](https://nodejs.org/en/) |
| [![Build Status](https://ci.joomla.org/api/badges/joomla/joomla-cms/status.svg?branch=4.4-dev)](https://ci.joomla.org/joomla/joomla-cms) | [![Build status](https://ci.appveyor.com/api/projects/status/ru6sxal8jmfckvjc/branch/4.4-dev?svg=true)](https://ci.appveyor.com/project/release-joomla/joomla-cms) | [![PHP](https://img.shields.io/badge/PHP-V7.2.5-green)](https://www.php.net/) | [![node-lts](https://img.shields.io/badge/Node-V20.0-green)](https://nodejs.org/en/) | [![npm](https://img.shields.io/badge/npm-v10.1.0-green)](https://nodejs.org/en/) |

Overview
---------------------
Expand Down
22 changes: 11 additions & 11 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,16 @@ const { Timer } = require('./build-modules-js/utils/timer.es6.js');
const options = require('../package.json');
const settings = require('./build-modules-js/settings.json');


const handleError = (err, terminateCode) => {
console.error(err); // eslint-disable-line no-console
process.exit(terminateCode);
};

if (semver.gte(semver.minVersion(options.engines.node), semver.clean(process.version))) {
handleError(`Node version ${semver.clean(process.version)} is not supported, please upgrade to Node version ${semver.clean(options.engines.node)}`, 1);
}

// The command line
const Program = new Command();

Expand All @@ -47,12 +57,6 @@ if ('settings' in settings) {
options.settings = settings.settings;
}

const handleError = (err, terminateCode) => {
// eslint-disable-next-line no-console
console.error(err);
process.exit(terminateCode);
};

const allowedVersion = () => {
if (!semver.satisfies(process.version.substring(1), options.engines.node)) {
handleError(`Command line tools require Node Version ${options.engines.node} but found ${process.version}`, -1);
Expand Down Expand Up @@ -167,9 +171,5 @@ if (cliOptions.prepare) {
))
.then(() => bench.stop('Build'))
.then(() => { process.exit(0); })
.catch((err) => {
// eslint-disable-next-line no-console
console.error(err);
process.exit(-1);
});
.catch((err) => handleError(err, -1));
}
Loading

0 comments on commit 584d7b0

Please sign in to comment.