Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove hard dependencies on specific react versions in monorepo packages. #6728

Merged
merged 20 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/cookieplone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,63 @@ jobs:
with:
name: cypress-videos
path: packages/seven/cypress/videos

volto:
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: Volto 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
pipx run --no-cache cookieplone frontend_addon --no-input

- name: Install generated package
working-directory: volto-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: packages/volto
browser: chrome
spec: cypress/tests/minimal/**/*.js
start: |
make ci-acceptance-backend-start
make cookieplone-acceptance-frontend-prod-start
wait-on: 'pnpm dlx 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
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,11 @@ deployment-acceptance-web-server-start: ## Start the reverse proxy (Traefik) in
deployment-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for deployment tests
$(MAKE) -C "./packages/volto/" deployment-ci-acceptance-test-run-all

######### Project Acceptance tests
######### Cookieplone / (deprecated) Project Acceptance tests

.PHONY: cookieplone-acceptance-frontend-prod-start
cookieplone-acceptance-frontend-prod-start: ## Start acceptance frontend in production mode for project tests
$(MAKE) -C "./packages/volto/" cookieplone-acceptance-frontend-prod-start

.PHONY: project-acceptance-frontend-prod-start
project-acceptance-frontend-prod-start: ## Start acceptance frontend in production mode for project tests
Expand Down
3 changes: 1 addition & 2 deletions packages/registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"build": "tsup",
"build:force": "rm -rf dist && tsup",
"check:exports": "attw --pack .",
"check-ts": "tsc --project tsconfig.json",
"test": "vitest",
"test:debug": "vitest --inspect-brk --no-file-parallelism registry",
"dry-release": "release-it --dry-run",
Expand Down Expand Up @@ -105,8 +106,6 @@
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/tmp": "^0.2.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"release-it": "16.2.1",
"tsconfig": "workspace:*",
"tsup": "^8.3.5",
Expand Down
6 changes: 4 additions & 2 deletions packages/volto-slate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"is-url": "1.2.4",
"jsdom": "^16.6.0",
"lodash": "4.17.21",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-intersection-observer": "9.1.0",
"react-intl": "3.12.1",
"react-redux": "8.1.2",
Expand All @@ -46,6 +44,10 @@
"babel-plugin-transform-class-properties": "^6.24.1",
"release-it": "^17.0.0"
},
"peerDependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"scripts": {
"dry-release": "release-it --dry-run",
"release": "release-it",
Expand Down
6 changes: 5 additions & 1 deletion packages/volto/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ deployment-acceptance-web-server-start: ## Start the reverse proxy (Traefik) in
deployment-ci-acceptance-test-run-all: ## With a single command, run the backend, frontend, and the Cypress tests in headless mode for CI for deployment tests
$(NODEBIN)/start-test "make acceptance-backend-start" http-get://127.0.0.1:55001/plone "make deployment-acceptance-frontend-prod-start" http://127.0.0.1:3000 "make ci-acceptance-test"

######### Project Acceptance tests
######### Cookieplone / (deprecated) Project Acceptance tests

.PHONY: cookieplone-acceptance-frontend-prod-start
cookieplone-acceptance-frontend-prod-start: build-deps ## Start acceptance frontend in production mode for cookieplone tests
(cd ../../volto-add-on && RAZZLE_API_PATH=http://127.0.0.1:55001/plone pnpm build && pnpm start:prod)

.PHONY: project-acceptance-frontend-prod-start
project-acceptance-frontend-prod-start: build-deps ## Start acceptance frontend in production mode for project tests
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ packages:
- 'packages/*'
# all packages in subdirs of components/
- 'apps/*'
- 'apps/plone/src/addons/*'
# exclude packages that are inside test directories
- '!**/test/**'
- '!packages/volto-guillotina'
Loading