Skip to content

Commit

Permalink
Merge branch 'main' into fixversionpolicydocs
Browse files Browse the repository at this point in the history
  • Loading branch information
stevepiercy authored Jan 24, 2025
2 parents 783348a + 03c3a81 commit b77c462
Show file tree
Hide file tree
Showing 123 changed files with 4,888 additions and 338 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -691,3 +691,51 @@ jobs:
with:
name: cypress-videos
path: packages/volto/cypress/videos

seven:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
name: Seven
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4

- name: Set up Node.js environment
uses: ./.github/actions/node_env_setup
with:
node-version: ${{ matrix.node-version }}

- name: Cypress acceptance tests
uses: cypress-io/github-action@v6
env:
BABEL_ENV: production
CYPRESS_RETRIES: 2
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
install: false
working-directory: packages/seven
browser: chrome
spec: cypress/tests/core/basic/**/*.cy.ts
start: |
make ci-acceptance-backend-start
make acceptance-frontend-prod-start
wait-on: 'npx wait-on --httpTimeout 20000 http-get://127.0.0.1:55001/plone http://127.0.0.1:3000'

# Upload Cypress screenshots
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: packages/seven/cypress/screenshots
# Upload Cypress videos
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: packages/seven/cypress/videos
10 changes: 10 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
- 'packages/slots/**'
theming:
- 'packages/theming/**'
seven:
- 'packages/seven/**'
wrongNews:
- added|modified: 'news/**'
Expand Down Expand Up @@ -150,6 +152,14 @@ jobs:
env:
BASE_BRANCH: ${{ github.base_ref }}

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

- name: Wrong location of news changelog check
if: steps.filter.outputs.wrongNews == 'true'
run: echo "News items should be moved from the repository root to the appropriate package root in `packages/package-name`." && exit 1
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/cookieplone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Cookieplone
on: [push, pull_request]

env:
PYTHON_VERSION: "3.13"

jobs:
seven:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest
name: Seven Cookieplone
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- run: echo "Current branch is ${GITHUB_REF#refs/heads/}"
- name: Set up Node.js environment
uses: ./.github/actions/node_env_setup
with:
node-version: ${{ matrix.node-version }}

