Skip to content

Commit 44595fd

Browse files
authored
Merge pull request #28 from eea/develop
Release
2 parents ff24391 + cd475fe commit 44595fd

26 files changed

+948
-326
lines changed

.env

Lines changed: 3 additions & 0 deletions
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

Lines changed: 65 additions & 0 deletions
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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 0 additions & 47 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,21 @@ 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-
### [4.0.0](https://github.com/eea/volto-block-toc/compare/3.0.8...4.0.0) - 4 April 2024
7+
### [5.0.0](https://github.com/eea/volto-block-toc/compare/4.0.0...5.0.0) - 17 April 2024
8+
9+
#### :rocket: New Features
10+
11+
- feat: Add Volto 17 support - refs #264527 [EEA Jenkins - [`2f00257`](https://github.com/eea/volto-block-toc/commit/2f00257c3aa71f6c848f88611f8cd9bf36462c46)]
12+
13+
#### :house: Internal changes
14+
15+
- style: lint [alin - [`fd24707`](https://github.com/eea/volto-block-toc/commit/fd2470718ceff2c9429624a9c109c55f778759c9)]
16+
17+
#### :hammer_and_wrench: Others
18+
19+
- bump version [Teodor - [`ae32725`](https://github.com/eea/volto-block-toc/commit/ae32725a801c93b6ab89ef316a4021fb43400c9f)]
20+
- fix to work with Volto 16 [Teodor - [`77ebacf`](https://github.com/eea/volto-block-toc/commit/77ebacf647e283e05195dfd37ebc46a295f017cd)]
21+
## [4.0.0](https://github.com/eea/volto-block-toc/compare/3.0.8...4.0.0) - 4 April 2024
822

923
#### :hammer_and_wrench: Others
1024

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22
ARG VOLTO_VERSION
3-
FROM plone/frontend-builder:${VOLTO_VERSION}
3+
FROM eeacms/frontend-builder:${VOLTO_VERSION}
44

55
ARG ADDON_NAME
66
ARG ADDON_PATH

0 commit comments

Comments
 (0)