Skip to content

Commit

Permalink
Merge pull request #50 from eea/develop
Browse files Browse the repository at this point in the history
Release 7.0.0 - Volto 17 support
  • Loading branch information
avoinea committed Apr 22, 2024
2 parents dc6796d + 56c4495 commit 63832fc
Show file tree
Hide file tree
Showing 19 changed files with 347 additions and 197 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.

12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,21 @@ 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).

### [6.4.0](https://github.com/eea/volto-group-block/compare/6.3.5...6.4.0) - 17 January 2024
### [7.0.0](https://github.com/eea/volto-group-block/compare/6.4.0...7.0.0) - 22 April 2024

#### :rocket: New Features

- feat: wrap section with id and classname if defined in data [Razvan - [`1a08457`](https://github.com/eea/volto-group-block/commit/1a08457db3a5a17bc10d1a2887cd85f9c92faf9a)]
- feat: Release 7.0.0 - Volto 17 support [alin - [`a490088`](https://github.com/eea/volto-group-block/commit/a490088c35a61537939da0050f52cf7720ab91c2)]
- feat: Volto 17 support - refs #264527 [EEA Jenkins - [`9526f06`](https://github.com/eea/volto-group-block/commit/9526f063779a64ecd8af189494a1dde4d7d506b1)]

#### :hammer_and_wrench: Others

- Release 6.4.0 [Alin Voinea - [`2ebb40f`](https://github.com/eea/volto-group-block/commit/2ebb40f20fb99806602772d44bfb1fd3f90115c4)]
### [6.4.0](https://github.com/eea/volto-group-block/compare/6.3.5...6.4.0) - 17 January 2024

#### :rocket: New Features

- feat: wrap section with id and classname if defined in data [Razvan - [`1a08457`](https://github.com/eea/volto-group-block/commit/1a08457db3a5a17bc10d1a2887cd85f9c92faf9a)]

### [6.3.5](https://github.com/eea/volto-group-block/compare/6.3.4...6.3.5) - 24 November 2023

#### :bug: Bug Fixes
Expand Down

0 comments on commit 63832fc

Please sign in to comment.