From b007ea590594f4c54b29ae213f3b2eb6b02c1776 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Sun, 4 Aug 2024 21:19:33 +0200 Subject: [PATCH 1/4] remove p-queue patch because it only affects internal development, if everything works without it, then let's remove it --- .../p-queue-npm-7.4.1-e0cf0a6f17.patch | 12 -------- package.json | 1 - .../src/utils/PartialTreeUtils/afterFill.ts | 1 + yarn.lock | 28 ++++++------------- 4 files changed, 10 insertions(+), 32 deletions(-) delete mode 100644 .yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch diff --git a/.yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch b/.yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch deleted file mode 100644 index aaef0b1243..0000000000 --- a/.yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/package.json b/package.json -index 8367745346fffd144a817ccf04912bb799e18b66..66dd17a4cd736089a332d72a70040701b0cd9c93 100644 ---- a/package.json -+++ b/package.json -@@ -6,6 +6,7 @@ - "repository": "sindresorhus/p-queue", - "funding": "https://github.com/sponsors/sindresorhus", - "type": "module", -+ "main": "./dist/index.js", - "exports": "./dist/index.js", - "engines": { - "node": ">=12" diff --git a/package.json b/package.json index e1615307cd..4954f8e5fb 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,6 @@ "@types/react": "^18", "@types/webpack-dev-server": "^4", "@vitest/utils": "patch:@vitest/utils@npm%3A1.2.1#./.yarn/patches/@vitest-utils-npm-1.2.1-3028846845.patch", - "p-queue": "patch:p-queue@npm%3A7.4.1#./.yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch", "pre-commit": "patch:pre-commit@npm:1.2.2#.yarn/patches/pre-commit-npm-1.2.2-f30af83877.patch", "preact": "patch:preact@npm:10.10.0#.yarn/patches/preact-npm-10.10.0-dd04de05e8.patch", "start-server-and-test": "patch:start-server-and-test@npm:1.14.0#.yarn/patches/start-server-and-test-npm-1.14.0-841aa34fdf.patch", diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts index 87eefd2151..85a2f60381 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts @@ -6,6 +6,7 @@ import type { PartialTreeId, } from '@uppy/core/lib/Uppy.js' import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' +// eslint-disable-next-line import/no-unresolved import PQueue from 'p-queue' import shallowClone from './shallowClone.ts' diff --git a/yarn.lock b/yarn.lock index 111cec4d0b..100045f94d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23307,23 +23307,13 @@ __metadata: languageName: node linkType: hard -"p-queue@npm:7.4.1": - version: 7.4.1 - resolution: "p-queue@npm:7.4.1" - dependencies: - eventemitter3: "npm:^5.0.1" - p-timeout: "npm:^5.0.2" - checksum: 10/82934551f20a38cc19b31cda7200f2db93ca99b8c642d3ac861d12a7a9160eb32235738a8cd53f1a7ea0c7b52d6c0bb27644b6461e9a51e6a59f1e8d65904b78 - languageName: node - linkType: hard - -"p-queue@patch:p-queue@npm%3A7.4.1#./.yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch::locator=%40uppy-dev%2Fbuild%40workspace%3A.": - version: 7.4.1 - resolution: "p-queue@patch:p-queue@npm%3A7.4.1#./.yarn/patches/p-queue-npm-7.4.1-e0cf0a6f17.patch::version=7.4.1&hash=c7a089&locator=%40uppy-dev%2Fbuild%40workspace%3A." +"p-queue@npm:^8.0.0": + version: 8.0.1 + resolution: "p-queue@npm:8.0.1" dependencies: eventemitter3: "npm:^5.0.1" - p-timeout: "npm:^5.0.2" - checksum: 10/936414afd0b8146eb726bea94d480df7aeab68b6c1ee42e8ca801b8728a212916ce8ad89f5bc6dc3bf097d5586612f4ffd9405664471b8ae2262d5801dc1b162 + p-timeout: "npm:^6.1.2" + checksum: 10/8dcf8fbb8339675eba7d369f6eebac9e249e2412280ad73938403b83a28a2627a2072c732890d22ef98837cef89ff09eecd839cbac358cdc532d00ef4f736d0d languageName: node linkType: hard @@ -23338,10 +23328,10 @@ __metadata: languageName: node linkType: hard -"p-timeout@npm:^5.0.2": - version: 5.1.0 - resolution: "p-timeout@npm:5.1.0" - checksum: 10/f5cd4e17301ff1ff1d8dbf2817df0ad88c6bba99349fc24d8d181827176ad4f8aca649190b8a5b1a428dfd6ddc091af4606835d3e0cb0656e04045da5c9e270c +"p-timeout@npm:^6.1.2": + version: 6.1.2 + resolution: "p-timeout@npm:6.1.2" + checksum: 10/ca3ede368d792bd86fcfa4e133220536382225d31e5f62e2cedb8280df267b25f6684aa0056b22e8aa538cc85014b310058d8fdddeb0a1ff363093d56e87ac3a languageName: node linkType: hard From 3212e58ca75afb7fbe83ae26cec56755c2eb84aa Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Sun, 4 Aug 2024 21:19:56 +0200 Subject: [PATCH 2/4] disable lint causing local lint errro --- examples/react-native-expo/App.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/react-native-expo/App.js b/examples/react-native-expo/App.js index d5784fb0ed..cb056dcf12 100644 --- a/examples/react-native-expo/App.js +++ b/examples/react-native-expo/App.js @@ -4,6 +4,8 @@ import AsyncStorage from '@react-native-async-storage/async-storage' import Uppy from '@uppy/core' import Tus from '@uppy/tus' import FilePicker from '@uppy/react-native' +// todo broken? +// eslint-disable-next-line import/no-unresolved import useUppy from '@uppy/react/lib/useUppy' import FileList from './FileList' import PauseResumeButton from './PauseResumeButton' From 57e3fbf8d96cac38858a341f603a3e1e5a9c89ad Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Tue, 13 Aug 2024 14:33:03 +0200 Subject: [PATCH 3/4] Update App.js --- examples/react-native-expo/App.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/react-native-expo/App.js b/examples/react-native-expo/App.js index cb056dcf12..d5784fb0ed 100644 --- a/examples/react-native-expo/App.js +++ b/examples/react-native-expo/App.js @@ -4,8 +4,6 @@ import AsyncStorage from '@react-native-async-storage/async-storage' import Uppy from '@uppy/core' import Tus from '@uppy/tus' import FilePicker from '@uppy/react-native' -// todo broken? -// eslint-disable-next-line import/no-unresolved import useUppy from '@uppy/react/lib/useUppy' import FileList from './FileList' import PauseResumeButton from './PauseResumeButton' From 5f359b8630f6740adb746c0f43a65867ad78787b Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Wed, 14 Aug 2024 12:12:35 +0200 Subject: [PATCH 4/4] Update packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts Co-authored-by: Antoine du Hamel --- .../provider-views/src/utils/PartialTreeUtils/afterFill.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts index 85a2f60381..af087b789f 100644 --- a/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts +++ b/packages/@uppy/provider-views/src/utils/PartialTreeUtils/afterFill.ts @@ -6,6 +6,8 @@ import type { PartialTreeId, } from '@uppy/core/lib/Uppy.js' import type { CompanionFile } from '@uppy/utils/lib/CompanionFile' +// p-queue does not have a `"main"` field in its `package.json`, and that makes `import/no-unresolved` freak out. +// We can safely ignore it because bundlers will happily use the `"exports"` field instead. // eslint-disable-next-line import/no-unresolved import PQueue from 'p-queue' import shallowClone from './shallowClone.ts'