Repository navigation
fix(FileUpload): declare file-selector as a dependency - #12730
sebdanielsson wants to merge 1 commit into
Conversation
FileUpload imports fromEvent from file-selector, which @patternfly/react-core doesn't declare: it only resolves because react-dropzone depends on it and the package manager hoists it. With a strict node_modules layout, such as pnpm without hoisting or its global virtual store, bundling an app that uses @patternfly/react-core fails with "Can't resolve 'file-selector'". Declare it with the range react-dropzone 14 uses (^2.1.0), so both resolve to the same copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NZ5218DQiHeeKGzo7MRyA3 Signed-off-by: Sebastian Danielsson <sebastian.danielsson@trafikverket.se>
|
No actionable comments were generated in the recent review. WalkthroughThe ChangesFileUpload dependency declaration
Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk:
|
What: Closes #12729
FileUploadimportsfromEventfromfile-selector, which@patternfly/react-coredidn't declare: it only resolved throughreact-dropzone's own dependency being hoisted. With a strictnode_moduleslayout (pnpm without hoisting, or pnpm's global virtual store), bundling an app that uses@patternfly/react-corefails withCan't resolve 'file-selector'.This adds
file-selectorto@patternfly/react-core'sdependencieswith the rangereact-dropzone14 uses (^2.1.0), so both resolve to the same copy;yarn.lockonly gains the line in react-core's workspace entry.FileUpload.tsxis the only file inpackages/that imports it.Additional issues: none.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NZ5218DQiHeeKGzo7MRyA3
Summary by CodeRabbit