From 08742ea73d2a7ce58b9bdf14e9dff8c0c9c843de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Tue, 10 Jan 2023 21:14:20 +0100 Subject: [PATCH 1/4] Set withLinkToProfile to false in PendingStatus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/features/ui/components/pending-status.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/soapbox/features/ui/components/pending-status.tsx b/app/soapbox/features/ui/components/pending-status.tsx index d17c65a78..367ede08a 100644 --- a/app/soapbox/features/ui/components/pending-status.tsx +++ b/app/soapbox/features/ui/components/pending-status.tsx @@ -70,6 +70,7 @@ const PendingStatus: React.FC = ({ idempotencyKey, className, mu account={account} timestamp={status.created_at} hideActions + withLinkToProfile={false} /> From 5de9afd18b0555d2440dd1844b6cc930e057204f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 10 Jan 2023 15:06:26 -0600 Subject: [PATCH 2/4] Remove prop-types --- app/soapbox/utils/soapbox-prop-types.ts | 9 --------- babel.config.js | 4 ---- package.json | 3 --- webpack/rules/node-modules.ts | 3 --- yarn.lock | 14 +------------- 5 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 app/soapbox/utils/soapbox-prop-types.ts diff --git a/app/soapbox/utils/soapbox-prop-types.ts b/app/soapbox/utils/soapbox-prop-types.ts deleted file mode 100644 index b7457957c..000000000 --- a/app/soapbox/utils/soapbox-prop-types.ts +++ /dev/null @@ -1,9 +0,0 @@ -import PropTypes from 'prop-types'; - -export default { - me: PropTypes.oneOfType([ - PropTypes.string, - PropTypes.oneOf([false, null]), - ]), - meLoggedIn: PropTypes.string, -}; diff --git a/babel.config.js b/babel.config.js index f999f83ef..159768c3a 100644 --- a/babel.config.js +++ b/babel.config.js @@ -29,13 +29,9 @@ module.exports = (api) => { config.plugins.push(...[ 'lodash', [ - 'transform-react-remove-prop-types', { mode: 'remove', removeImport: true, - additionalLibraries: [ - 'react-immutable-proptypes', - ], }, ], '@babel/transform-react-inline-elements', diff --git a/package.json b/package.json index 166058d28..a5dee5560 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,6 @@ "babel-plugin-lodash": "^3.3.4", "babel-plugin-preval": "^5.1.0", "babel-plugin-react-intl": "^7.5.20", - "babel-plugin-transform-react-remove-prop-types": "^0.4.24", "babel-plugin-transform-require-context": "^0.1.1", "blurhash": "^2.0.0", "bootstrap-icons": "^1.5.0", @@ -142,7 +141,6 @@ "postcss": "^8.4.14", "postcss-loader": "^7.0.0", "process": "^0.11.10", - "prop-types": "^15.5.10", "punycode": "^2.1.1", "qrcode.react": "^3.0.2", "react": "^18.0.0", @@ -152,7 +150,6 @@ "react-helmet": "^6.1.0", "react-hot-toast": "^2.4.0", "react-hotkeys": "^1.1.4", - "react-immutable-proptypes": "^2.2.0", "react-immutable-pure-component": "^2.2.2", "react-inlinesvg": "^3.0.0", "react-intl": "^5.0.0", diff --git a/webpack/rules/node-modules.ts b/webpack/rules/node-modules.ts index f6f11b041..fb9a2ef39 100644 --- a/webpack/rules/node-modules.ts +++ b/webpack/rules/node-modules.ts @@ -17,9 +17,6 @@ const rule: RuleSetRule = { loader: 'babel-loader', options: { babelrc: false, - plugins: [ - 'transform-react-remove-prop-types', - ], cacheDirectory: join(settings.cache_path, 'babel-loader-node-modules'), cacheCompression: env.NODE_ENV === 'production', compact: false, diff --git a/yarn.lock b/yarn.lock index 55a7f1d73..583c2059c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3831,11 +3831,6 @@ babel-plugin-react-intl@^7.5.20: intl-messageformat-parser "^5.3.7" schema-utils "^2.6.6" -babel-plugin-transform-react-remove-prop-types@^0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.24.tgz#f2edaf9b4c6a5fbe5c1d678bfb531078c1555f3a" - integrity sha512-eqj0hVcJUR57/Ug2zE1Yswsw4LhuqqHhD+8v120T1cl3kjg76QwtyBrdIk4WVwK+lAhBJVYCd/v+4nc4y+8JsA== - babel-plugin-transform-require-context@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/babel-plugin-transform-require-context/-/babel-plugin-transform-require-context-0.1.1.tgz#319b545ca83080b5062776b46cc9b8b346fea9a6" @@ -6700,7 +6695,7 @@ intl-pluralrules@^1.3.1: resolved "https://registry.yarnpkg.com/intl-pluralrules/-/intl-pluralrules-1.3.1.tgz#304ec4038a597894f6616633cbf5e66fb3dbee04" integrity sha512-sNYPls1Q4fyN0EGLFVJ7TIuaMWln01LupLozfIBt69rHK0DHehghMSz6ejfnSklgRddnyQSEaQPIU6d9TCKH3w== -invariant@^2.2.2, invariant@^2.2.4: +invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -9453,13 +9448,6 @@ react-hotkeys@^1.1.4: mousetrap "^1.5.2" prop-types "^15.6.0" -react-immutable-proptypes@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/react-immutable-proptypes/-/react-immutable-proptypes-2.2.0.tgz#cce96d68cc3c18e89617cbf3092d08e35126af4a" - integrity sha512-Vf4gBsePlwdGvSZoLSBfd4HAP93HDauMY4fDjXhreg/vg6F3Fj/MXDNyTbltPC/xZKmZc+cjLu3598DdYK6sgQ== - dependencies: - invariant "^2.2.2" - react-immutable-pure-component@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/react-immutable-pure-component/-/react-immutable-pure-component-2.2.2.tgz#3014d3e20cd5a7a4db73b81f1f1464f4d351684b" From edbbae2b482389c6435f65f9f7bcb1e06cd1b9be Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 10 Jan 2023 21:36:35 +0000 Subject: [PATCH 3/4] Update babel.config.js --- babel.config.js | 6 ------ 1 file changed, 6 deletions(-) diff --git a/babel.config.js b/babel.config.js index 159768c3a..2d684880b 100644 --- a/babel.config.js +++ b/babel.config.js @@ -28,12 +28,6 @@ module.exports = (api) => { case 'production': config.plugins.push(...[ 'lodash', - [ - { - mode: 'remove', - removeImport: true, - }, - ], '@babel/transform-react-inline-elements', [ '@babel/transform-runtime', From 48fdc3882c4a7e63918bd53d13f3abc4d7101892 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 10 Jan 2023 17:22:19 -0600 Subject: [PATCH 4/4] Force a patched version of glob-parent --- package.json | 1 + yarn.lock | 9 +-------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index a5dee5560..118fab9c5 100644 --- a/package.json +++ b/package.json @@ -233,6 +233,7 @@ "yargs": "^17.6.2" }, "resolutions": { + "glob-parent": "^6.0.1", "jsonwebtoken": "^9.0.0", "loader-utils": "^2.0.3" } diff --git a/yarn.lock b/yarn.lock index 583c2059c..039ccff45 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6080,14 +6080,7 @@ gitlab@^10.0.1: query-string "^6.8.2" universal-url "^2.0.0" -glob-parent@^5.1.2, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.1, glob-parent@^6.0.2: +glob-parent@^5.1.2, glob-parent@^6.0.1, glob-parent@^6.0.2, glob-parent@~5.1.2: version "6.0.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==