From 1185f4b78ce7f5af66298c7aeeca05697f597d66 Mon Sep 17 00:00:00 2001 From: Sebastian Danielsson Date: Mon, 23 Nov 2026 18:57:38 +0100 Subject: [PATCH] fix(FileUpload): declare file-selector as a dependency 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 Claude-Session: https://claude.ai/code/session_01NZ5218DQiHeeKGzo7MRyA3 Signed-off-by: Sebastian Danielsson --- packages/react-core/package.json | 1 + yarn.lock | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/react-core/package.json b/packages/react-core/package.json index fe397831f47..2d4cf33b9cf 100644 --- a/packages/react-core/package.json +++ b/packages/react-core/package.json @@ -49,6 +49,7 @@ "@patternfly/react-icons": "workspace:^", "@patternfly/react-styles": "workspace:^", "@patternfly/react-tokens": "workspace:^", + "file-selector": "^2.1.0", "focus-trap": "7.6.6", "react-dropzone": "^14.3.5", "tslib": "^2.8.1" diff --git a/yarn.lock b/yarn.lock index b89a258de4b..912c3e61124 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5534,6 +5534,7 @@ __metadata: "@patternfly/react-styles": "workspace:^" "@patternfly/react-tokens": "workspace:^" case-anything: "npm:^3.1.2" + file-selector: "npm:^2.1.0" focus-trap: "npm:7.6.6" fs-extra: "npm:^11.3.3" react-dropzone: "npm:^14.3.5"