diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5c01b1e..d4ec222 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -8,14 +8,10 @@ jobs: steps: - name: Check out repository code uses: actions/checkout@v4 - with: - persist-credentials: false - - name: Setup node uses: actions/setup-node@v4 with: node-version: 20 cache: yarn - - name: Run linter run: yarn lint diff --git a/package.json b/package.json index aedd8f7..7db7c1d 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "react-native": ">=0.40.0" }, "devDependencies": { - "prettier": "^3.2.5", - "semantic-release": "^23.0.7" + "prettier": "^3.3.2", + "semantic-release": "^23.1.1" } } diff --git a/src/android.js b/src/android.js index 1abbe49..cf1fdc4 100644 --- a/src/android.js +++ b/src/android.js @@ -28,7 +28,7 @@ const titles = { export async function getEmailClients() { if (!("Email" in NativeModules)) { throw new EmailException( - "NativeModules.Email does not exist. Check if you installed the Android dependencies correctly." + "NativeModules.Email does not exist. Check if you installed the Android dependencies correctly.", ); } @@ -73,7 +73,7 @@ export async function openInbox(options = {}) { // We can't pre-choose, since we use native intents if (!("Email" in NativeModules)) { throw new EmailException( - "NativeModules.Email does not exist. Check if you installed the Android dependencies correctly." + "NativeModules.Email does not exist. Check if you installed the Android dependencies correctly.", ); } @@ -130,7 +130,7 @@ export async function openComposer(options = {}) { options.subject || "", body, options.cc, - options.bcc + options.bcc, ); } @@ -140,6 +140,6 @@ export async function openComposer(options = {}) { options.subject || "", body, options.cc, - options.bcc + options.bcc, ); } diff --git a/src/ios.js b/src/ios.js index 2e8d1ce..99280d5 100644 --- a/src/ios.js +++ b/src/ios.js @@ -186,7 +186,7 @@ export function askAppChoice( cancelLabel = "Cancel", removeText = false, defaultEmailLabel = "Default email reader", - actionType = "open" + actionType = "open", ) { return new Promise(async (resolve, reject) => { let availableApps = []; @@ -207,7 +207,7 @@ export function askAppChoice( let options = availableApps.map((app) => actionType === "compose" && app === "apple-mail" ? defaultEmailLabel - : titles[app] + : titles[app], ); options.push(cancelLabel); @@ -222,7 +222,7 @@ export function askAppChoice( return resolve(null); } return resolve(availableApps[buttonIndex]); - } + }, ); }); } @@ -248,27 +248,22 @@ async function getApp(options, actionType) { throw new EmailException( 'Option `app` should be undefined, null, or one of the following: "' + Object.keys(prefixes).join('", "') + - '".' + '".', ); } let { app = null } = options; if (!app) { - const { - title, - message, - cancelLabel, - removeText, - defaultEmailLabel, - } = options; + const { title, message, cancelLabel, removeText, defaultEmailLabel } = + options; app = await askAppChoice( title, message, cancelLabel, removeText, defaultEmailLabel, - actionType + actionType, ); } diff --git a/yarn.lock b/yarn.lock index 428757b..83e7691 100644 --- a/yarn.lock +++ b/yarn.lock @@ -367,6 +367,11 @@ "@pnpm/network.ca-file" "^1.0.1" config-chain "^1.1.11" +"@sec-ant/readable-stream@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@sec-ant/readable-stream/-/readable-stream-0.4.1.tgz#60de891bb126abfdc5410fdc6166aca065f10a0c" + integrity sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg== + "@semantic-release/commit-analyzer@^12.0.0": version "12.0.0" resolved "https://registry.yarnpkg.com/@semantic-release/commit-analyzer/-/commit-analyzer-12.0.0.tgz#7219b05ab79a4303c99fc9cd0413d68881599270" @@ -496,6 +501,11 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz#719df7fb41766bc143369eaa0dd56d8dc87c9958" integrity sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg== +"@sindresorhus/merge-streams@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/merge-streams/-/merge-streams-4.0.0.tgz#abb11d99aeb6d27f1b563c38147a72d50058e339" + integrity sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ== + "@tufjs/canonical-json@2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-2.0.0.tgz#a52f61a3d7374833fca945b2549bc30a2dd40d0a" @@ -1071,6 +1081,24 @@ execa@^8.0.0: signal-exit "^4.1.0" strip-final-newline "^3.0.0" +execa@^9.0.0: + version "9.3.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-9.3.0.tgz#b10b70f52c1a978985e8492cc1fa74795c59963c" + integrity sha512-l6JFbqnHEadBoVAVpN5dl2yCyfX28WoBAGaoQcNmLLSedOxTxcn2Qa83s8I/PA5i56vWru2OHOtrwF7Om2vqlg== + dependencies: + "@sindresorhus/merge-streams" "^4.0.0" + cross-spawn "^7.0.3" + figures "^6.1.0" + get-stream "^9.0.0" + human-signals "^7.0.0" + is-plain-obj "^4.1.0" + is-stream "^4.0.1" + npm-run-path "^5.2.0" + pretty-ms "^9.0.0" + signal-exit "^4.1.0" + strip-final-newline "^4.0.0" + yoctocolors "^2.0.0" + exponential-backoff@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" @@ -1106,7 +1134,7 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" -figures@^6.0.0: +figures@^6.0.0, figures@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/figures/-/figures-6.1.0.tgz#935479f51865fa7479f6fa94fc6fc7ac14e62c4a" integrity sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg== @@ -1223,6 +1251,14 @@ get-stream@^8.0.1: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-8.0.1.tgz#def9dfd71742cd7754a7761ed43749a27d02eca2" integrity sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA== +get-stream@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-9.0.1.tgz#95157d21df8eb90d1647102b63039b1df60ebd27" + integrity sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA== + dependencies: + "@sec-ant/readable-stream" "^0.4.1" + is-stream "^4.0.1" + git-log-parser@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/git-log-parser/-/git-log-parser-1.2.0.tgz#2e6a4c1b13fc00028207ba795a7ac31667b9fd4a" @@ -1352,6 +1388,11 @@ human-signals@^5.0.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" integrity sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ== +human-signals@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-7.0.0.tgz#93e58e0c19cfec1dded4af10cd4969f5ab75f6c8" + integrity sha512-74kytxOUSvNbjrT9KisAbaTZ/eJwD/LrbM/kh5j0IhPuJzwuA19dWvniFGwBzN9rVjg+O/e+F310PjObDXS+9Q== + iconv-lite@^0.6.2: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" @@ -1512,11 +1553,21 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== +is-plain-obj@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-4.1.0.tgz#d65025edec3657ce032fd7db63c97883eaed71f0" + integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg== + is-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-3.0.0.tgz#e6bfd7aa6bef69f4f472ce9bb681e3e57b4319ac" integrity sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA== +is-stream@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-4.0.1.tgz#375cf891e16d2e4baec250b85926cffc14720d9b" + integrity sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A== + is-text-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-2.0.0.tgz#b2484e2b720a633feb2e85b67dc193ff72c75636" @@ -2129,7 +2180,7 @@ npm-registry-fetch@^16.0.0, npm-registry-fetch@^16.2.0: npm-package-arg "^11.0.0" proc-log "^3.0.0" -npm-run-path@^5.1.0: +npm-run-path@^5.1.0, npm-run-path@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-5.3.0.tgz#e23353d0ebb9317f174e93417e4a4d82d0249e9f" integrity sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ== @@ -2360,6 +2411,11 @@ parse-json@^8.0.0: index-to-position "^0.1.2" type-fest "^4.7.1" +parse-ms@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-4.0.0.tgz#c0c058edd47c2a590151a718990533fd62803df4" + integrity sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw== + parse5-htmlparser2-tree-adapter@^6.0.0: version "6.0.1" resolved "https://registry.yarnpkg.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz#2cdf9ad823321140370d4dbf5d3e92c7c8ddc6e6" @@ -2441,10 +2497,17 @@ postcss-selector-parser@^6.0.10: cssesc "^3.0.0" util-deprecate "^1.0.2" -prettier@^3.2.5: - version "3.2.5" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368" - integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A== +prettier@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.2.tgz#03ff86dc7c835f2d2559ee76876a3914cec4a90a" + integrity sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA== + +pretty-ms@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-9.0.0.tgz#53c57f81171c53be7ce3fd20bdd4265422bc5929" + integrity sha512-E9e9HJ9R9NasGOgPaPE8VMeiPKAyWR5jcFpNnwIejslIhWqdqOrb2wShBsncMPUb+BcCd2OPYfh7p2W6oemTng== + dependencies: + parse-ms "^4.0.0" proc-log@^3.0.0: version "3.0.0" @@ -2534,6 +2597,15 @@ read-package-json@^7.0.0: normalize-package-data "^6.0.0" npm-normalize-package-bin "^3.0.0" +read-package-up@^11.0.0: + version "11.0.0" + resolved "https://registry.yarnpkg.com/read-package-up/-/read-package-up-11.0.0.tgz#71fb879fdaac0e16891e6e666df22de24a48d5ba" + integrity sha512-MbgfoNPANMdb4oRBNg5eqLbB2t2r+o5Ua1pNt8BqGp4I0FJZhuVSOj3PaBPni4azWuSzEdNn2evevzVmEk1ohQ== + dependencies: + find-up-simple "^1.0.0" + read-pkg "^9.0.0" + type-fest "^4.6.0" + read-pkg-up@^11.0.0: version "11.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-11.0.0.tgz#8916ffc6af2a7538b43bcc2c6445d4450ffe5a74" @@ -2623,10 +2695,10 @@ safe-buffer@~5.1.0, safe-buffer@~5.1.1: resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -semantic-release@^23.0.7: - version "23.0.7" - resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-23.0.7.tgz#fc34d0472ebdb5fde1b5b93a31df97b44e17dac4" - integrity sha512-PFxXQE57zrYiCbWKkdsVUF08s0SifEw3WhDhrN47ZEUWQiLl21FI9Dg/H8g7i/lPx0IkF6u7PjJbgxPceXKBeg== +semantic-release@^23.1.1: + version "23.1.1" + resolved "https://registry.yarnpkg.com/semantic-release/-/semantic-release-23.1.1.tgz#5c1a058748f4001f1c730716134a70b9e8e5b311" + integrity sha512-qqJDBhbtHsjUEMsojWKGuL5lQFCJuPtiXKEIlFKyTzDDGTAE/oyvznaP8GeOr5PvcqBJ6LQz4JCENWPLeehSpA== dependencies: "@semantic-release/commit-analyzer" "^12.0.0" "@semantic-release/error" "^4.0.0" @@ -2637,7 +2709,7 @@ semantic-release@^23.0.7: cosmiconfig "^9.0.0" debug "^4.0.0" env-ci "^11.0.0" - execa "^8.0.0" + execa "^9.0.0" figures "^6.0.0" find-versions "^6.0.0" get-stream "^6.0.0" @@ -2651,7 +2723,7 @@ semantic-release@^23.0.7: micromatch "^4.0.2" p-each-series "^3.0.0" p-reduce "^3.0.0" - read-pkg-up "^11.0.0" + read-package-up "^11.0.0" resolve-from "^5.0.0" semver "^7.3.2" semver-diff "^4.0.0" @@ -2871,6 +2943,11 @@ strip-final-newline@^3.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd" integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw== +strip-final-newline@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-4.0.0.tgz#35a369ec2ac43df356e3edd5dcebb6429aa1fa5c" + integrity sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw== + strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -3213,3 +3290,8 @@ yargs@^17.5.1: string-width "^4.2.3" y18n "^5.0.5" yargs-parser "^21.1.1" + +yoctocolors@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/yoctocolors/-/yoctocolors-2.1.0.tgz#27c6b15d38f7659d640580a7c4981bd56b59bcb9" + integrity sha512-FsQpXXeOEe05tcJN4Z2eicuC6+6KiJdBbPOAChanSkwwjZ277XGsh8wh/HaPuGeifTiw/7dgAzabitu2bnDvRg==