Skip to content

Commit

Permalink
Merge pull request #28 from eea/develop
Browse files Browse the repository at this point in the history
Release 1.0.0 - Volto 17 support
  • Loading branch information
avoinea authored Apr 22, 2024
2 parents 1ec4a0c + 1c69e61 commit 73a46a9
Show file tree
Hide file tree
Showing 13 changed files with 325 additions and 117 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.

10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ 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.0.0](https://github.com/eea/volto-slate-label/compare/0.6.0...1.0.0) - 22 April 2024

#### :rocket: New Features

- feat: Release 1.0.0 - Volto 17 support [alin - [`c8b0bed`](https://github.com/eea/volto-slate-label/commit/c8b0bed2ee886a2ab999f6f7b539470733b1698d)]
- feat: Add Volto 17 support - refs #264527 [EEA Jenkins - [`ce879b2`](https://github.com/eea/volto-slate-label/commit/ce879b2df82ee090a47081d29f49b39d33bdd859)]

#### :hammer_and_wrench: Others

### [0.6.0](https://github.com/eea/volto-slate-label/compare/0.5.9...0.6.0) - 19 February 2024

#### :rocket: New Features

- feat(slate-label): Allow tooltip to open by focus or click #263484 #26 from eea/develop [ichim-david - [`1ec4a0c`](https://github.com/eea/volto-slate-label/commit/1ec4a0cf6b920cbcf31f4c94d8fd8276aaa27374)]
- feat(label): added option to show label on hover or click #25 from eea/263484-label-hover [ichim-david - [`6a0dc07`](https://github.com/eea/volto-slate-label/commit/6a0dc07fcf0aec0202719e605f3fba281cd2a164)]
- feat: add logic to toggle tooltip message on hover [hazigabriel - [`572a890`](https://github.com/eea/volto-slate-label/commit/572a8906effe3d757e1733579a8c29a9b0bcd13f)]

Expand Down
Loading

0 comments on commit 73a46a9

Please sign in to comment.