- name: Generate Cookieplone-based frontend addon
run: |
pipx install cookieplone
COOKIEPLONE_REPOSITORY_TAG=seventemplate pipx run --no-cache cookieplone seven_addon --no-input
- name: Install generated package
working-directory: seven-add-on
run: |
pnpm dlx mrs-developer missdev --no-config --fetch-https
(cd core && git fetch --depth 1 origin ${GITHUB_REF#refs/heads/}:${GITHUB_REF#refs/heads/} && git checkout ${GITHUB_REF#refs/heads/})
pnpm i
- name: Cypress acceptance tests
uses: cypress-io/github-action@v6
env:
BABEL_ENV: production
CYPRESS_RETRIES: 2
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
install: false
working-directory: seven-add-on/core/packages/seven
browser: chrome
spec: cypress/tests/core/basic/**/*.cy.ts
start: |
make ci-acceptance-backend-start
make project-acceptance-frontend-prod-start
wait-on: 'npx wait-on --httpTimeout 20000 http-get://127.0.0.1:55001/plone http://127.0.0.1:3000'

# Upload Cypress screenshots
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: packages/seven/cypress/screenshots
# Upload Cypress videos
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: packages/seven/cypress/videos
18 changes: 0 additions & 18 deletions .lintstagedrc

This file was deleted.

46 changes: 22 additions & 24 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,25 @@ build:
tools:
python: "3.12"
nodejs: "20"
jobs:
post_checkout:
# Cancel building pull requests when there aren't changes in the docs directory or YAML file.
# You can add any other files or directories that you'd like here as well,
# like your docs requirements file, or other files that will change your docs build.
#
# If there are no changes (git diff exits with 0) we force the command to return with 183.
# This is a special exit code on Read the Docs that will cancel the build immediately.
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml requirements-docs.txt packages/volto/.storybook;
then
exit 183;
fi
post_install:
# Install dependencies defined in your ``package.json``
# - npm ci
# Install any other extra dependencies to build the docs
- corepack enable
- corepack prepare pnpm@* --activate
- asdf reshim nodejs
- pnpm install
- pnpm build:registry
- (cd packages/volto && pnpm build-storybook -o ${READTHEDOCS_OUTPUT}/html/storybook)
- make docs-rtd-pr-preview
commands:
# Cancel building pull requests when there aren't changes in the docs directory or YAML file.
# You can add any other files or directories that you'd like here as well,
# like your docs requirements file, or other files that will change your docs build.
#
# If there are no changes (git diff exits with 0) we force the command to return with 183.
# This is a special exit code on Read the Docs that will cancel the build immediately.
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ .readthedocs.yaml requirements-docs.txt packages/volto/.storybook;
then
exit 183;
fi
# Install dependencies defined in your ``package.json``
# - npm ci
# Install any other extra dependencies to build the docs
- corepack enable
- corepack prepare pnpm@* --activate
- asdf reshim nodejs
- pnpm install
- pnpm build:registry
- (cd packages/volto && pnpm build-storybook -o ${READTHEDOCS_OUTPUT}/html/storybook)
- make docs-rtd-pr-preview
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,24 @@ packages/registry/dist: $(shell find packages/registry/src -type f)
packages/components/dist: $(shell find packages/components/src -type f)
pnpm build:components

packages/client/dist: $(shell find packages/client/src -type f)
pnpm build:client

packages/providers/dist: $(shell find packages/providers/src -type f)
pnpm build:providers

packages/helpers/dist: $(shell find packages/helpers/src -type f)
pnpm build:helpers

packages/react-router/dist: $(shell find packages/react-router/src -type f)
pnpm build:react-router

.PHONY: build-deps
build-deps: packages/registry/dist ## Build dependencies

.PHONY: build-all-deps
build-all-deps: packages/registry/dist packages/components/dist packages/client/dist packages/providers/dist packages/react-router/dist packages/helpers/dist ## Build all dependencies

.PHONY: i18n
i18n: ## Converts your po files into json to translate volto frontend
$(MAKE) -C "./packages/volto/" i18n
Expand Down Expand Up @@ -378,6 +393,28 @@ acceptance-server-detached-start: ## Starts test acceptance server main fixture
acceptance-server-detached-stop: ## Stop test acceptance server main fixture in detached mode (daemon)
docker kill plone-client-acceptance-server

######### Seven acceptance tests

.PHONY: seven-acceptance-frontend-dev-start
seven-acceptance-frontend-dev-start: ## Start acceptance frontend in development mode for Seven
$(MAKE) -C "./packages/seven/" acceptance-frontend-dev-start

.PHONY: seven-acceptance-frontend-prod-start
seven-acceptance-frontend-prod-start:: ## Start acceptance frontend in production mode for Seven
$(MAKE) -C "./packages/seven/" acceptance-frontend-prod-start

.PHONY: seven-acceptance-test
seven-acceptance-test: ## Start Cypress in interactive mode for Seven
$(MAKE) -C "./packages/seven/" acceptance-test

.PHONY: seven-ci-acceptance-test
seven-ci-acceptance-test: ## Run cypress tests in headless mode for CI for Seven
$(MAKE) -C "./packages/seven/" ci-acceptance-test

.PHONY: seven-ci-acceptance-test-run-all
seven-ci-acceptance-test-run-all: ## With a single command, start both the acceptance frontend and backend acceptance server, and run Cypress tests in headless mode for Seven
$(MAKE) -C "./packages/seven/" ci-acceptance-test-run-all

# include local overrides if present
-include Makefile.local
-include ../../../Makefile.local
7 changes: 4 additions & 3 deletions PACKAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ and as a development dependency:
Plone 6.0.x (Volto 17 and below) does not use any of them.

These packages are expected to be used and become part of Plone 7.
Some of them might become part of Plone 6.1.x minor versions.

The packages are divided into three categories or types:
These packages are divided into three categories or types:

- core
- utilities
Expand Down Expand Up @@ -53,6 +52,7 @@ The bundle of these packages must work on both CommonJS and ECMAScript Module (E

- `@plone/providers`
- `@plone/helpers`
- `@plone/react-router`


### Rules
Expand All @@ -67,6 +67,7 @@ This bundle must work on both CommonJS and ESM environments.
- `@plone/blocks`
- `@plone/slots`
- `@plone/theming`
- `@plone/cmsui`
- `@plone/contents`


Expand Down Expand Up @@ -94,7 +95,7 @@ Some of them are used by the build, and separated in packages for convenience.
- `tsconfig`


## Volto add-ons packages
## Volto add-on packages

These Volto add-ons are packages used by Volto core.
They are always loaded, so they are also called "core packages".
Expand Down
23 changes: 23 additions & 0 deletions docs/source/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,29 @@ myst:

<!-- towncrier release notes start -->

## 18.7.0 (2025-01-24)

### Feature

- - Fixed handling of the site logo preview to appear after upload. @Shyam-Raghuwanshi [#6591](https://github.com/plone/volto/issues/6591)
- Provide language alternate links @erral [#6602](https://github.com/plone/volto/issues/6602)
- feat(cypress):Add custom check Accessibility command @Tishasoumya-02 [#6606](https://github.com/plone/volto/issues/6606)

### Bugfix

- Improve the usability of the `ObjectBrowser` when inputting a manual value, checking it on blur, and adding a local validator. @sneridagh [#6576](https://github.com/plone/volto/issues/6576)
- fix(useClipboard): Do not have a pending promise in a boolean state @nileshgulia1 [#6585](https://github.com/plone/volto/issues/6585)

### Internal

- Add Seven convenience Makefile commands. @sneridagh [#6599](https://github.com/plone/volto/issues/6599)
- Restore pull request previews on Read the Docs. @stevepiercy [#6612](https://github.com/plone/volto/issues/6612)
- Fix lint-staged throwing warnings when a file is checked-in and ignored. @sneridagh [#6614](https://github.com/plone/volto/issues/6614)

### Documentation

- Enhancements of the upgrade guide for Volto 18, since we detected some inconsistencies. @sneridagh [#6609](https://github.com/plone/volto/issues/6609)

## 18.6.0 (2025-01-11)

### Feature
Expand Down
31 changes: 31 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const { ESLint } = require('eslint');

const removeIgnoredFiles = async (files) => {
const eslint = new ESLint();
const ignoredFiles = await Promise.all(
files.map((file) => eslint.isPathIgnored(file)),
);
const filteredFiles = files.filter((_, i) => !ignoredFiles[i]);
return filteredFiles.join(' ');
};
module.exports = {
'packages/!(volto)/**/*.{js,jsx,ts,tsx}': async (files) => {
const filesToLint = await removeIgnoredFiles(files);
return [
`eslint --max-warnings=0 ${filesToLint}`,
'pnpm prettier --single-quote --write',
];
},
'packages/volto/**/*.{js,jsx,ts,tsx}': [
'pnpm --filter @plone/volto lint:husky',
'pnpm --filter @plone/volto prettier:husky',
],
'packages/volto/src/**/*.{jsx, tsx}': ['pnpm --filter @plone/volto i18n'],
'packages/!(volto)/**/*.{css,less,scss}': ['pnpm stylelint --fix'],
'packages/volto/**/*.{css,less,scss}': [
'pnpm --filter @plone/volto stylelint --fix',
],
'packages/volto/**/*.overrides': [
'pnpm --filter @plone/volto stylelint --fix',
],
};
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
"preinstall": "npx only-allow pnpm",
"watch": "pnpm --filter @plone/registry --filter @plone/client --filter @plone/components --filter @plone/providers watch",
"build:deps": "pnpm --filter @plone/registry build",
"build:all": "pnpm --filter @plone/registry --filter @plone/client --filter @plone/components --filter @plone/providers build",
"build:all:force": "pnpm --filter @plone/registry --filter @plone/client --filter @plone/components --filter @plone/providers build:force",
"build:all": "pnpm --filter @plone/registry --filter @plone/client --filter @plone/components --filter @plone/providers --filter @plone/react-router build",
"build:all:force": "pnpm --filter @plone/registry --filter @plone/client --filter @plone/components --filter @plone/providers --filter @plone/react-router build:force",
"build:registry": "pnpm --filter @plone/registry run build",
"build:components": "pnpm --filter @plone/components run build",
"build:client": "pnpm --filter @plone/client run build",
"build:providers": "pnpm --filter @plone/providers run build",
"build:helpers": "pnpm --filter @plone/helpers run build",
"build:react-router": "pnpm --filter @plone/react-router run build",
"build": "pnpm --filter @plone/volto build",
"start": "pnpm --filter @plone/volto start",
"start:project": "pnpm --filter plone run start",
"lint": "pnpm build:all && eslint --max-warnings=0 '{apps,packages}/**/*.{js,jsx,ts,tsx}'",
"lint": "make build-all-deps && eslint --max-warnings=0 '{apps,packages}/**/*.{js,jsx,ts,tsx}'",
"lint:volto": "pnpm --filter @plone/volto run lint",
"test": "pnpm --filter @plone/volto run test",
"test:ci": "pnpm --filter @plone/volto run test:ci",
Expand Down
4 changes: 2 additions & 2 deletions packages/blocks/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: ['../../.eslintrc.cjs', 'plugin:react/jsx-runtime'],
ignorePatterns: ['storybook-static', 'dist'],
extends: ['../../.eslintrc.cjs', '../eslintconfig/addons.js'],
ignorePatterns: ['vitest.config.ts'],
};
Loading

0 comments on commit b77c462

Please sign in to comment.