Skip to content

Commit e2bad70

Browse files
authored
Merge pull request #88 from eea/develop
Release 8.0.0 - Volto 17 support
2 parents f988efb + 4bef5ac commit e2bad70

14 files changed

+329
-120
lines changed

.env

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Jest configuration variables
2+
# - possible values: ON, OFF
3+
JEST_USE_SETUP=OFF

.eslintrc.js

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
const projectRootPath = fs.realpathSync(__dirname + '/../../../');
4+
5+
let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
6+
let configFile;
7+
if (fs.existsSync(`${projectRootPath}/tsconfig.json`))
8+
configFile = `${projectRootPath}/tsconfig.json`;
9+
else if (fs.existsSync(`${projectRootPath}/jsconfig.json`))
10+
configFile = `${projectRootPath}/jsconfig.json`;
11+
12+
if (configFile) {
13+
const jsConfig = require(configFile).compilerOptions;
14+
const pathsConfig = jsConfig.paths;
15+
if (pathsConfig['@plone/volto'])
16+
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig['@plone/volto'][0]}`;
17+
}
18+
19+
const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
20+
const reg = new AddonConfigurationRegistry(projectRootPath);
21+
22+
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
23+
const addonAliases = Object.keys(reg.packages).map((o) => [
24+
o,
25+
reg.packages[o].modulePath,
26+
]);
27+
28+
const addonExtenders = reg.getEslintExtenders().map((m) => require(m));
29+
30+
const defaultConfig = {
31+
extends: `${voltoPath}/.eslintrc`,
32+
settings: {
33+
'import/resolver': {
34+
alias: {
35+
map: [
36+
['@plone/volto', '@plone/volto/src'],
37+
['@plone/volto-slate', '@plone/volto/packages/volto-slate/src'],
38+
...addonAliases,
39+
['@package', `${__dirname}/src`],
40+
['@root', `${__dirname}/src`],
41+
['~', `${__dirname}/src`],
42+
],
43+
extensions: ['.js', '.jsx', '.json'],
44+
},
45+
'babel-plugin-root-import': {
46+
rootPathSuffix: 'src',
47+
},
48+
},
49+
},
50+
rules: {
51+
'react/jsx-no-target-blank': [
52+
'error',
53+
{
54+
allowReferrer: true,
55+
},
56+
],
57+
}
58+
};
59+
60+
const config = addonExtenders.reduce(
61+
(acc, extender) => extender.modify(acc),
62+
defaultConfig,
63+
);
64+
65+
module.exports = config;

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.vscode/
22
.history
3-
.eslintrc.js
43
.nyc_output
54
project
65
coverage

.project.eslintrc.js

-48
This file was deleted.

CHANGELOG.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d
44

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

7-
### [7.5.1](https://github.com/eea/volto-tabs-block/compare/7.5.0...7.5.1) - 27 March 2024
7+
### [8.0.0](https://github.com/eea/volto-tabs-block/compare/7.5.1...8.0.0) - 22 April 2024
8+
9+
#### :rocket: New Features
10+
11+
- feat: Release 8.0.0 - Volto 17 support [alin - [`57dd000`](https://github.com/eea/volto-tabs-block/commit/57dd0008921899688a6175c9fb00588593a7b307)]
12+
- feat: Volto 17 support - refs #264527 [EEA Jenkins - [`80b384c`](https://github.com/eea/volto-tabs-block/commit/80b384ca871dd2578b1cd0c0bf3e238d0289b977)]
13+
14+
#### :hammer_and_wrench: Others
15+
16+
### [7.5.1](https://github.com/eea/volto-tabs-block/compare/7.5.0...7.5.1) - 28 March 2024
817

918
#### :nail_care: Enhancements
1019

0 commit comments

Comments
 (0)