Skip to content

Conversation

@rebeccaalpert
Copy link
Member

@rebeccaalpert rebeccaalpert commented May 5, 2025

Works with 18 as a peer dependency.

With 19, get some problems due to docs framework:

ralpert@ralpert-mac react-catalog-view % yarn install
yarn install v1.22.22
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
warning [email protected]: The engine "bare" appears to be invalid.
warning [email protected]: The engine "bare" appears to be invalid.
[3/4] 🔗  Linking dependencies...
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/[email protected]" has incorrect peer dependency "react@^17 || ^18".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/[email protected]" has incorrect peer dependency "react-dom@^17 || ^18".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/[email protected]" has incorrect peer dependency "@patternfly/patternfly@^6.2.0".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/[email protected]" has incorrect peer dependency "@patternfly/react-core@^6.2.0".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/[email protected]" has incorrect peer dependency "react@^17.0.0 || ^18.0.0".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/[email protected]" has incorrect peer dependency "react-dom@^17.0.0 || ^18.0.0".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/[email protected]" has incorrect peer dependency "react@^17 || ^18".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/[email protected]" has incorrect peer dependency "react-dom@^17 || ^18".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/[email protected]" has incorrect peer dependency "react@^17 || ^18".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/[email protected]" has incorrect peer dependency "react-dom@^17 || ^18".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > [email protected]" has incorrect peer dependency "@types/react@>=17 <= 18".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > [email protected]" has incorrect peer dependency "react@>=17 <= 18".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/react-core > @patternfly/[email protected]" has incorrect peer dependency "react@^17 || ^18".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/react-core > @patternfly/[email protected]" has incorrect peer dependency "react-dom@^17 || ^18".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/documentation-framework > @reach/[email protected]" has incorrect peer dependency "[email protected] || 16.x || 17.x || 18.x".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/documentation-framework > @reach/[email protected]" has incorrect peer dependency "[email protected] || 16.x || 17.x || 18.x".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/documentation-framework > [email protected]" has incorrect peer dependency "react@^16.8.0 || ^17.0.0 || ^18.0.0".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/react-table > @patternfly/[email protected]" has incorrect peer dependency "react@^17 || ^18".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/react-table > @patternfly/[email protected]" has incorrect peer dependency "react-dom@^17 || ^18".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/react-table > @patternfly/[email protected]" has incorrect peer dependency "react@^17 || ^18".
warning "workspace-aggregator-4d56eaaf-c152-4791-8ced-875346a843cc > @patternfly/react-catalog-view-extension > @patternfly/react-table > @patternfly/[email protected]" has incorrect peer dependency "react-dom@^17 || ^18".
[4/4] 🔨  Building fresh packages...
success Saved lockfile.
✨  Done in 6.32s.



