Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/plone/volto
Browse files Browse the repository at this point in the history
  • Loading branch information
dobri1408 committed May 8, 2024
2 parents 2ca3d1e + 9e4f05f commit b6a3556
Show file tree
Hide file tree
Showing 362 changed files with 9,330 additions and 12,285 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
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
5 changes: 5 additions & 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 Expand Up @@ -397,3 +398,7 @@ start-test-acceptance-server-detached: ## Start Test Acceptance Server Main Fixt
.PHONY: stop-test-acceptance-server-detached
stop-test-acceptance-server-detached: ## Stop Test Acceptance Server Main Fixture (docker container) in a detached (daemon) mode
docker kill plone-client-acceptance-server

# include local overrides if present
-include Makefile.local
-include ../../../Makefile.local
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
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
48 changes: 27 additions & 21 deletions apps/plone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,30 +249,34 @@
"@loadable/babel-plugin": "5.13.2",
"@loadable/webpack-plugin": "5.15.2",
"@plone/scripts": "workspace:*",
"@plone/types": "workspace:*",
"@plone/types": "1.0.0-alpha.11",
"@plone/volto-coresandbox": "workspace:*",
"@sinonjs/fake-timers": "^6.0.1",
"@storybook/addon-actions": "^6.5.15",
"@storybook/addon-controls": "6.5.15",
"@storybook/addon-docs": "^6.5.15",
"@storybook/addon-essentials": "^6.5.15",
"@storybook/addon-links": "^6.5.15",
"@storybook/addon-actions": "^8.0.4",
"@storybook/addon-controls": "^8.0.4",
"@storybook/addon-docs": "^8.0.4",
"@storybook/addon-essentials": "^8.0.4",
"@storybook/addon-links": "^8.0.4",
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
"@storybook/builder-webpack5": "^6.5.15",
"@storybook/manager-webpack5": "^6.5.15",
"@storybook/react": "^6.5.15",
"@storybook/react": "^8.0.4",
"@storybook/react-webpack5": "^8.0.4",
"@storybook/theming": "^8.0.4",
"@testing-library/cypress": "10.0.1",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.0",
"@testing-library/react-hooks": "8.0.1",
"@types/jest": "^29.5.8",
"@types/loadable__component": "^5.13.9",
"@types/lodash": "^4.14.201",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react-router-dom": "^5.3.3",
"@types/react-test-renderer": "18.0.7",
"@types/uuid": "^9.0.2",
"@typescript-eslint/eslint-plugin": "7.1.1",
"@typescript-eslint/parser": "7.1.1",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"autoprefixer": "10.4.8",
"axe-core": "4.4.2",
"babel-loader": "9.1.0",
Expand All @@ -288,16 +292,17 @@
"cypress-axe": "1.5.0",
"cypress-file-upload": "5.0.8",
"deep-freeze": "0.0.1",
"eslint": "8.49.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-react-app": "7.0.1",
"eslint-import-resolver-alias": "1.1.2",
"eslint-import-resolver-babel-plugin-root-import": "1.1.1",
"eslint-plugin-import": "2.29.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-babel-plugin-root-import": "^1.1.1",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"full-icu": "1.4.0",
"glob": "7.1.6",
"html-webpack-plugin": "5.5.0",
Expand Down Expand Up @@ -331,8 +336,9 @@
"release-it": "^17.1.1",
"semver": "^7.5.4",
"start-server-and-test": "1.14.0",
"storybook": "^8.0.4",
"style-loader": "3.3.1",
"stylelint": "16.2.1",
"stylelint": "^16.3.1",
"stylelint-config-idiomatic-order": "10.0.0",
"stylelint-prettier": "5.0.0",
"svg-loader": "0.0.2",
Expand All @@ -342,10 +348,10 @@
"ts-jest": "^26.4.2",
"ts-loader": "9.4.4",
"tsconfig": "*",
"typescript": "5.2.2",
"typescript": "^5.4.2",
"use-trace-update": "1.3.2",
"wait-on": "6.0.0",
"webpack": "5.76.1",
"webpack": "5.90.1",
"webpack-bundle-analyzer": "4.10.1",
"webpack-dev-server": "4.11.1",
"webpack-node-externals": "3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/plone/src/addons/volto-volto-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"eslint-config-react-app": "7.0.1",
"eslint-plugin-flowtype": "8.0.3",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
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
Loading

0 comments on commit b6a3556

Please sign in to comment.