Skip to content

Commit

Permalink
Merge pull request #5 from kitconcept/update18.8.2
Browse files Browse the repository at this point in the history
Update to 18.8.2
  • Loading branch information
sneridagh authored Feb 10, 2025
2 parents 71ee053 + 55f9fb9 commit 8cff727
Show file tree
Hide file tree
Showing 16 changed files with 5,998 additions and 5,278 deletions.
32 changes: 24 additions & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
const fs = require('fs');
const projectRootPath = __dirname;
const AddonConfigurationRegistry = require('@plone/registry/src/addon-registry');
const { AddonRegistry } = require('@plone/registry/addon-registry');

let coreLocation;
if (fs.existsSync(`${projectRootPath}/core`))
coreLocation = `${projectRootPath}/core`;
else if (fs.existsSync(`${projectRootPath}/../../core`))
coreLocation = `${projectRootPath}/../../core`;

const registry = new AddonConfigurationRegistry(
`${coreLocation}/packages/volto`,
);
const { registry } = AddonRegistry.init(`${coreLocation}/packages/volto`);

// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
const addonAliases = Object.keys(registry.packages).map((o) => [
Expand All @@ -22,6 +20,27 @@ module.exports = {
extends: `${coreLocation}/packages/volto/.eslintrc`,
rules: {
'import/no-unresolved': 1,
'import/named': 'error',
'react/jsx-filename-extension': [1, { extensions: ['.tsx', '.jsx'] }],
'no-restricted-imports': [
'error',
{
name: '@plone/volto/components',
message:
'Importing from barrel files is not allowed. Please use direct imports of the modules instead.',
},
{
name: '@plone/volto/helpers',
message:
'Importing from barrel files is not allowed. Please use direct imports of the modules instead.',
},
{
name: '@plone/volto/actions',
message:
'Importing from barrel files is not allowed. Please use direct imports of the modules instead.',
},
],
'react/jsx-key': [2, { checkFragmentShorthand: true }],
},
settings: {
'import/resolver': {
Expand All @@ -30,10 +49,7 @@ module.exports = {
['@plone/volto', `${coreLocation}/packages/volto/src`],
['@plone/volto-slate', `${coreLocation}/packages/volto-slate/src`],
['@plone/registry', `${coreLocation}/packages/registry/src`],
[
'@kitconcept/volto-iframe-block',
'./packages/volto-iframe-block/src',
],
['@kitconcept/volto-light-theme', './packages/volto-light-theme/src'],
...addonAliases,
],
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- ".github/workflows/acceptance.yml"

env:
NODE_VERSION: 20.x
NODE_VERSION: 22.x
CYPRESS_RETRIES: 2

jobs:
Expand All @@ -26,7 +26,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}

- name: Enable corepack
run: corepack enable
run: npm i -g corepack@latest && corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

env:
NODE_VERSION: 20.x
NODE_VERSION: 22.x
ADDON_NAME: volto-iframe-block

jobs:
Expand All @@ -27,7 +27,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}

- name: Enable corepack
run: corepack enable
run: npm i -g corepack@latest && corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- ".github/workflows/code.yml"

env:
NODE_VERSION: 20.x
NODE_VERSION: 22.x

jobs:
codeanalysis:
Expand All @@ -25,7 +25,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}

- name: Enable corepack
run: corepack enable
run: npm i -g corepack@latest && corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- ".github/workflows/i18n.yml"

env:
NODE_VERSION: 20.x
NODE_VERSION: 22.x

jobs:
unit:
Expand All @@ -25,7 +25,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}

- name: Enable corepack
run: corepack enable
run: npm i -g corepack@latest && corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- ".github/workflows/storybook.yml"

env:
NODE_VERSION: 20.x
NODE_VERSION: 22.x

permissions:
contents: write
Expand All @@ -27,7 +27,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}

- name: Enable corepack
run: corepack enable
run: npm i -g corepack@latest && corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- ".github/workflows/unit.yml"

env:
NODE_VERSION: 20.x
NODE_VERSION: 22.x

jobs:
unit:
Expand All @@ -25,7 +25,7 @@ jobs:
node-version: ${{ env.NODE_VERSION }}

- name: Enable corepack
run: corepack enable
run: npm i -g corepack@latest && corepack enable

- name: Get pnpm store directory
shell: bash
Expand Down
27 changes: 0 additions & 27 deletions .pre-commit-config.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ module.exports = {
[],
defaultRazzleOptions,
);
const AddonConfigurationRegistry = require('@plone/registry/src/addon-registry');
const { AddonRegistry } = require('@plone/registry/addon-registry');

const registry = new AddonConfigurationRegistry(projectRootPath);
const { registry } = AddonRegistry.init(projectRootPath);

config = lessPlugin({ registry }).modifyWebpackConfig({
env: { target: 'web', dev: 'dev' },
Expand Down
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ RESET=`tput sgr0`
YELLOW=`tput setaf 3`

GIT_FOLDER=$(CURRENT_DIR)/.git
PRE_COMMIT=pipx run --spec 'pre-commit==3.7.1' pre-commit

PLONE_VERSION=6
DOCKER_IMAGE=plone/server-dev:${PLONE_VERSION}
Expand All @@ -37,7 +36,6 @@ help: ## Show this help
.PHONY: install
install: ## Installs the add-on in a development environment
@echo "$(GREEN)Install$(RESET)"
if [ -d $(GIT_FOLDER) ]; then $(PRE_COMMIT) install; else echo "$(RED) Not installing pre-commit$(RESET)";fi
pnpm dlx mrs-developer missdev --no-config --fetch-https
pnpm i
make build-deps
Expand Down
2 changes: 1 addition & 1 deletion mrs.developer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"package": "@plone/volto",
"url": "git@github.com:plone/volto.git",
"https": "https://github.com/plone/volto.git",
"tag": "18.0.0-alpha.40"
"tag": "18.8.2"
}
}
1 change: 1 addition & 0 deletions packages/volto-iframe-block/news/5.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update to latest Volto. @sneridagh
3 changes: 2 additions & 1 deletion packages/volto-iframe-block/src/components/Data.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { BlockDataForm, Icon } from '@plone/volto/components';
import Icon from '@plone/volto/components/theme/Icon/Icon';
import BlockDataForm from '@plone/volto/components/manage/Form/BlockDataForm';
import { defineMessages } from 'react-intl';
import { IframeBlockSchema } from './schema';

Expand Down
3 changes: 2 additions & 1 deletion packages/volto-iframe-block/src/components/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { toast } from 'react-toastify';
import Toast from '@plone/volto/components/manage/Toast/Toast';

import { defineMessages } from 'react-intl';
import { Icon, SidebarPortal } from '@plone/volto/components';
import Icon from '@plone/volto/components/theme/Icon/Icon';
import SidebarPortal from '@plone/volto/components/manage/Sidebar/SidebarPortal';
import clearSVG from '@plone/volto/icons/clear.svg';
import aheadSVG from '@plone/volto/icons/ahead.svg';
import applicationSVG from '@plone/volto/icons/application.svg';
Expand Down
Loading

0 comments on commit 8cff727

Please sign in to comment.