ralpert@ralpert-mac react-catalog-view % yarn build  
yarn run v1.22.22
$ yarn workspace @patternfly/react-catalog-view-extension build
$ yarn generate && yarn build:esm && yarn build:cjs
$ yarn build:sass && yarn copy:sass
$ node buildSass.js
$ shx mkdir -p dist/sass && shx cp -r sass/react-catalog-view-extension/* dist/sass
$ tsc --build --verbose ./tsconfig.json
[9:52:14 AM] Projects in this build: 
    * tsconfig.json

[9:52:14 AM] Project 'tsconfig.json' is up to date because newest input 'src/components/FilterSidePanel/FilterSidePanelCategoryItem.tsx' is older than output 'dist/esm.tsbuildinfo'

$ tsc --build --verbose ./tsconfig.cjs.json
[9:52:15 AM] Projects in this build: 
    * tsconfig.cjs.json

[9:52:15 AM] Project 'tsconfig.cjs.json' is up to date because newest input 'src/components/FilterSidePanel/FilterSidePanelCategoryItem.tsx' is older than output 'dist/cjs.tsbuildinfo'

✨  Done in 2.29s.






ralpert@ralpert-mac react-catalog-view % yarn start  
yarn run v1.22.22
$ yarn build && concurrently --kill-others "yarn workspace @patternfly/react-catalog-view-extension docs:develop"
$ yarn workspace @patternfly/react-catalog-view-extension build
$ yarn generate && yarn build:esm && yarn build:cjs
$ yarn build:sass && yarn copy:sass
$ node buildSass.js
$ shx mkdir -p dist/sass && shx cp -r sass/react-catalog-view-extension/* dist/sass
$ tsc --build --verbose ./tsconfig.json
[9:52:34 AM] Projects in this build: 
    * tsconfig.json

[9:52:34 AM] Project 'tsconfig.json' is up to date because newest input 'src/components/FilterSidePanel/FilterSidePanelCategoryItem.tsx' is older than output 'dist/esm.tsbuildinfo'

$ tsc --build --verbose ./tsconfig.cjs.json
[9:52:35 AM] Projects in this build: 
    * tsconfig.cjs.json

[9:52:35 AM] Project 'tsconfig.cjs.json' is up to date because newest input 'src/components/FilterSidePanel/FilterSidePanelCategoryItem.tsx' is older than output 'dist/cjs.tsbuildinfo'

$ pf-docs-framework start
[0] /Users/ralpert/Documents/react-catalog-view/node_modules/react-ssr-prepass/dist/react-ssr-prepass.js:590
[0] var L = r.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;
[0]                                                                      ^
[0] 
[0] TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
[0]     at Object.<anonymous> (/Users/ralpert/Documents/react-catalog-view/node_modules/react-ssr-prepass/dist/react-ssr-prepass.js:590:70)
[0]     at Module._compile (node:internal/modules/cjs/loader:1546:14)
[0]     at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
[0]     at Module.load (node:internal/modules/cjs/loader:1317:32)
[0]     at Module._load (node:internal/modules/cjs/loader:1127:12)
[0]     at TracingChannel.traceSync (node:diagnostics_channel:315:14)
[0]     at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
[0]     at Module.require (node:internal/modules/cjs/loader:1339:12)
[0]     at require (node:internal/modules/helpers:125:16)
[0]     at Object.<anonymous> (/Users/ralpert/Documents/react-catalog-view/node_modules/@patternfly/documentation-framework/scripts/webpack/prerender.js:4:20)
[0] 
[0] Node.js v22.6.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
[0] Exit code: 1
[0] Command: /Users/ralpert/.nvm/versions/node/v22.6.0/bin/node
[0] Arguments: /Users/ralpert/.cache/node/corepack/v1/yarn/1.22.22/lib/cli.js docs:develop
[0] Directory: /Users/ralpert/Documents/react-catalog-view/packages/module
[0] Output:
[0] 
info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
[0] yarn workspace @patternfly/react-catalog-view-extension docs:develop exited with code 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@rebeccaalpert rebeccaalpert linked an issue May 5, 2025 that may be closed by this pull request
2 tasks
@patternfly-build
Copy link

patternfly-build commented May 5, 2025

@rebeccaalpert rebeccaalpert force-pushed the react19 branch 7 times, most recently from 02ef1ac to 70430ac Compare May 5, 2025 21:40
"@testing-library/user-event": "14.4.3",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/dom": "9.0.0",
"@testing-library/dom": "^10.4.0",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These support 19

@rebeccaalpert rebeccaalpert changed the title Draft: chore(React19): Allow support for React 19 chore(React19): Allow support for React 19 May 7, 2025
Copy link

@kmcfaul kmcfaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Yes the ReactCurrentDispatcher error is expected when trying to build the docs with React 19 due to the outdated dep in the framework. As long as the extension continues to build with React 18, and the module can build with React 19 aside from the docs I think it's good to go.

@thatblindgeye thatblindgeye merged commit 44201e7 into patternfly:main May 19, 2025
5 checks passed
@github-actions
Copy link

🎉 This PR is included in version 6.2.0-prerelease.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

catalog view - react 19 support

4 participants