Skip to content

Commit

Permalink
Merge branch 'main' into BetterContentMetadataTags
Browse files Browse the repository at this point in the history
* main: (49 commits)
  Update to Plone 6.0.11 (#5989)
  Defines the last 4 parameters of the `asyncConnect` function with optional (#5986)
  Flexibilize the pins for all ESlint deps, in Volto and generators (#5991)
  Release 18.0.0-alpha.29
  Release @plone/types 1.0.0-alpha.11
  fix: pass down locale to IntlProvider (#5976)
  Add Vite (client only, no SSR) build. Update Next.js 14.2.2 and Remix to 2.8.0 (#5970)
  Fix no router link in logo (#5981)
  Improve postinstall script, building all the deps (#5980)
  Better BlocksData types (#5979)
  Add missing types ts fields
  Release 18.0.0-alpha.28
  Release @plone/slate 18.0.0-alpha.12
  Release @plone/registry 1.5.6
  Improvements to the monorepo setup with utilities, especially ESLint.… (#5969)
  DEV: put nvm installation section into a separate include file (#5968)
  Bundle optimization (#5295)
  [client] Move provider to own package - Use parcel - `@plone/providers` (#5887)
  Fix flaky test 'As editor I can add links' by using getSlateEditorAndType (#5966)
  Fix rendering if ConditionalLink has no children (#5963)
  ...
  • Loading branch information
sneridagh committed Apr 29, 2024
2 parents 7d6bc1d + 466a358 commit 644b358
Show file tree
Hide file tree
Showing 347 changed files with 9,660 additions and 8,642 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,18 @@ const config = {
files: ['**/*.ts', '**/*.tsx'],
plugins: ['@typescript-eslint', 'import'],
extends: [
'plugin:react/recommended',
// 'plugin:@typescript-eslint/eslint-recommended',
// 'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
// 'plugin:import/recommended',
'plugin:import/typescript',
'plugin:prettier/recommended',
'plugin:react/jsx-runtime',
// 'plugin:react/jsx-runtime', // We only want this for non-library code (eg. volto add-ons)
// 'plugin:storybook/recommended',
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
files: ['**/*.js', '**/*.jsx'],
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve Volto
title: ''
labels: '01 type: bug'
labels: ['01 type: bug', 'needs: triage']
assignees: ''
---

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -968,9 +968,6 @@ jobs:

- run: pnpm i

- name: Build packages
run: pnpm build:registry

- name: Install Cypress if not in cache
if: steps.cache-cypress-binary.outputs.cache-hit != 'true'
working-directory: packages/volto
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ jobs:
- 'packages/components/**'
types:
- 'packages/types/**'
providers:
- 'packages/providers/**'
generator:
- 'packages/generator-volto/**'
scripts:
Expand Down Expand Up @@ -86,6 +88,14 @@ jobs:
env:
BASE_BRANCH: ${{ github.base_ref }}

- name: Providers changelog check
if: steps.filter.outputs.providers == 'true'
run: |
git fetch --no-tags origin main
towncrier check --compare-with origin/main --dir packages/providers
env:
BASE_BRANCH: ${{ github.base_ref }}

- name: Generator changelog check
if: steps.filter.outputs.generator == 'true'
run: |
Expand Down
25 changes: 10 additions & 15 deletions .github/workflows/deployment_tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Deployment Tests
on: [push, pull_request]

env:
node-version: 20.x

jobs:
vitessr:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
Expand All @@ -12,10 +16,10 @@ jobs:
- uses: actions/checkout@v4

# node setup
- name: Use Node.js 20.x
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: ${{ env.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
Expand All @@ -41,9 +45,6 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build packages
run: pnpm build:deps && pnpm build:components

- name: Start backend
run: make start-backend-docker-detached

Expand Down Expand Up @@ -79,10 +80,10 @@ jobs:
- uses: actions/checkout@v4

# node setup
- name: Use Node.js 20.x
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: ${{ env.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
Expand All @@ -108,9 +109,6 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build packages
run: pnpm build:deps && pnpm build:components

- name: Start backend
run: make start-backend-docker-detached

Expand Down Expand Up @@ -146,10 +144,10 @@ jobs:
- uses: actions/checkout@v4

# node setup
- name: Use Node.js 20.x
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: ${{ env.node-version }}

- uses: pnpm/action-setup@v3
name: Install pnpm
Expand All @@ -175,9 +173,6 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build packages
run: pnpm build:deps && pnpm build:components

- name: Start backend
run: make start-backend-docker-detached

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/readme-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
- name: Check links in README.md with awesome_bot
run: |
gem install awesome_bot
awesome_bot --request-delay 1 --allow-dupe --white-list http://localhost:8080/Plone,http://localhost:3000,https://github.com/kitconcept/volto-blocks-grid.git,https://my-server-DNS-name.tld/api --files PACKAGES.md,README.md,packages/blocks/README.md,packages/client/README.md,packages/components/README.md,packages/generator-volto/README.md,packages/parcel-optimizer-react-client/README.md,packages/registry/README.md,packages/scripts/README.md,packages/tsconfig/README.md,packages/types/README.md,packages/volto-slate/README.md,apps/nextjs/README.md,apps/remix/README.md,apps/vite-ssr/README.md
awesome_bot --request-delay 1 --allow-dupe --white-list http://localhost:8080/Plone,http://localhost:3000,https://github.com/kitconcept/volto-blocks-grid.git,https://my-server-DNS-name.tld/api --files PACKAGES.md,README.md,packages/blocks/README.md,packages/client/README.md,packages/components/README.md,packages/generator-volto/README.md,packages/registry/README.md,packages/scripts/README.md,packages/tsconfig/README.md,packages/types/README.md,packages/volto-slate/README.md,apps/nextjs/README.md,apps/remix/README.md,apps/vite-ssr/README.md
6 changes: 6 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=*prettier*
public-hoist-pattern[]=*stylelint*
public-hoist-pattern[]=*cypress*
public-hoist-pattern[]=*process*
public-hoist-pattern[]=*parcel*
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ styles/rules/*
node_modules
packages/volto/types/*
storybook-static
app/vite-ssr/src/routeTree.gen.ts
apps/vite-ssr/src/routeTree.gen.ts
apps/vite/src/routeTree.gen.ts
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ clean:
setup:
# Setup ESlint for VSCode
node packages/scripts/vscodesettings.js
pnpm build:all

##### Documentation

Expand Down
1 change: 0 additions & 1 deletion PACKAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ Some of them are released:
Some of them are used by the build, and separated in packages for convenience.

- `tsconfig`
- `parcel-optimizer-react-client`


## Volto add-ons packages
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ To ensure your website gets the greatest exposure, add it both to [Awesome Volto
- [Comune di Vernio](https://www.comune.vernio.po.it/) (Website of the Municipality of Vernio. Developed by [RedTurtle](https://www.redturtle.it), 2021)
- [Debabarreneko mankomunitatea](https://debabarrena.eus/eu) (Website of the Commonwealth of Debabarrena, community of municipalities to centralize waste handling services, developed by [CodeSyntax](https://www.codesyntax.com/en), 2022)
- [Debako Udala / Ayuntamiento de Deba](https://www.deba.eus/eu) (Website of the municipality of Deba, developed by [CodeSyntax](https://www.codesyntax.com/en), 2022)
- [EEA-IMSv4](https://www.eea.europa.eu/en/analysis/indicators) (EEA Indicator Management System v4. Developed by [Eau de web](https://eaudeweb.ro) for the European Environmental Agency, 2021)
- [European Environment Agency](https://www.eea.europa.eu/en) (Website of the European Environment Agency. Developed by [Eau de Web](https://eaudeweb.ro), 2023)
- [Energy Climate Union portal for Europe](https://climate-energy.eea.europa.eu/) (Thematic website focusing on European strides towards mitigating climate change, developed by [Eau de Web](https://eaudeweb.ro/), 2020)
- [Excellence at Humboldt-Universität zu Berlin](https://www.alles-beginnt-mit-einer-frage.de) (Website for the excellence initiative of the [Humboldt University Berlin](https://www.hu-berlin.de/de), developed by [kitconcept GmbH](https://kitconcept.com), 2019)
- [Forest Information System for Europe](https://forest.eea.europa.eu) (Thematic website focusing on European forests, developed by [Eau de Web](https://eaudeweb.ro/), 2019)
Expand Down Expand Up @@ -155,8 +155,7 @@ You should check the dependencies in their `package.json` for more details.
- [Freshwater Information System for Europe](https://github.com/eea/freshwater-frontend) - Volto project for [Freshwater Information System for Europe website](https://water.europa.eu/freshwater)
- [European Industrial Emissions Portal](https://github.com/eea/industry-frontend ) - Volto project for [European Industrial Emissions Portal website](https://industry.eea.europa.eu)
- [Biodiversity Information System for Europe](https://github.com/eea/bise-frontend) - Volto project for [Biodiversity Information System for Europe website](https://biodiversity.europa.eu)
- [Sustainability transitions, EEA-Eionet platform](https://github.com/eea/sustainability-frontend) - Volto project for [Sustainability transitions, EEA-Eionet platform website](https://sustainability.eionet.europa.eu)
- [EEA Indicator Management System](https://github.com/eea/ims-frontend) - Volto project for [EEA Indicator Management System site](https://www.eea.europa.eu/en/analysis/indicators)
- [EEA Main Website frontend](https://github.com/eea/eea-website-frontend) - Volto project for [European Environment Agency](https://www.eea.europa.eu/en)
- [Climate and energy in the EU](https://github.com/eea/climate-energy-frontend) - Volto project for [Climate and energy in the EU website](https://climate-energy.eea.europa.eu)
- [volto-bise](https://github.com/eea/volto-bise) - A Volto project packaged as an addon. It provides Theming using a razzle.extend.js provided alias.
- [design-volto-theme](https://github.com/RedTurtle/design-volto-theme) Volto theme for Italian Public Administration
Expand All @@ -166,5 +165,8 @@ You should check the dependencies in their `package.json` for more details.
- [plone.org.br](https://github.com/plonegovbr/plone.org.br) - Volto project for the [Brazilian Plone Community](https://plone.org.br)
- [nsw-design-system-plone6-kit](https://github.com/pretagov/nsw-design-system-plone6-kit) - NSW Design System Plone 6 Kit Volto project for [NSW.gov.au sites](https://digitalnsw.pretagov.com.au/)
- [volto-centraalmuseum-theme](https://github.com/intk/volto-centraalmuseum-theme) - Volto project for the [Centraal Museum & Rietveld](https://www.centraalmuseum.nl/nl) made for [INTK](https://www.intk.com/en).
- [volto-eea-design-system](https://github.com/eea/volto-eea-design-system) - EEA Design System Plone 6 Kit Volto project for [European Environment Agency web sites](https://eea.github.io/volto-eea-design-system/)
- [volto-eea-website-theme](https://github.com/eea/volto-eea-website-theme) - EEA Plone 6 Volto Theme for [European Environment Agency web sites](https://www.eea.europa.eu/en)
- [volto-eea-kitkat](https://github.com/eea/volto-eea-kitkat) - A known good set of Volto add-ons to be used within all EEA projects and beyond, made for [European Environment Agency](https://www.eea.europa.eu/en)
- [volto-rietveldschroderhuis-theme](https://github.com/intk/volto-rietveldschroderhuis-theme) - Volto project for the [Rietveld Schröder House](https://www.rietveldschroderhuis.nl/en) made for [INTK](https://www.intk.com/en).
- [volto-zeeuwsmuseum-theme](https://github.com/intk/volto-zeeuwsmuseum-theme) - Volto project for the [Zeeuws Museum](https://www.zeeuwsmuseum.nl/en) made for [INTK](https://www.intk.com/en).
2 changes: 1 addition & 1 deletion api/buildout.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[buildout]
index = https://pypi.org/simple/
extends =
http://dist.plone.org/release/6.0.10.1/versions.cfg
http://dist.plone.org/release/6.0.11/versions.cfg
version-constraints.cfg
versions.cfg
parts = instance plonesite site-packages test robot-server
Expand Down
10 changes: 6 additions & 4 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@
"lint": "next lint"
},
"dependencies": {
"@plone/blocks": "workspace: *",
"@plone/client": "workspace: *",
"@plone/components": "workspace: *",
"@plone/registry": "workspace: *",
"@plone/providers": "workspace: *",
"@tanstack/react-query": "^5.24.6",
"@tanstack/react-query-devtools": "^5.24.6",
"next": "14.1.1",
"next": "14.2.2",
"react": "^18",
"react-aria-components": "^1.1.1",
"react-dom": "^18"
Expand All @@ -24,8 +27,7 @@
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.1.1",
"mrs-developer": "^2.1.1",
"typescript": "5.2.2"
"eslint-config-next": "14.2.2",
"typescript": "^5.4.5"
}
}
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React from 'react';
import { useRouter } from 'next/navigation';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { PloneClientProvider } from '@plone/client/provider';
import { PloneClientProvider } from '@plone/providers';
import PloneClient from '@plone/client';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';
import { RouterProvider } from 'react-aria-components';
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useQuery } from '@tanstack/react-query';
import { usePathname } from 'next/navigation';
import Link from 'next/link';
import { flattenToAppURL } from './utils';
import { usePloneClient } from '@plone/client/provider';
import { usePloneClient } from '@plone/providers';
import { Breadcrumbs } from '@plone/components';
import '@plone/components/dist/basic.css';

Expand Down
2 changes: 1 addition & 1 deletion apps/plone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"dependency-graph": "0.10.0",
"detect-browser": "5.1.0",
"diff": "3.5.0",
"express": "4.17.3",
"express": "4.19.2",
"filesize": "6",
"github-slugger": "1.4.0",
"history": "4.10.1",
Expand Down
4 changes: 2 additions & 2 deletions apps/remix/app/entry.server.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { PassThrough } from 'node:stream';
import type { AppLoadContext, EntryContext } from '@remix-run/node';
import { createReadableStreamFromReadable } from '@remix-run/node';
import { RemixServer } from '@remix-run/react';
import isbot from 'isbot';
import { isbot } from 'isbot';
import { renderToPipeableStream } from 'react-dom/server';

const ABORT_DELAY = 5_000;
Expand All @@ -24,7 +24,7 @@ export default function handleRequest(
// eslint-disable-next-line @typescript-eslint/no-unused-vars
loadContext: AppLoadContext,
) {
return isbot(request.headers.get('user-agent'))
return isbot(request.headers.get('user-agent') || '')
? handleBotRequest(
request,
responseStatusCode,
Expand Down
2 changes: 1 addition & 1 deletion apps/remix/app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from '@remix-run/react';
import { useState } from 'react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { PloneClientProvider } from '@plone/client/provider';
import { PloneClientProvider } from '@plone/providers';
import PloneClient from '@plone/client';
import { ReactQueryDevtools } from '@tanstack/react-query-devtools';

Expand Down
3 changes: 2 additions & 1 deletion apps/remix/app/routes/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import ploneClient from '@plone/client';
import { flattenToAppURL } from '../utils';
import { useLoaderData, useLocation } from '@remix-run/react';
import { usePloneClient } from '@plone/client/provider';
import { usePloneClient } from '@plone/providers';

export const meta: MetaFunction = () => {
return [
Expand All @@ -34,6 +34,7 @@ export const loader = async ({ params, request }: LoaderFunctionArgs) => {
},
},
});

const cli = ploneClient.initialize({
apiPath: 'http://localhost:8080/Plone',
});
Expand Down
28 changes: 12 additions & 16 deletions apps/remix/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,32 @@
"sideEffects": false,
"type": "module",
"scripts": {
"build": "remix build",
"dev": "remix dev --manual",
"build": "remix vite:build",
"dev": "remix vite:dev",
"lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
"start:prod": "remix-serve ./build/index.js",
"start:prod": "remix-serve ./build/server/index.js",
"typecheck": "tsc"
},
"dependencies": {
"@plone/client": "workspace: *",
"@plone/providers": "workspace: *",
"@remix-run/css-bundle": "^2.4.0",
"@remix-run/node": "^2.4.0",
"@remix-run/react": "^2.4.0",
"@remix-run/serve": "^2.4.0",
"@remix-run/node": "^2.8.1",
"@remix-run/react": "^2.8.1",
"@remix-run/serve": "^2.8.1",
"@tanstack/react-query": "^5.24.6",
"@tanstack/react-query-devtools": "^5.24.6",
"isbot": "^3.6.8",
"isbot": "^4.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@remix-run/dev": "^2.4.0",
"@remix-run/dev": "^2.8.1",
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"eslint": "^8.38.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"typescript": "^5.2.2"
"typescript": "^5.4.2",
"vite": "^5.1.0",
"vite-tsconfig-paths": "^4.2.1"
},
"engines": {
"node": ">=18.0.0"
Expand Down
14 changes: 12 additions & 2 deletions apps/remix/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,32 @@
{
"include": ["remix.env.d.ts", "**/*.ts", "**/*.tsx"],
"include": [
"**/*.ts",
"**/*.tsx",
"**/.server/**/*.ts",
"**/.server/**/*.tsx",
"**/.client/**/*.ts",
"**/.client/**/*.tsx"
],
"compilerOptions": {
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"types": ["@remix-run/node", "vite/client"],
"isolatedModules": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"module": "ESNext",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"target": "ES2022",
"strict": true,
"allowJs": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"baseUrl": ".",
"paths": {
"~/*": ["./app/*"]
},

// Remix takes care of building everything in `remix build`.
// Vite takes care of building everything, not tsc.
"noEmit": true
}
}
Loading

0 comments on commit 644b358

Please sign in to comment.