Skip to content

Commit

Permalink
Merge pull request #17 from eea/develop
Browse files Browse the repository at this point in the history
Release 2.0.0 - Volto 17 support
  • Loading branch information
avoinea authored Apr 22, 2024
2 parents 83a0d46 + bc7a5cf commit b2687b5
Show file tree
Hide file tree
Showing 15 changed files with 490 additions and 288 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Jest configuration variables
# - possible values: ON, OFF
JEST_USE_SETUP=OFF
65 changes: 65 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
const fs = require('fs');
const path = require('path');
const projectRootPath = fs.realpathSync(__dirname + '/../../../');

let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
let configFile;
if (fs.existsSync(`${projectRootPath}/tsconfig.json`))
configFile = `${projectRootPath}/tsconfig.json`;
else if (fs.existsSync(`${projectRootPath}/jsconfig.json`))
configFile = `${projectRootPath}/jsconfig.json`;

if (configFile) {
const jsConfig = require(configFile).compilerOptions;
const pathsConfig = jsConfig.paths;
if (pathsConfig['@plone/volto'])
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`;
}

const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
const reg = new AddonConfigurationRegistry(projectRootPath);

// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
const addonAliases = Object.keys(reg.packages).map((o) => [
o,
reg.packages[o].modulePath,
]);

const addonExtenders = reg.getEslintExtenders().map((m) => require(m));

const defaultConfig = {
extends: `${voltoPath}/.eslintrc`,
settings: {
'import/resolver': {
alias: {
map: [
['@plone/volto', '@plone/volto/src'],
['@plone/volto-slate', '@plone/volto/packages/volto-slate/src'],
...addonAliases,
['@package', `${__dirname}/src`],
['@root', `${__dirname}/src`],
['~', `${__dirname}/src`],
],
extensions: ['.js', '.jsx', '.json'],
},
'babel-plugin-root-import': {
rootPathSuffix: 'src',
},
},
},
rules: {
'react/jsx-no-target-blank': [
'error',
{
allowReferrer: true,
},
],
}
};

const config = addonExtenders.reduce(
(acc, extender) => extender.modify(acc),
defaultConfig,
);

module.exports = config;
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.vscode/
.history
.eslintrc.js
.nyc_output
project
coverage
Expand Down
48 changes: 0 additions & 48 deletions .project.eslintrc.js

This file was deleted.

36 changes: 17 additions & 19 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,23 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [1.1.5](https://github.com/eea/volto-widget-theme-picker/compare/1.1.4...1.1.5) - 23 October 2023
### [2.0.0](https://github.com/eea/volto-widget-theme-picker/compare/1.1.5...2.0.0) - 22 April 2024

#### :rocket: New Features

- feat: Release 2.0.0 - Volto 17 support [alin - [`469692b`](https://github.com/eea/volto-widget-theme-picker/commit/469692b986faff3e590589d02cacedf75bcea3e5)]
- feat: Volto 17 support - refs #264527 [Alin Voinea - [`2534314`](https://github.com/eea/volto-widget-theme-picker/commit/25343143fa2865ba9a5910ed4796ae61830e4fb6)]

#### :house: Internal changes

- chore: Fix package.json [alin - [`c96ac43`](https://github.com/eea/volto-widget-theme-picker/commit/c96ac43af3199acc816875526bbc8b5875a2ec0d)]
- style: Automated code fix [eea-jenkins - [`6d26a6b`](https://github.com/eea/volto-widget-theme-picker/commit/6d26a6b9259901aed0fc1156413e12d15076a0f9)]

#### :hammer_and_wrench: Others

- test: add unit tests and delete snapshots [ana-oprea - [`7f2b845`](https://github.com/eea/volto-widget-theme-picker/commit/7f2b845f73872893f64e50035b051e75e4e37ddf)]
- test: Update to volto 17 PR30 [valentinab25 - [`6697fb7`](https://github.com/eea/volto-widget-theme-picker/commit/6697fb77ff151c01c7595da18935208ddfda1ef7)]
### [1.1.5](https://github.com/eea/volto-widget-theme-picker/compare/1.1.4...1.1.5) - 24 October 2023

#### :house: Internal changes

Expand All @@ -13,7 +29,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

#### :hammer_and_wrench: Others

- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`90a08dd`](https://github.com/eea/volto-widget-theme-picker/commit/90a08dd01ad5035b827eb4e74c4544d1420f9cd7)]
- test: change volto version in Jenkinsfile [ana-oprea - [`3105c0e`](https://github.com/eea/volto-widget-theme-picker/commit/3105c0e34ff772eaf7bb13780ed0ee1ba6728063)]
### [1.1.4](https://github.com/eea/volto-widget-theme-picker/compare/1.1.3...1.1.4) - 29 September 2023

Expand All @@ -39,42 +54,25 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

- i18n: Add en [Alin Voinea - [`887a3ae`](https://github.com/eea/volto-widget-theme-picker/commit/887a3ae639c49d368e76365eb42cdc9d4ee223ee)]
- test: Update Makefile and docker-compose to align it with Jenkinsfile [valentinab25 - [`0aa0de3`](https://github.com/eea/volto-widget-theme-picker/commit/0aa0de382baa92e95dd857fe7b20bec01b0ded96)]
- Add Sonarqube tag using freshwater-frontend addons list [EEA Jenkins - [`662bf56`](https://github.com/eea/volto-widget-theme-picker/commit/662bf56d7da28dd685fcd1689f2f3744aa39504c)]
### [1.1.2](https://github.com/eea/volto-widget-theme-picker/compare/1.1.1...1.1.2) - 24 July 2023

#### :hammer_and_wrench: Others

- Add Sonarqube tag using climate-energy-frontend addons list [EEA Jenkins - [`76390e9`](https://github.com/eea/volto-widget-theme-picker/commit/76390e9e50474297312c34e51b66209b0febfae1)]
### [1.1.1](https://github.com/eea/volto-widget-theme-picker/compare/1.1.0...1.1.1) - 12 June 2023

#### :hammer_and_wrench: Others

- test: jest should look for addons in node_modules Refs #253277 [valentinab25 - [`e1ce5b5`](https://github.com/eea/volto-widget-theme-picker/commit/e1ce5b55affe732c5637ee1e092fd304b8ee752e)]
- test: Add unit tests for ThemePicker - refs #253277 [ana-oprea - [`af101a9`](https://github.com/eea/volto-widget-theme-picker/commit/af101a9151b86078a5d6e1f37656ac1f56446f03)]
- test: Fix test config, coverage Refs #253277 [valentinab25 - [`3ff76f4`](https://github.com/eea/volto-widget-theme-picker/commit/3ff76f4002645a834c5d45c2bbb0683716cba2e4)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`855f029`](https://github.com/eea/volto-widget-theme-picker/commit/855f0291af4cc38ecfbbee70ffa0a799b82bda6d)]
- Add Sonarqube tag using industry-frontend addons list [EEA Jenkins - [`6bcac86`](https://github.com/eea/volto-widget-theme-picker/commit/6bcac86da76ad9e42bf99db93459be408bd48f52)]
### [1.1.0](https://github.com/eea/volto-widget-theme-picker/compare/1.0.3...1.1.0) - 27 March 2023

#### :hammer_and_wrench: Others

- Add Sonarqube tag using marine-frontend addons list [EEA Jenkins - [`33b090c`](https://github.com/eea/volto-widget-theme-picker/commit/33b090c443f5e4e5dbebf0c5946865fcad006584)]
- Add Sonarqube tag using circularity-frontend addons list [EEA Jenkins - [`b647ad7`](https://github.com/eea/volto-widget-theme-picker/commit/b647ad7fd68de0f700fe7f1af02f294990d48db7)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`8c07ffe`](https://github.com/eea/volto-widget-theme-picker/commit/8c07ffe86318c85ba97d5cb0a8ae7b8072cc59b5)]
- Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`405feb5`](https://github.com/eea/volto-widget-theme-picker/commit/405feb55714d982adc0c6ba4df4db388291835f2)]
- Add Sonarqube tag using forests-frontend addons list [EEA Jenkins - [`23d2411`](https://github.com/eea/volto-widget-theme-picker/commit/23d2411fc2fbf7bc5e4505fc05f934f0e9b4744b)]
- Add Sonarqube tag using advisory-board-frontend addons list [EEA Jenkins - [`43e5107`](https://github.com/eea/volto-widget-theme-picker/commit/43e51073f63b0b911bd030c5cd03965ce4ffded1)]
- Add Sonarqube tag using clms-frontend addons list [EEA Jenkins - [`b064246`](https://github.com/eea/volto-widget-theme-picker/commit/b064246f48be642af450b2d1d3db17acf57490da)]
- Add Sonarqube tag using demo-kitkat-frontend addons list [EEA Jenkins - [`8667727`](https://github.com/eea/volto-widget-theme-picker/commit/8667727f125b2fdd57b938bfa082313afcfc2cc7)]
- Add Sonarqube tag using ims-frontend addons list [EEA Jenkins - [`bf4a677`](https://github.com/eea/volto-widget-theme-picker/commit/bf4a67766c52b5d5d52f0e5c14556c4ec0b30938)]
- Add Sonarqube tag using bise-frontend addons list [EEA Jenkins - [`9ccf553`](https://github.com/eea/volto-widget-theme-picker/commit/9ccf553f23ab84ad52ab9b1c28138ddda45ec081)]
### [1.0.3](https://github.com/eea/volto-widget-theme-picker/compare/1.0.2...1.0.3) - 8 February 2023

#### :hammer_and_wrench: Others

- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`de3314a`](https://github.com/eea/volto-widget-theme-picker/commit/de3314a716dae4d38cac81f4fa6733d904712d07)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`c576cc7`](https://github.com/eea/volto-widget-theme-picker/commit/c576cc79bc481cf67c6b592e4baea6477d07e5ae)]
- Add Sonarqube tag using eea-website-frontend addons list [EEA Jenkins - [`19d97ad`](https://github.com/eea/volto-widget-theme-picker/commit/19d97ad979ea739f001159765ea529bf647ab022)]
- back to no theme / undefined [andreiggr - [`e046c5f`](https://github.com/eea/volto-widget-theme-picker/commit/e046c5fb332180a4dd43d07512284c6be8d8a0ed)]
### [1.0.2](https://github.com/eea/volto-widget-theme-picker/compare/1.0.1...1.0.2) - 3 February 2023

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG VOLTO_VERSION
FROM plone/frontend-builder:${VOLTO_VERSION}
FROM eeacms/frontend-builder:${VOLTO_VERSION}

ARG ADDON_NAME
ARG ADDON_PATH
Expand Down
Loading

0 comments on commit b2687b5

Please sign in to comment.