From af42d97e2ac9e2757eadc138af36ae3d0af81239 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 08:03:58 +0000 Subject: [PATCH 1/3] Bump prettier and pretty-quick Bumps [prettier](https://github.com/prettier/prettier) and [pretty-quick](https://github.com/prettier/pretty-quick). These dependencies needed to be updated together. Updates `prettier` from 2.8.8 to 3.6.2 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.6.2) Updates `pretty-quick` from 3.3.1 to 4.2.2 - [Release notes](https://github.com/prettier/pretty-quick/releases) - [Changelog](https://github.com/prettier/pretty-quick/blob/v4.2.2/CHANGELOG.md) - [Commits](https://github.com/prettier/pretty-quick/compare/v3.3.1...v4.2.2) --- updated-dependencies: - dependency-name: prettier dependency-version: 3.6.2 dependency-type: direct:development update-type: version-update:semver-major - dependency-name: pretty-quick dependency-version: 4.2.2 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 4 +-- yarn.lock | 89 ++++++++++++++++++---------------------------------- 2 files changed, 33 insertions(+), 60 deletions(-) diff --git a/package.json b/package.json index 84f20e1bbde..e4f12b9445b 100644 --- a/package.json +++ b/package.json @@ -305,8 +305,8 @@ "po2json": "mikeedwards/po2json#51e2310485bbe35e9e57f2eee238185459ca0eab", "postcss": "^8.5.6", "postcss-loader": "^8.2.0", - "prettier": "2.8.8", - "pretty-quick": "3.3.1", + "prettier": "3.6.2", + "pretty-quick": "4.2.2", "react-hot-loader": "^4.13.1", "redux-saga-tester": "^1.0.372", "rimraf": "^6.0.1", diff --git a/yarn.lock b/yarn.lock index c0e78bddbee..8c44b033c0d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1775,7 +1775,7 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@pkgr/core@^0.2.9": +"@pkgr/core@^0.2.7", "@pkgr/core@^0.2.9": version "0.2.9" resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.9.tgz#d229a7b7f9dac167a156992ef23c7f023653f53b" integrity sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA== @@ -3829,7 +3829,7 @@ cosmiconfig@^9.0.0: js-yaml "^4.1.0" parse-json "^5.2.0" -cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3, cross-spawn@^7.0.6: +cross-spawn@^7.0.2, cross-spawn@^7.0.3, cross-spawn@^7.0.6: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -5304,21 +5304,6 @@ events@^3.2.0, events@^3.3.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -execa@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" - integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== - dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - human-signals "^1.1.1" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.0" - onetime "^5.1.0" - signal-exit "^3.0.2" - strip-final-newline "^2.0.0" - execa@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -5805,13 +5790,6 @@ get-proto@^1.0.0, get-proto@^1.0.1: dunder-proto "^1.0.1" es-object-atoms "^1.0.0" -get-stream@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - get-stream@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" @@ -6312,11 +6290,6 @@ https-proxy-agent@^7.0.6: agent-base "^7.1.2" debug "4" -human-signals@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" - integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== - human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -6356,11 +6329,16 @@ ignore-by-default@^1.0.1: resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09" integrity sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA== -ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.0: +ignore@^5.2.0, ignore@^5.2.4: version "5.3.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== +ignore@^7.0.5: + version "7.0.5" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.5.tgz#4cb5f6cd7d4c7ab0365738c7aea888baa6d7efd9" + integrity sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg== + immediate@~3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" @@ -8282,7 +8260,7 @@ normalize.css@8.0.1: resolved "https://registry.yarnpkg.com/normalize.css/-/normalize.css-8.0.1.tgz#9b98a208738b9cc2634caacbc42d131c97487bf3" integrity sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg== -npm-run-path@^4.0.0, npm-run-path@^4.0.1: +npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== @@ -8426,7 +8404,7 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -onetime@^5.1.0, onetime@^5.1.2: +onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -8656,11 +8634,6 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -picomatch@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-3.0.1.tgz#817033161def55ec9638567a2f3bbc876b3e7516" - integrity sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag== - picomatch@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.3.tgz#796c76136d1eead715db1e7bad785dedd695a042" @@ -9104,10 +9077,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@2.8.8: - version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +prettier@3.6.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393" + integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ== pretty-error@^4.0.0: version "4.0.0" @@ -9144,18 +9117,18 @@ pretty-format@^29.7.0: ansi-styles "^5.0.0" react-is "^18.0.0" -pretty-quick@3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-3.3.1.tgz#cfde97fec77a8d201a0e0c9c71d9990e12587ee2" - integrity sha512-3b36UXfYQ+IXXqex6mCca89jC8u0mYLqFAN5eTQKoXO6oCQYcIVYZEB/5AlBHI7JPYygReM2Vv6Vom/Gln7fBg== +pretty-quick@4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-4.2.2.tgz#0fc31da666f182fe14e119905fc9829b5b85a234" + integrity sha512-uAh96tBW1SsD34VhhDmWuEmqbpfYc/B3j++5MC/6b3Cb8Ow7NJsvKFhg0eoGu2xXX+o9RkahkTK6sUdd8E7g5w== dependencies: - execa "^4.1.0" - find-up "^4.1.0" - ignore "^5.3.0" + "@pkgr/core" "^0.2.7" + ignore "^7.0.5" mri "^1.2.0" - picocolors "^1.0.0" - picomatch "^3.0.1" - tslib "^2.6.2" + picocolors "^1.1.1" + picomatch "^4.0.2" + tinyexec "^0.3.2" + tslib "^2.8.1" process-nextick-args@~2.0.0: version "2.0.1" @@ -10475,7 +10448,7 @@ side-channel@^1.0.4, side-channel@^1.1.0: side-channel-map "^1.0.1" side-channel-weakmap "^1.0.2" -signal-exit@^3.0.2, signal-exit@^3.0.3: +signal-exit@^3.0.3: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -11194,6 +11167,11 @@ tiny-warning@^1.0.0: resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== +tinyexec@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/tinyexec/-/tinyexec-0.3.2.tgz#941794e657a85e496577995c6eef66f53f42b3d2" + integrity sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA== + tldts-core@^6.1.47: version "6.1.47" resolved "https://registry.yarnpkg.com/tldts-core/-/tldts-core-6.1.47.tgz#bb6deb97abb6ef04243af60968d2d0055a65cbd7" @@ -11304,16 +11282,11 @@ tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^2.0.0, tslib@^2.4.0: +tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.4.0, tslib@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== -tslib@^2.0.3, tslib@^2.1.0, tslib@^2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" - integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== - type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" From 4c52f71ba01d7c21e692f6b56a2e7a90914fd91e Mon Sep 17 00:00:00 2001 From: William Durand Date: Tue, 4 Nov 2025 09:45:53 +0100 Subject: [PATCH 2/3] run prettier --- .stylelintrc | 12 ++------- docs/experiments.md | 3 --- docs/moz-addon-manager.md | 1 - src/amo/components/AMInstallButton/index.js | 5 ++-- src/amo/components/AddonAdminLinks/index.js | 5 ++-- src/amo/components/Button/styles.scss | 4 ++- src/amo/components/ContributeCard/index.js | 5 ++-- .../components/Errors/NotAuthorized/index.js | 5 ++-- .../components/Errors/ServerError/index.js | 5 ++-- src/amo/components/HostPermissions/index.js | 5 ++-- src/amo/components/PermissionsCard/index.js | 5 ++-- src/amo/components/SearchResults/index.js | 5 ++-- src/amo/components/SectionLinks/styles.scss | 3 ++- src/amo/components/SignedInUser/index.js | 5 ++-- src/amo/components/UserCollection/index.js | 5 ++-- src/amo/components/UserReview/index.js | 5 ++-- src/amo/components/VPNPromoBanner/styles.scss | 4 ++- src/amo/css/inc/mixins.scss | 4 ++- src/amo/css/inc/vars.scss | 5 ++-- src/amo/errorHandler.js | 12 ++++----- src/fonts/inter-subset.scss | 13 ++++----- src/fonts/inter.scss | 13 ++++----- tests/unit/amo/pages/TestAddon.js | 5 ++-- .../unit/amo/reducers/test_addonsByAuthors.js | 12 +++------ tests/unit/amo/test_errorHandler.js | 2 +- tests/unit/helpers.js | 27 ++++++++++--------- 26 files changed, 80 insertions(+), 95 deletions(-) diff --git a/.stylelintrc b/.stylelintrc index b39496a7a75..fa796e445ce 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -30,15 +30,6 @@ ], } ], - "block-closing-brace-newline-after": [ - "always", - { - "ignoreAtRules": [ - "if", - "else" - ], - } - ], "color-function-notation": null, "declaration-colon-newline-after": null, "function-disallowed-list": [ @@ -68,6 +59,7 @@ ] } ], + "scss/dollar-variable-colon-space-after": "always-single-line", "scss/dollar-variable-pattern": null, "scss/no-global-function-names": null, "selector-class-pattern": "^([a-zA-Z][a-zA-Z0-9]*)([-[a-zA-Z0-9]+|--[a-zA-Z0-9]+])*$", @@ -77,4 +69,4 @@ "value-list-comma-newline-after": null, "selector-not-notation": "simple" } -} \ No newline at end of file +} diff --git a/docs/experiments.md b/docs/experiments.md index db93e74802b..ff2db6f4a61 100644 --- a/docs/experiments.md +++ b/docs/experiments.md @@ -7,11 +7,9 @@ AMO has the ability to run experiments, automatically dividing users into branch The following are the steps to add an experiment to AMO: 1. Create a config file for the experiment in `amo/experiments`. - - The file should be named with the `experimentId`, e.g., `20210714_amo_vpn_promo.js`. - `experimentId` must be in the format `YYYYMMDD_amo_experimentName`. We generally use the date that the code was written for the YYYYMMDD portion. - The config file should export a `EXPERIMENT_CONFIG` variable, which is an object containing: - - `id`, which is the same as the `experimentId`, above. - `variants`, which is an array of possible branches to which a user might be assigned. Each item in this array is an object with an `id` (which ends up being the experiment branch/variation) and a `percentage`, which is used to automatically allocate users to branches, and is expressed as number less than 1 (e.g., `0.5` means 50%). The sum total of all `percentage`s in the array must equal `1` or an error will be thrown. There is a special variant, `NOT_IN_EXPERIMENT`, which can be imported from `amo/withExperiment`, and any users allocated to that branch will be treated as not being enrolled in the experiment. - optionally a `shouldExcludeUser` function, which accepts a single object argument `{ state }` and returns a boolean. If this function returns `true` then the user will be excluded from the experiment. If this property is missing, then no users will be excluded. @@ -59,7 +57,6 @@ The following are the steps to add an experiment to AMO: The example `shouldExcludeUser` function returns the result of the internal `shouldExcludeUser` function, which uses `clientApp` and `regionCode` from `state.api` to exclude users on the `android` site, as well as any users with a region other than `US`, `DE` or `FR`. 2. Update AMO's config to enable the experiment. - - The default config file, `config/default.js`, contains an `experiments` property, which lists existing experiments along with their current enabled status. To enable an experiment, add it to the `experiments` object, using the `experimentId` as the key, and set the value to `true`. For example: ```js diff --git a/docs/moz-addon-manager.md b/docs/moz-addon-manager.md index 2c6ae62636f..8ba852a3e92 100644 --- a/docs/moz-addon-manager.md +++ b/docs/moz-addon-manager.md @@ -59,7 +59,6 @@ It is possible to serve the local development version of this project with HTTPS ``` 4. In a custom Firefox profile, go to `about:config`, accept the risk, and set these prefs. Afterwards, restart Firefox for them to take effect. - - set `extensions.webapi.testing` to `true` [to turn on `mozAddonManager`](#turning-on-mozaddonmanager-in--dev-and--stage-environments) - set `xpinstall.signatures.dev-root` to `true` [to install add-ons](#install-add-ons-in--dev-and--stage-environments) diff --git a/src/amo/components/AMInstallButton/index.js b/src/amo/components/AMInstallButton/index.js index a784d5b93e7..40f5eefd506 100644 --- a/src/amo/components/AMInstallButton/index.js +++ b/src/amo/components/AMInstallButton/index.js @@ -253,8 +253,7 @@ export class AMInstallButtonBase extends React.Component { } } -const AMInstallButton: React.ComponentType = compose(translate())( - AMInstallButtonBase, -); +const AMInstallButton: React.ComponentType = + compose(translate())(AMInstallButtonBase); export default AMInstallButton; diff --git a/src/amo/components/AddonAdminLinks/index.js b/src/amo/components/AddonAdminLinks/index.js index 0d68df1bbb8..daf30ec69f8 100644 --- a/src/amo/components/AddonAdminLinks/index.js +++ b/src/amo/components/AddonAdminLinks/index.js @@ -110,8 +110,7 @@ export class AddonAdminLinksBase extends React.Component { } } -const AddonAdminLinks: React.ComponentType = compose(translate())( - AddonAdminLinksBase, -); +const AddonAdminLinks: React.ComponentType = + compose(translate())(AddonAdminLinksBase); export default AddonAdminLinks; diff --git a/src/amo/components/Button/styles.scss b/src/amo/components/Button/styles.scss index 5e381b4f152..c7ecb9fede0 100644 --- a/src/amo/components/Button/styles.scss +++ b/src/amo/components/Button/styles.scss @@ -25,7 +25,9 @@ $micro-font-size: $font-size-xs; margin: 0; padding: 0 8px; text-decoration: none; - transition-duration: all $transition-long, padding $transition-short; + transition-duration: + all $transition-long, + padding $transition-short; transition-property: background-color border-color color; transition-timing-function: $easing-curve; diff --git a/src/amo/components/ContributeCard/index.js b/src/amo/components/ContributeCard/index.js index 44af389f27f..7aeea9cf978 100644 --- a/src/amo/components/ContributeCard/index.js +++ b/src/amo/components/ContributeCard/index.js @@ -121,8 +121,7 @@ export const ContributeCardBase = ({ ); }; -const ContributeCard: React.ComponentType = compose(translate())( - ContributeCardBase, -); +const ContributeCard: React.ComponentType = + compose(translate())(ContributeCardBase); export default ContributeCard; diff --git a/src/amo/components/Errors/NotAuthorized/index.js b/src/amo/components/Errors/NotAuthorized/index.js index 31121b5aef2..b26521fa452 100644 --- a/src/amo/components/Errors/NotAuthorized/index.js +++ b/src/amo/components/Errors/NotAuthorized/index.js @@ -48,8 +48,7 @@ export class NotAuthorizedBase extends React.Component { } } -const NotAuthorized: React.ComponentType = compose(translate())( - NotAuthorizedBase, -); +const NotAuthorized: React.ComponentType = + compose(translate())(NotAuthorizedBase); export default NotAuthorized; diff --git a/src/amo/components/Errors/ServerError/index.js b/src/amo/components/Errors/ServerError/index.js index 5f853c5fc42..05db5270224 100644 --- a/src/amo/components/Errors/ServerError/index.js +++ b/src/amo/components/Errors/ServerError/index.js @@ -44,8 +44,7 @@ export class ServerErrorBase extends React.Component { } } -const ServerError: React.ComponentType = compose(translate())( - ServerErrorBase, -); +const ServerError: React.ComponentType = + compose(translate())(ServerErrorBase); export default ServerError; diff --git a/src/amo/components/HostPermissions/index.js b/src/amo/components/HostPermissions/index.js index 0b5ba54c789..9c937197c4b 100644 --- a/src/amo/components/HostPermissions/index.js +++ b/src/amo/components/HostPermissions/index.js @@ -151,8 +151,7 @@ export class HostPermissionsBase extends React.Component { } } -const HostPermissions: React.ComponentType = compose(translate())( - HostPermissionsBase, -); +const HostPermissions: React.ComponentType = + compose(translate())(HostPermissionsBase); export default HostPermissions; diff --git a/src/amo/components/PermissionsCard/index.js b/src/amo/components/PermissionsCard/index.js index 2e5199377bb..df1595e73d4 100644 --- a/src/amo/components/PermissionsCard/index.js +++ b/src/amo/components/PermissionsCard/index.js @@ -145,8 +145,7 @@ export class PermissionsCardBase extends React.Component { } } -const PermissionsCard: React.ComponentType = compose(translate())( - PermissionsCardBase, -); +const PermissionsCard: React.ComponentType = + compose(translate())(PermissionsCardBase); export default PermissionsCard; diff --git a/src/amo/components/SearchResults/index.js b/src/amo/components/SearchResults/index.js index 27bd4f6b727..6c1fe2392ff 100644 --- a/src/amo/components/SearchResults/index.js +++ b/src/amo/components/SearchResults/index.js @@ -81,8 +81,7 @@ export class SearchResultsBase extends React.Component { } } -const SearchResults: React.ComponentType = compose(translate())( - SearchResultsBase, -); +const SearchResults: React.ComponentType = + compose(translate())(SearchResultsBase); export default SearchResults; diff --git a/src/amo/components/SectionLinks/styles.scss b/src/amo/components/SectionLinks/styles.scss index 25e14e6b778..90e0745b507 100644 --- a/src/amo/components/SectionLinks/styles.scss +++ b/src/amo/components/SectionLinks/styles.scss @@ -37,7 +37,8 @@ display: block; height: 3px; margin: auto; - transition: width $transition-short ease, + transition: + width $transition-short ease, background-color $transition-short ease; width: 0; } diff --git a/src/amo/components/SignedInUser/index.js b/src/amo/components/SignedInUser/index.js index 7fe8d71edf4..29b450e0192 100644 --- a/src/amo/components/SignedInUser/index.js +++ b/src/amo/components/SignedInUser/index.js @@ -35,8 +35,7 @@ const SignedInUserBase = (props: InternalProps) => ( ); -const SignedInUser: React.ComponentType = compose(translate())( - SignedInUserBase, -); +const SignedInUser: React.ComponentType = + compose(translate())(SignedInUserBase); export default SignedInUser; diff --git a/src/amo/components/UserCollection/index.js b/src/amo/components/UserCollection/index.js index 6913826093e..526a7fb7bdf 100644 --- a/src/amo/components/UserCollection/index.js +++ b/src/amo/components/UserCollection/index.js @@ -64,8 +64,7 @@ export const UserCollectionBase = (props: InternalProps): React.Node => { ); }; -const UserCollection: React.ComponentType = compose(translate())( - UserCollectionBase, -); +const UserCollection: React.ComponentType = + compose(translate())(UserCollectionBase); export default UserCollection; diff --git a/src/amo/components/UserReview/index.js b/src/amo/components/UserReview/index.js index 21313982d73..36eeb2d3b6e 100644 --- a/src/amo/components/UserReview/index.js +++ b/src/amo/components/UserReview/index.js @@ -109,8 +109,7 @@ export const UserReviewBase = (props: InternalProps): React.Node => { ); }; -const UserReview: React.ComponentType = compose(translate())( - UserReviewBase, -); +const UserReview: React.ComponentType = + compose(translate())(UserReviewBase); export default UserReview; diff --git a/src/amo/components/VPNPromoBanner/styles.scss b/src/amo/components/VPNPromoBanner/styles.scss index 09caeb79b7d..9e2a37ed830 100644 --- a/src/amo/components/VPNPromoBanner/styles.scss +++ b/src/amo/components/VPNPromoBanner/styles.scss @@ -31,7 +31,9 @@ $cta-alternate-color: #f9f7fd; padding: 0.5rem 1rem; position: relative; text-decoration: none; - transition: background-color 0.15s ease, color 0.15s ease; + transition: + background-color 0.15s ease, + color 0.15s ease; } a:hover, diff --git a/src/amo/css/inc/mixins.scss b/src/amo/css/inc/mixins.scss index e509672cd7d..f08dd68c358 100644 --- a/src/amo/css/inc/mixins.scss +++ b/src/amo/css/inc/mixins.scss @@ -56,7 +56,9 @@ /* Shared mixins. Bear in mind changes here impact *all* apps. */ @mixin focus() { - box-shadow: 0 0 0 1px $blue-50 inset, 0 0 0 1px $blue-50, + box-shadow: + 0 0 0 1px $blue-50 inset, + 0 0 0 1px $blue-50, 0 0 0 4px transparentize($blue-50, 0.7); outline: none; } diff --git a/src/amo/css/inc/vars.scss b/src/amo/css/inc/vars.scss index 51710355962..00238c4b400 100644 --- a/src/amo/css/inc/vars.scss +++ b/src/amo/css/inc/vars.scss @@ -118,5 +118,6 @@ $header-text-not-active-color: transparentize($white, 0.5); // Category Colors // There are currently 12 colors and this number must be kept in sync with // `src/amo/components/Categories/index.js`. -$category-colors: $teal-70, $red-60, $magenta-60, $orange-60, $blue-50, - $green-70, $magenta-70, $red-50, $purple-40, $orange-70, $blue-60, $yellow-70; +$category-colors: + $teal-70, $red-60, $magenta-60, $orange-60, $blue-50, $green-70, $magenta-70, + $red-50, $purple-40, $orange-70, $blue-60, $yellow-70; diff --git a/src/amo/errorHandler.js b/src/amo/errorHandler.js index ceabdb2f91b..0857f96f6e3 100644 --- a/src/amo/errorHandler.js +++ b/src/amo/errorHandler.js @@ -2,12 +2,12 @@ import * as React from 'react'; import { compose } from 'redux'; import { connect } from 'react-redux'; import { oneLine } from 'common-tags'; +import PropTypes from 'prop-types'; import log from 'amo/logger'; import { normalizeFileNameId } from 'amo/utils'; import ErrorList from 'amo/components/ErrorList'; import { clearError, setError, setErrorMessage } from 'amo/reducers/errors'; -import type { ErrorHandlerType } from 'amo/types/errorHandler'; function generateHandlerId({ name = '' } = {}) { return `${name}-${Math.random().toString(36).substr(2, 9)}`; @@ -222,12 +222,8 @@ export const withFixedErrorHandler = ({ fileName, extractId }) => { * )(SomeComponent); */ export function withRenderedErrorHandler({ name, id } = {}) { - type ErrorBannerProps = {| - errorHandler: ErrorHandlerType, - |}; - return (WrappedComponent) => { - function ErrorBanner(props: ErrorBannerProps) { + function ErrorBanner(props) { const { errorHandler } = props; if (errorHandler.hasError()) { @@ -242,6 +238,10 @@ export function withRenderedErrorHandler({ name, id } = {}) { return ; } + ErrorBanner.propTypes = { + errorHandler: PropTypes.object.isRequired, + }; + return compose(withErrorHandler({ name, id }))(ErrorBanner); }; } diff --git a/src/fonts/inter-subset.scss b/src/fonts/inter-subset.scss index f721b56ba42..a9157107b60 100644 --- a/src/fonts/inter-subset.scss +++ b/src/fonts/inter-subset.scss @@ -6,10 +6,11 @@ font-weight: 300 600; /* We only need those weights */ src: url('woff2/Inter-roman-subset-en_de_fr_ru_es_pt_pl_it.var.woff2') format('woff2'); - unicode-range: U+20-7E, U+A0, U+A1, U+A3, U+A7, U+A9, U+AB, U+AE, U+B0-B5, - U+BB, U+BF-C4, U+C6-CF, U+D1-D7, U+D9-DC, U+DF-E4, U+E6-EF, U+F1-F7, U+F9-FD, - U+FF, U+104-107, U+10D, U+118, U+119, U+11B, U+141-144, U+152, U+153, - U+159-15B, U+161, U+178-17C, U+17E, U+401, U+410-44F, U+451, U+2010-2015, - U+2018-201A, U+201C-201E, U+2024, U+2026, U+202F, U+2032, U+2033, U+2080, - U+20AC, U+2122, U+2192, U+2605, U+2665; + unicode-range: + U+20-7E, U+A0, U+A1, U+A3, U+A7, U+A9, U+AB, U+AE, U+B0-B5, U+BB, U+BF-C4, + U+C6-CF, U+D1-D7, U+D9-DC, U+DF-E4, U+E6-EF, U+F1-F7, U+F9-FD, U+FF, + U+104-107, U+10D, U+118, U+119, U+11B, U+141-144, U+152, U+153, U+159-15B, + U+161, U+178-17C, U+17E, U+401, U+410-44F, U+451, U+2010-2015, U+2018-201A, + U+201C-201E, U+2024, U+2026, U+202F, U+2032, U+2033, U+2080, U+20AC, U+2122, + U+2192, U+2605, U+2665; } diff --git a/src/fonts/inter.scss b/src/fonts/inter.scss index 75a1f6abd6a..74fdc0d34e9 100644 --- a/src/fonts/inter.scss +++ b/src/fonts/inter.scss @@ -5,12 +5,13 @@ font-style: normal; font-weight: 300 600; /* We only need those weights */ src: url('woff2/Inter-roman.var.woff2') format('woff2'); - unicode-range: U+20-7E, U+A0-148, U+14A-1C3, U+1C5-31E, U+321-362, U+370-377, - U+37A-37F, U+384-38A, U+38C, U+38E-3A1, U+3A3-3E1, U+3F0-49D, U+4A0-4FF, - U+52F, U+1D43, U+1D47-1D49, U+1D4D, U+1D4F, U+1D50, U+1D52, U+1D56-1D58, - U+1D5B, U+1D62-1D65, U+1D9C, U+1DA0, U+1DBB, U+1DBF, U+1E00-1F15, - U+1F18-1F1D, U+1F20-1F45, U+1F48-1F4D, U+1F50-1F57, U+1F59, U+1F5B, U+1F5D, - U+1F5F-1F7D, U+1F80-1FB4, U+1FB6-1FC4, U+1FC6-1FD3, U+1FD6-1FDB, U+1FDD-1FEF, + unicode-range: + U+20-7E, U+A0-148, U+14A-1C3, U+1C5-31E, U+321-362, U+370-377, U+37A-37F, + U+384-38A, U+38C, U+38E-3A1, U+3A3-3E1, U+3F0-49D, U+4A0-4FF, U+52F, U+1D43, + U+1D47-1D49, U+1D4D, U+1D4F, U+1D50, U+1D52, U+1D56-1D58, U+1D5B, + U+1D62-1D65, U+1D9C, U+1DA0, U+1DBB, U+1DBF, U+1E00-1F15, U+1F18-1F1D, + U+1F20-1F45, U+1F48-1F4D, U+1F50-1F57, U+1F59, U+1F5B, U+1F5D, U+1F5F-1F7D, + U+1F80-1FB4, U+1FB6-1FC4, U+1FC6-1FD3, U+1FD6-1FDB, U+1FDD-1FEF, U+1FF2-1FF4, U+1FF6-1FFE, U+2000-200B, U+2010-2027, U+202F-205F, U+2080, U+20A0-20BF, U+2100, U+2101, U+2103, U+2105, U+2106, U+2109, U+2113, U+2116, U+2117, U+211E-2123, U+2126, U+212A, U+212B, U+212E, U+2132, U+213B, U+214D, diff --git a/tests/unit/amo/pages/TestAddon.js b/tests/unit/amo/pages/TestAddon.js index 8d62a1a947f..f9a9128e1f0 100644 --- a/tests/unit/amo/pages/TestAddon.js +++ b/tests/unit/amo/pages/TestAddon.js @@ -1941,9 +1941,8 @@ describe(__filename, () => { renderWithAddon(); expect(screen.getByText('Permissions and data')).toBeInTheDocument(); - const learnMoreLink = within(getPermissionsCard()).getByText( - 'Learn more', - ); + const learnMoreLink = + within(getPermissionsCard()).getByText('Learn more'); expect(learnMoreLink).toHaveAttribute( 'href', 'https://support.mozilla.org/kb/permission-request-messages-firefox-extensions', diff --git a/tests/unit/amo/reducers/test_addonsByAuthors.js b/tests/unit/amo/reducers/test_addonsByAuthors.js index a27b8cca023..d4bc79aa4e0 100644 --- a/tests/unit/amo/reducers/test_addonsByAuthors.js +++ b/tests/unit/amo/reducers/test_addonsByAuthors.js @@ -334,10 +334,8 @@ describe(__filename, () => { ); expect(state.loadingFor).toMatchObject({ - [joinAuthorIdsAndAddonType( - [randomAuthorId1], - ADDON_TYPE_STATIC_THEME, - )]: true, + [joinAuthorIdsAndAddonType([randomAuthorId1], ADDON_TYPE_STATIC_THEME)]: + true, }); }); }); @@ -515,10 +513,8 @@ describe(__filename, () => { ); expect(state.loadingFor).toMatchObject({ - [joinAuthorIdsAndAddonType( - [randomAuthorId1], - ADDON_TYPE_STATIC_THEME, - )]: false, + [joinAuthorIdsAndAddonType([randomAuthorId1], ADDON_TYPE_STATIC_THEME)]: + false, }); }); diff --git a/tests/unit/amo/test_errorHandler.js b/tests/unit/amo/test_errorHandler.js index dc0dd0c7fa0..3635a9cea7a 100644 --- a/tests/unit/amo/test_errorHandler.js +++ b/tests/unit/amo/test_errorHandler.js @@ -27,7 +27,7 @@ class SomeComponentBase extends React.Component { errorHandler: PropTypes.object, }; - handleError: () => void = () => { + handleError = () => { this.props.errorHandler.handle(new Error()); }; diff --git a/tests/unit/helpers.js b/tests/unit/helpers.js index a1511af20b5..4e67a6b4ad7 100644 --- a/tests/unit/helpers.js +++ b/tests/unit/helpers.js @@ -1059,20 +1059,23 @@ export const getMockConfig = (overrides = {}) => { * mockWindow.expects('fetch').withArgs(urlWithTheseParams({ page: 1 })) */ export const urlWithTheseParams = (params) => { - return sinon.match((urlString) => { - const { query } = urllib.parse(urlString, true); - - for (const param in params) { - if ( - query[param] === undefined || - query[param] !== params[param].toString() - ) { - return false; + return sinon.match( + (urlString) => { + const { query } = urllib.parse(urlString, true); + + for (const param in params) { + if ( + query[param] === undefined || + query[param] !== params[param].toString() + ) { + return false; + } } - } - return true; - }, `urlWithTheseParams(${JSON.stringify(params)})`); + return true; + }, + `urlWithTheseParams(${JSON.stringify(params)})`, + ); }; /* From 6620885dde9a6dcc00c87f0f0c32250fb3d33a94 Mon Sep 17 00:00:00 2001 From: William Durand Date: Tue, 4 Nov 2025 19:46:53 +0100 Subject: [PATCH 3/3] fix bin/regenerate_font.js --- bin/regenerate_font.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/regenerate_font.js b/bin/regenerate_font.js index 166948abe75..5443dda892b 100755 --- a/bin/regenerate_font.js +++ b/bin/regenerate_font.js @@ -13,7 +13,7 @@ function getUnicodeRangeFromFile(file) { } function regenerateFonts() { - import('characterset').then((characterset) => { + import('characterset').then(async (characterset) => { const CharacterSet = characterset.default; @@ -90,12 +90,12 @@ function regenerateFonts() { unicode-range: ${characterSetFromFile.toHexRangeString()}; } `; - const runPrettierWithConfig = (text) => { - const filePath = prettier.resolveConfigFile.sync(); - const options = prettier.resolveConfig.sync(filePath); + const runPrettierWithConfig = async (text) => { + const filePath = await prettier.resolveConfigFile(); + const options = await prettier.resolveConfig(filePath); return prettier.format(text, { ...options, parser: 'scss' }); }; - fs.writeFileSync(`src/fonts/${cssFile}`, runPrettierWithConfig(cssContents)); + fs.writeFileSync(`src/fonts/${cssFile}`, await runPrettierWithConfig(cssContents)); console.info('Generating html...'); const htmlContents = `