From bc3c3935b479060edb04153bca388656af797e79 Mon Sep 17 00:00:00 2001 From: Labhansh Agrawal Date: Sun, 16 Jul 2023 09:50:55 +0530 Subject: [PATCH 001/405] notifications and style-sheet > function component --- lib/components/notifications.tsx | 224 +++++++++++++++---------------- lib/components/style-sheet.tsx | 40 +++--- 2 files changed, 131 insertions(+), 133 deletions(-) diff --git a/lib/components/notifications.tsx b/lib/components/notifications.tsx index da63a70e..f9e71de7 100644 --- a/lib/components/notifications.tsx +++ b/lib/components/notifications.tsx @@ -7,126 +7,124 @@ import type {NotificationsProps} from '../hyper'; const Notification = decorate(Notification_, 'Notification'); -export default class Notifications extends React.PureComponent { - render() { - return ( -
- {this.props.customChildrenBefore} - {this.props.fontShowing && ( - - )} +const Notifications: React.FC = (props) => { + return ( +
+ {props.customChildrenBefore} + {props.fontShowing && ( + + )} - {this.props.resizeShowing && ( - - )} + {props.resizeShowing && ( + + )} - {this.props.messageShowing && ( - - {this.props.messageURL - ? [ - this.props.messageText, - ' (', - { - void window.require('electron').shell.openExternal(ev.currentTarget.href); - ev.preventDefault(); - }} - href={this.props.messageURL} - > - more - , - ') ' - ] - : null} - - )} - - {this.props.updateShowing && ( - - Version {this.props.updateVersion} ready. - {this.props.updateNote && ` ${this.props.updateNote.trim().replace(/\.$/, '')}`} ( - { - void window.require('electron').shell.openExternal(ev.currentTarget.href); - ev.preventDefault(); - }} - href={`https://github.com/vercel/hyper/releases/tag/${this.props.updateVersion}`} - > - notes - - ).{' '} - {this.props.updateCanInstall ? ( + {props.messageShowing && ( + + {props.messageURL ? ( + <> + {props.messageText} ( - Restart - - ) : ( - { void window.require('electron').shell.openExternal(ev.currentTarget.href); ev.preventDefault(); }} - href={this.props.updateReleaseUrl!} + href={props.messageURL} > - Download + more - )} - .{' '} - - )} - {this.props.customChildren} + ) + + ) : null} + + )} - -
- ); - } -} + {props.updateShowing && ( + + Version {props.updateVersion} ready. + {props.updateNote && ` ${props.updateNote.trim().replace(/\.$/, '')}`} ( + { + void window.require('electron').shell.openExternal(ev.currentTarget.href); + ev.preventDefault(); + }} + href={`https://github.com/vercel/hyper/releases/tag/${props.updateVersion}`} + > + notes + + ).{' '} + {props.updateCanInstall ? ( + + Restart + + ) : ( + { + void window.require('electron').shell.openExternal(ev.currentTarget.href); + ev.preventDefault(); + }} + href={props.updateReleaseUrl!} + > + Download + + )} + .{' '} + + )} + {props.customChildren} + + +
+ ); +}; + +export default Notifications; diff --git a/lib/components/style-sheet.tsx b/lib/components/style-sheet.tsx index 4cb0fdd3..f8079740 100644 --- a/lib/components/style-sheet.tsx +++ b/lib/components/style-sheet.tsx @@ -1,24 +1,24 @@ import React from 'react'; import type {StyleSheetProps} from '../hyper'; -export default class StyleSheet extends React.PureComponent { - render() { - const {borderColor} = this.props; +const StyleSheet: React.FC = (props) => { + const {borderColor} = props; - return ( - - ); - } -} + return ( + + ); +}; + +export default StyleSheet; From 6212d243151c3774c26e78fe39de328bfa549844 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 11:07:38 +0000 Subject: [PATCH 002/405] Bump recast from 0.23.2 to 0.23.3 in /app Bumps [recast](https://github.com/benjamn/recast) from 0.23.2 to 0.23.3. - [Release notes](https://github.com/benjamn/recast/releases) - [Commits](https://github.com/benjamn/recast/compare/v0.23.2...v0.23.3) --- updated-dependencies: - dependency-name: recast dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- app/package.json | 2 +- app/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/package.json b/app/package.json index a0095d53..f6d66416 100644 --- a/app/package.json +++ b/app/package.json @@ -33,7 +33,7 @@ "queue": "6.0.2", "react": "17.0.2", "react-dom": "17.0.2", - "recast": "0.23.2", + "recast": "0.23.3", "semver": "7.5.4", "shell-env": "3.0.1", "sudo-prompt": "^9.2.1", diff --git a/app/yarn.lock b/app/yarn.lock index c36909d9..a0e48bd8 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -836,10 +836,10 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -recast@0.23.2: - version "0.23.2" - resolved "https://registry.npmjs.org/recast/-/recast-0.23.2.tgz#d3dda3e8f0a3366860d7508c00e34a338ac52b41" - integrity sha512-Qv6cPfVZyMOtPszK6PgW70pUgm7gPlFitAPf0Q69rlOA0zLw2XdDcNmPbVGYicFGT9O8I7TZ/0ryJD+6COvIPw== +recast@0.23.3: + version "0.23.3" + resolved "https://registry.npmjs.org/recast/-/recast-0.23.3.tgz#f205d1f46b2c6f730de413ab18f96c166263d85f" + integrity sha512-HbCVFh2ANP6a09nzD4lx7XthsxMOJWKX5pIcUwtLrmeEIl3I0DwjCoVXDE0Aobk+7k/mS3H50FK4iuYArpcT6Q== dependencies: assert "^2.0.0" ast-types "^0.16.1" From fd93a2d85a9e612d5a92a8956407dc8b9e647832 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 11:40:35 +0000 Subject: [PATCH 003/405] Bump @babel/cli from 7.22.6 to 7.22.9 Bumps [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) from 7.22.6 to 7.22.9. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.22.9/packages/babel-cli) --- updated-dependencies: - dependency-name: "@babel/cli" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0504e71a..a792ae59 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "devDependencies": { "@ava/babel": "2.0.0", "@ava/typescript": "^4.1.0", - "@babel/cli": "7.22.6", + "@babel/cli": "7.22.9", "@babel/core": "7.22.8", "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-numeric-separator": "^7.18.6", diff --git a/yarn.lock b/yarn.lock index 1fa62407..c22ef120 100644 --- a/yarn.lock +++ b/yarn.lock @@ -60,10 +60,10 @@ escape-string-regexp "^5.0.0" execa "^7.1.1" -"@babel/cli@7.22.6": - version "7.22.6" - resolved "https://registry.npmjs.org/@babel/cli/-/cli-7.22.6.tgz#63f5be2a0abd587ccfbdc93424fa85f43142cc53" - integrity sha512-Be3/RfEDmkMRGT1+ru5nTkfcvWz5jDOYg1V9rXqTz2u9Qt96O1ryboGvxVBp7wOnYWDB8DNHIWb6DThrpudfOw== +"@babel/cli@7.22.9": + version "7.22.9" + resolved "https://registry.npmjs.org/@babel/cli/-/cli-7.22.9.tgz#501b3614aeda7399371f6d5991404f069b059986" + integrity sha512-nb2O7AThqRo7/E53EGiuAkMaRbb7J5Qp3RvN+dmua1U+kydm0oznkhqbTEG15yk26G/C3yL6OdZjzgl+DMXVVA== dependencies: "@jridgewell/trace-mapping" "^0.3.17" commander "^4.0.1" From c38cdc00a12d55f5c9cf4f38c008303f49f97187 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 11:41:06 +0000 Subject: [PATCH 004/405] Bump eslint from 8.44.0 to 8.45.0 Bumps [eslint](https://github.com/eslint/eslint) from 8.44.0 to 8.45.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v8.44.0...v8.45.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 31 +++++++------------------------ 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index a792ae59..79bdf9fd 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "electron-link": "^0.6.0", "electron-mksnapshot": "25.1.1", "electronmon": "^2.0.2", - "eslint": "8.44.0", + "eslint": "8.45.0", "eslint-config-prettier": "8.8.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-json-schema-validator": "^4.5.0", diff --git a/yarn.lock b/yarn.lock index c22ef120..5874e423 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3283,10 +3283,10 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4 resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994" integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA== -eslint@8.44.0: - version "8.44.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.44.0.tgz#51246e3889b259bbcd1d7d736a0c10add4f0e500" - integrity sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A== +eslint@8.45.0: + version "8.45.0" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.45.0.tgz#bab660f90d18e1364352c0a6b7c6db8edb458b78" + integrity sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@eslint-community/regexpp" "^4.4.0" @@ -3313,7 +3313,6 @@ eslint@8.44.0: globals "^13.19.0" graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" @@ -3325,7 +3324,6 @@ eslint@8.44.0: natural-compare "^1.4.0" optionator "^0.9.3" strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" text-table "^0.2.0" espower-location-detector@^1.0.0: @@ -3582,15 +3580,7 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" -find-up@^6.0.0: - version "6.2.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-6.2.0.tgz#f3b81d633fa83bebe64f83a8bab357f86d5914be" - integrity sha512-yWHzMzXCaFoABSnFTCPKNFlYoq4mSga9QLRRKOCLSJ33hSkzROB14ITbAWW0QDQDyuzsPQ33S1DsOWQb/oW1yA== - dependencies: - locate-path "^7.0.0" - path-exists "^5.0.0" - -find-up@^6.3.0: +find-up@^6.0.0, find-up@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz#2abab3d3280b2dc7ac10199ef324c4e002c8c790" integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw== @@ -4213,7 +4203,7 @@ immediate@~3.0.5: resolved "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -4955,13 +4945,6 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -locate-path@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-7.0.0.tgz#f0a60c8dd7ef0f737699eb9461b9567a92bc97da" - integrity sha512-+cg2yXqDUKfo4hsFxwa3G1cBJeA+gs1vD8FyV9/odWoUlQe/4syxHQ5DPtKjtfm6gnKbZzjCqzX03kXosvZB1w== - dependencies: - p-locate "^6.0.0" - locate-path@^7.1.0: version "7.2.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz#69cb1779bd90b35ab1e771e1f2f89a202c2a8a8a" @@ -7045,7 +7028,7 @@ strip-indent@^4.0.0: dependencies: min-indent "^1.0.1" -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== From f85d91361222c1a110f26ebde8947d633755ff1a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 11:42:15 +0000 Subject: [PATCH 005/405] Bump playwright from 1.35.1 to 1.36.1 Bumps [playwright](https://github.com/Microsoft/playwright) from 1.35.1 to 1.36.1. - [Release notes](https://github.com/Microsoft/playwright/releases) - [Commits](https://github.com/Microsoft/playwright/compare/v1.35.1...v1.36.1) --- updated-dependencies: - dependency-name: playwright dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 79bdf9fd..c4e6e97a 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "node-addon-api": "7.0.0", "null-loader": "4.0.1", "parse-url": "8.1.0", - "playwright": "1.35.1", + "playwright": "1.36.1", "plist": "3.1.0", "prettier": "3.0.0", "proxyquire": "2.1.3", diff --git a/yarn.lock b/yarn.lock index 5874e423..734ff3e6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5954,17 +5954,17 @@ pkg-dir@^7.0.0: dependencies: find-up "^6.3.0" -playwright-core@1.35.1: - version "1.35.1" - resolved "https://registry.npmjs.org/playwright-core/-/playwright-core-1.35.1.tgz#52c1e6ffaa6a8c29de1a5bdf8cce0ce290ffb81d" - integrity sha512-pNXb6CQ7OqmGDRspEjlxE49w+4YtR6a3X6mT1hZXeJHWmsEz7SunmvZeiG/+y1yyMZdHnnn73WKYdtV1er0Xyg== +playwright-core@1.36.1: + version "1.36.1" + resolved "https://registry.npmjs.org/playwright-core/-/playwright-core-1.36.1.tgz#f5f275d70548768ca892583519c89b237a381c77" + integrity sha512-7+tmPuMcEW4xeCL9cp9KxmYpQYHKkyjwoXRnoeTowaeNat8PoBMk/HwCYhqkH2fRkshfKEOiVus/IhID2Pg8kg== -playwright@1.35.1: - version "1.35.1" - resolved "https://registry.npmjs.org/playwright/-/playwright-1.35.1.tgz#f991d0c76ae517d4a0023d9428b09d19d5e87128" - integrity sha512-NbwBeGJLu5m7VGM0+xtlmLAH9VUfWwYOhUi/lSEDyGg46r1CA9RWlvoc5yywxR9AzQb0mOCm7bWtOXV7/w43ZA== +playwright@1.36.1: + version "1.36.1" + resolved "https://registry.npmjs.org/playwright/-/playwright-1.36.1.tgz#bd01541048b4ea54bcf1989e61e0129f34d2df71" + integrity sha512-2ZqHpD0U0COKR8bqR3W5IkyIAAM0mT9FgGJB9xWCI1qAUkqLxJskA1ueeQOTH2Qfz3+oxdwwf2EzdOX+RkZmmQ== dependencies: - playwright-core "1.35.1" + playwright-core "1.36.1" plist@3.1.0, plist@^3.0.4, plist@^3.0.5: version "3.1.0" From a5d66a0275beb1a5fa91be87da2202aee1e833db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 11:42:32 +0000 Subject: [PATCH 006/405] Bump clsx from 1.2.1 to 2.0.0 Bumps [clsx](https://github.com/lukeed/clsx) from 1.2.1 to 2.0.0. - [Release notes](https://github.com/lukeed/clsx/releases) - [Commits](https://github.com/lukeed/clsx/compare/v1.2.1...v2.0.0) --- updated-dependencies: - dependency-name: clsx dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c4e6e97a..e28527ef 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@react-icons/all-files": "4.1.0", "args": "5.0.3", "chalk": "5.3.0", - "clsx": "1.2.1", + "clsx": "2.0.0", "color": "4.2.3", "columnify": "1.6.0", "css-loader": "6.8.1", diff --git a/yarn.lock b/yarn.lock index 734ff3e6..a443c6c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2344,10 +2344,10 @@ clone@^1.0.2: resolved "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= -clsx@1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" - integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== +clsx@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/clsx/-/clsx-2.0.0.tgz#12658f3fd98fafe62075595a5c30e43d18f3d00b" + integrity sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q== code-excerpt@^4.0.0: version "4.0.0" From b34ccb868b74b387989c4391f85deb60d5e05679 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 11:43:01 +0000 Subject: [PATCH 007/405] Bump eslint-plugin-prettier from 5.0.0-alpha.2 to 5.0.0 Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 5.0.0-alpha.2 to 5.0.0. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-plugin-prettier/commits/v5.0.0) --- updated-dependencies: - dependency-name: eslint-plugin-prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 18 +++++------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index e28527ef..eb35baa6 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-json-schema-validator": "^4.5.0", "eslint-plugin-jsonc": "^2.9.0", - "eslint-plugin-prettier": "^5.0.0-alpha.2", + "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-react": "7.32.2", "husky": "8.0.3", "inquirer": "9.2.7", diff --git a/yarn.lock b/yarn.lock index a443c6c0..07dbc37e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3233,10 +3233,10 @@ eslint-plugin-jsonc@^2.9.0: jsonc-eslint-parser "^2.0.4" natural-compare "^1.4.0" -eslint-plugin-prettier@^5.0.0-alpha.2: - version "5.0.0-alpha.2" - resolved "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0-alpha.2.tgz#4dd7edf88ff9bc13a3bbd91c059aae267dac4576" - integrity sha512-F6YBCbrRzvZwcINw3crm1+/uX/i+rJYaFErPtwCfUoPLywRfY7pwBtI3yMe5OpIotuaiws8cd29oM80ca6NQSQ== +eslint-plugin-prettier@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.0.0.tgz#6887780ed95f7708340ec79acfdf60c35b9be57a" + integrity sha512-AgaZCVuYDXHUGxj/ZGu1u8H8CYgDY3iG6w5kUFw4AzMVXzB7VvbKgYR4nATIN+OvUrghMbiDLeimVjVY5ilq3w== dependencies: prettier-linter-helpers "^1.0.0" synckit "^0.8.5" @@ -7103,15 +7103,7 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -synckit@^0.8.0: - version "0.8.4" - resolved "https://registry.npmjs.org/synckit/-/synckit-0.8.4.tgz#0e6b392b73fafdafcde56692e3352500261d64ec" - integrity sha512-Dn2ZkzMdSX827QbowGbU/4yjWuvNaCoScLLoMo/yKbu+P4GBR6cRGKZH27k6a9bRzdqcyd1DE96pQtQ6uNkmyw== - dependencies: - "@pkgr/utils" "^2.3.1" - tslib "^2.4.0" - -synckit@^0.8.5: +synckit@^0.8.0, synckit@^0.8.5: version "0.8.5" resolved "https://registry.npmjs.org/synckit/-/synckit-0.8.5.tgz#b7f4358f9bb559437f9f167eb6bc46b3c9818fa3" integrity sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q== From 335cbd4bfa57d999d7663df0ed94ff20e6c11142 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 11:43:41 +0000 Subject: [PATCH 008/405] Bump @typescript-eslint/parser from 5.61.0 to 5.62.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.61.0 to 5.62.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.62.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 48 +++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index eb35baa6..ee1c06b5 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "@types/terser-webpack-plugin": "5.2.0", "@types/uuid": "9.0.2", "@typescript-eslint/eslint-plugin": "5.61.0", - "@typescript-eslint/parser": "5.61.0", + "@typescript-eslint/parser": "5.62.0", "ava": "5.3.1", "babel-loader": "9.1.3", "concurrently": "8.2.0", diff --git a/yarn.lock b/yarn.lock index 07dbc37e..dca971f1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1270,14 +1270,14 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@5.61.0": - version "5.61.0" - resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.61.0.tgz#7fbe3e2951904bb843f8932ebedd6e0635bffb70" - integrity sha512-yGr4Sgyh8uO6fSi9hw3jAFXNBHbCtKKFMdX2IkT3ZqpKmtAq3lHS4ixB/COFuAIJpwl9/AqF7j72ZDWYKmIfvg== +"@typescript-eslint/parser@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz#1b63d082d849a2fcae8a569248fbe2ee1b8a56c7" + integrity sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA== dependencies: - "@typescript-eslint/scope-manager" "5.61.0" - "@typescript-eslint/types" "5.61.0" - "@typescript-eslint/typescript-estree" "5.61.0" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" debug "^4.3.4" "@typescript-eslint/scope-manager@5.61.0": @@ -1288,6 +1288,14 @@ "@typescript-eslint/types" "5.61.0" "@typescript-eslint/visitor-keys" "5.61.0" +"@typescript-eslint/scope-manager@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" + integrity sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w== + dependencies: + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + "@typescript-eslint/type-utils@5.61.0": version "5.61.0" resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.61.0.tgz#e90799eb2045c4435ea8378cb31cd8a9fddca47a" @@ -1303,6 +1311,11 @@ resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.61.0.tgz#e99ff11b5792d791554abab0f0370936d8ca50c0" integrity sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ== +"@typescript-eslint/types@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" + integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== + "@typescript-eslint/typescript-estree@5.61.0": version "5.61.0" resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.61.0.tgz#4c7caca84ce95bb41aa585d46a764bcc050b92f3" @@ -1316,6 +1329,19 @@ semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/typescript-estree@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" + integrity sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA== + dependencies: + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/visitor-keys" "5.62.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + "@typescript-eslint/utils@5.61.0": version "5.61.0" resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.61.0.tgz#5064838a53e91c754fffbddd306adcca3fe0af36" @@ -1338,6 +1364,14 @@ "@typescript-eslint/types" "5.61.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" + integrity sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw== + dependencies: + "@typescript-eslint/types" "5.62.0" + eslint-visitor-keys "^3.3.0" + "@webassemblyjs/ast@1.11.5", "@webassemblyjs/ast@^1.11.5": version "1.11.5" resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.5.tgz#6e818036b94548c1fb53b754b5cae3c9b208281c" From 9270c104e6e02dcdf31d2a382abab2f143fdd509 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 11:44:22 +0000 Subject: [PATCH 009/405] Bump typescript-json-schema from 0.58.1 to 0.59.0 Bumps [typescript-json-schema](https://github.com/YousefED/typescript-json-schema) from 0.58.1 to 0.59.0. - [Commits](https://github.com/YousefED/typescript-json-schema/compare/v0.58.1...v0.59.0) --- updated-dependencies: - dependency-name: typescript-json-schema dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ee1c06b5..68e980fc 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "shebang-loader": "0.0.1", "styled-jsx": "5.1.2", "stylis": "3.5.4", - "typescript-json-schema": "0.58.1", + "typescript-json-schema": "0.59.0", "uuid": "9.0.0", "webpack-cli": "5.1.4", "xterm": "5.2.1", diff --git a/yarn.lock b/yarn.lock index dca971f1..1a35acec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7438,10 +7438,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript-json-schema@0.58.1: - version "0.58.1" - resolved "https://registry.npmjs.org/typescript-json-schema/-/typescript-json-schema-0.58.1.tgz#841fc5c9a05c894ce77a04b28025af4135a00b1f" - integrity sha512-EcmquhfGEmEJOAezLZC6CzY0rPNzfXuky+Z3zoXULEEncW8e13aAjmC2r8ppT1bvvDekJj1TJ4xVhOdkjYtkUA== +typescript-json-schema@0.59.0: + version "0.59.0" + resolved "https://registry.npmjs.org/typescript-json-schema/-/typescript-json-schema-0.59.0.tgz#736d1b4e4b101b9e989741958f0b2571e998d6ed" + integrity sha512-eYB9RO8p4PntznWUukdDQHckNfxzjEFCJUgsWeCE43mcFioE0wXGTSECGk1uhty9XQMxkpuI4pKAqqnb62ln3Q== dependencies: "@types/json-schema" "^7.0.9" "@types/node" "^16.9.2" From 0f220ceab6ecb506647c94d02b3fc77c11fbc840 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 11:45:00 +0000 Subject: [PATCH 010/405] Bump terser from 5.18.2 to 5.19.0 Bumps [terser](https://github.com/terser/terser) from 5.18.2 to 5.19.0. - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/compare/v5.18.2...v5.19.0) --- updated-dependencies: - dependency-name: terser dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 68e980fc..1b1ccb01 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "proxyquire": "2.1.3", "redux-devtools-extension": "2.13.9", "style-loader": "3.3.3", - "terser": "5.18.2", + "terser": "5.19.0", "ts-node": "10.9.1", "typescript": "5.1.6", "webpack": "5.88.1" diff --git a/yarn.lock b/yarn.lock index 1a35acec..8f73950b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7217,10 +7217,10 @@ terser-webpack-plugin@*, terser-webpack-plugin@^5.3.7: serialize-javascript "^6.0.1" terser "^5.16.5" -terser@5.18.2, terser@^5.16.5: - version "5.18.2" - resolved "https://registry.npmjs.org/terser/-/terser-5.18.2.tgz#ff3072a0faf21ffd38f99acc9a0ddf7b5f07b948" - integrity sha512-Ah19JS86ypbJzTzvUCX7KOsEIhDaRONungA4aYBjEP3JZRf4ocuDzTg4QWZnPn9DEMiMYGJPiSOy7aykoCc70w== +terser@5.19.0, terser@^5.16.5: + version "5.19.0" + resolved "https://registry.npmjs.org/terser/-/terser-5.19.0.tgz#7b3137b01226bdd179978207b9c8148754a6da9c" + integrity sha512-JpcpGOQLOXm2jsomozdMDpd5f8ZHh1rR48OFgWUH3QsyZcfPgv2qDCYbcDEAYNd4OZRj2bWYKpwdll/udZCk/Q== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2" From 7dbff2716f5e6f67e97d9c0486d6942ce2ea01dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 18:24:23 +0000 Subject: [PATCH 011/405] Bump inquirer from 9.2.7 to 9.2.8 Bumps [inquirer](https://github.com/SBoudrias/Inquirer.js) from 9.2.7 to 9.2.8. - [Release notes](https://github.com/SBoudrias/Inquirer.js/releases) - [Commits](https://github.com/SBoudrias/Inquirer.js/compare/inquirer@9.2.7...inquirer@9.2.8) --- updated-dependencies: - dependency-name: inquirer dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 1b1ccb01..b08b1b92 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-react": "7.32.2", "husky": "8.0.3", - "inquirer": "9.2.7", + "inquirer": "9.2.8", "node-addon-api": "7.0.0", "null-loader": "4.0.1", "parse-url": "8.1.0", diff --git a/yarn.lock b/yarn.lock index 8f73950b..c0f708fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2220,7 +2220,7 @@ chalk@2.4.2, chalk@^2.0.0: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@5.3.0, chalk@^5.2.0: +chalk@5.3.0, chalk@^5.2.0, chalk@^5.3.0: version "5.3.0" resolved "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz#67c20a7ebef70e7f3970a01f90fa210cb6860385" integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== @@ -4306,13 +4306,13 @@ inline-style-prefixer@^6.0.0: css-in-js-utils "^3.1.0" fast-loops "^1.1.3" -inquirer@9.2.7: - version "9.2.7" - resolved "https://registry.npmjs.org/inquirer/-/inquirer-9.2.7.tgz#61e00658efa9b4c76a83c2c3cb3ceb88fec70ac7" - integrity sha512-Bf52lnfvNxGPJPltiNO2tLBp3zC339KNlGMqOkW+dsvNikBhcVDK5kqU2lVX2FTPzuXUFX5WJDlsw//w3ZwoTw== +inquirer@9.2.8: + version "9.2.8" + resolved "https://registry.npmjs.org/inquirer/-/inquirer-9.2.8.tgz#35481704912c5a15985c380fd5493a8e6651b14e" + integrity sha512-SJ0fVfgIzZL1AD6WvFhivlh5/3hN6WeAvpvPrpPXH/8MOcQHeXhinmSm5CDJNRC2Q+sLh9YJ5k8F8/5APMXSfw== dependencies: ansi-escapes "^4.3.2" - chalk "^5.2.0" + chalk "^5.3.0" cli-cursor "^3.1.0" cli-width "^4.0.0" external-editor "^3.0.3" From 499076b2676b387dd4bbb9c05cdb2ff6fc2c56fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 18:24:59 +0000 Subject: [PATCH 012/405] Bump @typescript-eslint/eslint-plugin from 5.61.0 to 5.62.0 Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.61.0 to 5.62.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.62.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 74 ++++++++++++++-------------------------------------- 2 files changed, 21 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index b08b1b92..ae513a9d 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "@types/styled-jsx": "2.2.9", "@types/terser-webpack-plugin": "5.2.0", "@types/uuid": "9.0.2", - "@typescript-eslint/eslint-plugin": "5.61.0", + "@typescript-eslint/eslint-plugin": "5.62.0", "@typescript-eslint/parser": "5.62.0", "ava": "5.3.1", "babel-loader": "9.1.3", diff --git a/yarn.lock b/yarn.lock index c0f708fb..30b716d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1254,15 +1254,15 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@5.61.0": - version "5.61.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.61.0.tgz#a1a5290cf33863b4db3fb79350b3c5275a7b1223" - integrity sha512-A5l/eUAug103qtkwccSCxn8ZRwT+7RXWkFECdA4Cvl1dOlDUgTpAOfSEElZn2uSUxhdDpnCdetrf0jvU4qrL+g== +"@typescript-eslint/eslint-plugin@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz#aeef0328d172b9e37d9bab6dbc13b87ed88977db" + integrity sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag== dependencies: "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.61.0" - "@typescript-eslint/type-utils" "5.61.0" - "@typescript-eslint/utils" "5.61.0" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/type-utils" "5.62.0" + "@typescript-eslint/utils" "5.62.0" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.0" @@ -1280,14 +1280,6 @@ "@typescript-eslint/typescript-estree" "5.62.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.61.0": - version "5.61.0" - resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.61.0.tgz#b670006d069c9abe6415c41f754b1b5d949ef2b2" - integrity sha512-W8VoMjoSg7f7nqAROEmTt6LoBpn81AegP7uKhhW5KzYlehs8VV0ZW0fIDVbcZRcaP3aPSW+JZFua+ysQN+m/Nw== - dependencies: - "@typescript-eslint/types" "5.61.0" - "@typescript-eslint/visitor-keys" "5.61.0" - "@typescript-eslint/scope-manager@5.62.0": version "5.62.0" resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c" @@ -1296,39 +1288,21 @@ "@typescript-eslint/types" "5.62.0" "@typescript-eslint/visitor-keys" "5.62.0" -"@typescript-eslint/type-utils@5.61.0": - version "5.61.0" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.61.0.tgz#e90799eb2045c4435ea8378cb31cd8a9fddca47a" - integrity sha512-kk8u//r+oVK2Aj3ph/26XdH0pbAkC2RiSjUYhKD+PExemG4XSjpGFeyZ/QM8lBOa7O8aGOU+/yEbMJgQv/DnCg== +"@typescript-eslint/type-utils@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a" + integrity sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew== dependencies: - "@typescript-eslint/typescript-estree" "5.61.0" - "@typescript-eslint/utils" "5.61.0" + "@typescript-eslint/typescript-estree" "5.62.0" + "@typescript-eslint/utils" "5.62.0" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.61.0": - version "5.61.0" - resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.61.0.tgz#e99ff11b5792d791554abab0f0370936d8ca50c0" - integrity sha512-ldyueo58KjngXpzloHUog/h9REmHl59G1b3a5Sng1GfBo14BkS3ZbMEb3693gnP1k//97lh7bKsp6/V/0v1veQ== - "@typescript-eslint/types@5.62.0": version "5.62.0" resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f" integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ== -"@typescript-eslint/typescript-estree@5.61.0": - version "5.61.0" - resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.61.0.tgz#4c7caca84ce95bb41aa585d46a764bcc050b92f3" - integrity sha512-Fud90PxONnnLZ36oR5ClJBLTLfU4pIWBmnvGwTbEa2cXIqj70AEDEmOmpkFComjBZ/037ueKrOdHuYmSFVD7Rw== - dependencies: - "@typescript-eslint/types" "5.61.0" - "@typescript-eslint/visitor-keys" "5.61.0" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - "@typescript-eslint/typescript-estree@5.62.0": version "5.62.0" resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b" @@ -1342,28 +1316,20 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.61.0": - version "5.61.0" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.61.0.tgz#5064838a53e91c754fffbddd306adcca3fe0af36" - integrity sha512-mV6O+6VgQmVE6+xzlA91xifndPW9ElFW8vbSF0xCT/czPXVhwDewKila1jOyRwa9AE19zKnrr7Cg5S3pJVrTWQ== +"@typescript-eslint/utils@5.62.0": + version "5.62.0" + resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86" + integrity sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.61.0" - "@typescript-eslint/types" "5.61.0" - "@typescript-eslint/typescript-estree" "5.61.0" + "@typescript-eslint/scope-manager" "5.62.0" + "@typescript-eslint/types" "5.62.0" + "@typescript-eslint/typescript-estree" "5.62.0" eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.61.0": - version "5.61.0" - resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.61.0.tgz#c79414fa42158fd23bd2bb70952dc5cdbb298140" - integrity sha512-50XQ5VdbWrX06mQXhy93WywSFZZGsv3EOjq+lqp6WC2t+j3mb6A9xYVdrRxafvK88vg9k9u+CT4l6D8PEatjKg== - dependencies: - "@typescript-eslint/types" "5.61.0" - eslint-visitor-keys "^3.3.0" - "@typescript-eslint/visitor-keys@5.62.0": version "5.62.0" resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz#2174011917ce582875954ffe2f6912d5931e353e" From 22afd6095f789ed2d2cdbe0db2c5d7df29b056eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 18:22:44 +0000 Subject: [PATCH 013/405] Bump @babel/core from 7.22.8 to 7.22.9 Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.8 to 7.22.9. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.22.9/packages/babel-core) --- updated-dependencies: - dependency-name: "@babel/core" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 70 +++++++++++++++++++++++----------------------------- 2 files changed, 32 insertions(+), 40 deletions(-) diff --git a/package.json b/package.json index ae513a9d..52a05ef1 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "@ava/babel": "2.0.0", "@ava/typescript": "^4.1.0", "@babel/cli": "7.22.9", - "@babel/core": "7.22.8", + "@babel/core": "7.22.9", "@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-numeric-separator": "^7.18.6", "@babel/plugin-proposal-object-rest-spread": "^7.20.7", diff --git a/yarn.lock b/yarn.lock index 30b716d6..a310a5dd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -88,36 +88,36 @@ resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz#9d92fa81b87542fff50e848ed585b4212c1d34ec" integrity sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg== -"@babel/compat-data@^7.22.6": - version "7.22.6" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.6.tgz#15606a20341de59ba02cd2fcc5086fcbe73bf544" - integrity sha512-29tfsWTq2Ftu7MXmimyC0C5FDZv5DYxOZkh3XD3+QW4V/BYuv/LyEsjj3c0hqedEaDt6DBfDvexMKU8YevdqFg== +"@babel/compat-data@^7.22.9": + version "7.22.9" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730" + integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== -"@babel/core@7.22.8", "@babel/core@^7.14.6": - version "7.22.8" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.22.8.tgz#386470abe884302db9c82e8e5e87be9e46c86785" - integrity sha512-75+KxFB4CZqYRXjx4NlR4J7yGvKumBuZTmV4NV6v09dVXXkuYVYLT68N6HCzLvfJ+fWCxQsntNzKwwIXL4bHnw== +"@babel/core@7.22.9", "@babel/core@^7.14.6": + version "7.22.9" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.22.9.tgz#bd96492c68822198f33e8a256061da3cf391f58f" + integrity sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.7" - "@babel/helper-compilation-targets" "^7.22.6" - "@babel/helper-module-transforms" "^7.22.5" + "@babel/generator" "^7.22.9" + "@babel/helper-compilation-targets" "^7.22.9" + "@babel/helper-module-transforms" "^7.22.9" "@babel/helpers" "^7.22.6" "@babel/parser" "^7.22.7" "@babel/template" "^7.22.5" "@babel/traverse" "^7.22.8" "@babel/types" "^7.22.5" - "@nicolo-ribaudo/semver-v6" "^6.3.3" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.2" + semver "^6.3.1" -"@babel/generator@^7.0.0", "@babel/generator@^7.14.5", "@babel/generator@^7.22.7": - version "7.22.7" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.22.7.tgz#a6b8152d5a621893f2c9dacf9a4e286d520633d5" - integrity sha512-p+jPjMG+SI8yvIaxGgeW24u7q9+5+TGpZh8/CuB7RhBKd7RCy8FayNEFNNKrNK/eUcY/4ExQqLmyrvBXKsIcwQ== +"@babel/generator@^7.0.0", "@babel/generator@^7.14.5", "@babel/generator@^7.22.7", "@babel/generator@^7.22.9": + version "7.22.9" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d" + integrity sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw== dependencies: "@babel/types" "^7.22.5" "@jridgewell/gen-mapping" "^0.3.2" @@ -138,16 +138,16 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.22.6": - version "7.22.6" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.6.tgz#e30d61abe9480aa5a83232eb31c111be922d2e52" - integrity sha512-534sYEqWD9VfUm3IPn2SLcH4Q3P86XL+QvqdC7ZsFrzyyPF3T4XGiVghF6PTYNdWg6pXuoqXxNQAhbYeEInTzA== +"@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.22.9": + version "7.22.9" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz#f9d0a7aaaa7cd32a3f31c9316a69f5a9bcacb892" + integrity sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw== dependencies: - "@babel/compat-data" "^7.22.6" + "@babel/compat-data" "^7.22.9" "@babel/helper-validator-option" "^7.22.5" - "@nicolo-ribaudo/semver-v6" "^6.3.3" browserslist "^4.21.9" lru-cache "^5.1.1" + semver "^6.3.1" "@babel/helper-create-class-features-plugin@^7.18.6": version "7.18.6" @@ -231,19 +231,16 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-module-transforms@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz#0f65daa0716961b6e96b164034e737f60a80d2ef" - integrity sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw== +"@babel/helper-module-transforms@^7.22.5", "@babel/helper-module-transforms@^7.22.9": + version "7.22.9" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz#92dfcb1fbbb2bc62529024f72d942a8c97142129" + integrity sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ== dependencies: "@babel/helper-environment-visitor" "^7.22.5" "@babel/helper-module-imports" "^7.22.5" "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" "@babel/helper-validator-identifier" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" @@ -874,11 +871,6 @@ resolved "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz#323d72dd25103d0c4fbdce89dadf574a787b1f9b" integrity sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ== -"@nicolo-ribaudo/semver-v6@^6.3.3": - version "6.3.3" - resolved "https://registry.npmjs.org/@nicolo-ribaudo/semver-v6/-/semver-v6-6.3.3.tgz#ea6d23ade78a325f7a52750aab1526b02b628c29" - integrity sha512-3Yc1fUTs69MG/uZbJlLSI3JISMn2UV2rg+1D/vROUqZyh3l6iYHCs7GMp+M40ZD7yOdDbYjJcU1oTJhrc+dGKg== - "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -6618,10 +6610,10 @@ semver@^5.6.0: resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@^6.2.0, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^6.2.0, semver@^6.3.0, semver@^6.3.1: + version "6.3.1" + resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== semver@~7.0.0: version "7.0.0" From af41b343e3bfdb81dd91bb0005382cdf12d8e280 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 18:54:25 +0000 Subject: [PATCH 014/405] Bump terser from 5.18.2 to 5.19.1 Bumps [terser](https://github.com/terser/terser) from 5.18.2 to 5.19.1. - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](https://github.com/terser/terser/compare/v5.18.2...v5.19.1) --- updated-dependencies: - dependency-name: terser dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 52a05ef1..52189a31 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "proxyquire": "2.1.3", "redux-devtools-extension": "2.13.9", "style-loader": "3.3.3", - "terser": "5.19.0", + "terser": "5.19.1", "ts-node": "10.9.1", "typescript": "5.1.6", "webpack": "5.88.1" diff --git a/yarn.lock b/yarn.lock index a310a5dd..b055304e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7175,10 +7175,10 @@ terser-webpack-plugin@*, terser-webpack-plugin@^5.3.7: serialize-javascript "^6.0.1" terser "^5.16.5" -terser@5.19.0, terser@^5.16.5: - version "5.19.0" - resolved "https://registry.npmjs.org/terser/-/terser-5.19.0.tgz#7b3137b01226bdd179978207b9c8148754a6da9c" - integrity sha512-JpcpGOQLOXm2jsomozdMDpd5f8ZHh1rR48OFgWUH3QsyZcfPgv2qDCYbcDEAYNd4OZRj2bWYKpwdll/udZCk/Q== +terser@5.19.1, terser@^5.16.5: + version "5.19.1" + resolved "https://registry.npmjs.org/terser/-/terser-5.19.1.tgz#dbd7231f224a9e2401d0f0959542ed74d76d340b" + integrity sha512-27hxBUVdV6GoNg1pKQ7Z5cbR6V9txPVyBA+FQw3BaZ1Wuzvztce5p156DaP0NVZNrMZZ+6iG9Syf7WgMNKDg2Q== dependencies: "@jridgewell/source-map" "^0.3.3" acorn "^8.8.2" From db2be9fe5072959b45d28f38838b70eab4b3c052 Mon Sep 17 00:00:00 2001 From: Labhansh Agrawal Date: Sat, 22 Jul 2023 19:27:32 +0530 Subject: [PATCH 015/405] basic setup to remove @electron/remote --- app/plugins.ts | 7 +++++++ app/rpc.ts | 2 +- common.d.ts | 7 +++++++ lib/command-registry.ts | 9 +++------ lib/containers/hyper.tsx | 8 ++++---- lib/utils/config.ts | 2 +- lib/utils/ipc-child-process.ts | 4 +--- lib/utils/ipc.ts | 4 ++++ lib/utils/plugins.ts | 6 ++---- lib/utils/rpc.ts | 13 +++++++------ 10 files changed, 37 insertions(+), 25 deletions(-) create mode 100644 lib/utils/ipc.ts diff --git a/app/plugins.ts b/app/plugins.ts index a839c435..3f53cb8e 100644 --- a/app/plugins.ts +++ b/app/plugins.ts @@ -467,3 +467,10 @@ ipcMain.handle('child_process.exec', (event, command, options) => { ipcMain.handle('child_process.execFile', (event, file, args, options) => { return promisify(execFile)(file, args, options); }); + +ipcMain.handle('getLoadedPluginVersions', () => getLoadedPluginVersions()); +ipcMain.handle('getPaths', () => getPaths()); +ipcMain.handle('getBasePaths', () => getBasePaths()); +ipcMain.handle('getDeprecatedConfig', () => getDeprecatedConfig()); +ipcMain.handle('getDecoratedConfig', (e, profile) => getDecoratedConfig(profile)); +ipcMain.handle('getDecoratedKeymaps', () => getDecoratedKeymaps()); diff --git a/app/rpc.ts b/app/rpc.ts index 13f41e67..129a406f 100644 --- a/app/rpc.ts +++ b/app/rpc.ts @@ -28,7 +28,7 @@ export class Server { // to support reloading the window and re-initializing // the channel this.wc.on('did-finish-load', () => { - this.wc.send('init', uid); + this.wc.send('init', uid, win.profileName); }); } diff --git a/common.d.ts b/common.d.ts index 7ab9fc1c..5797b4e9 100644 --- a/common.d.ts +++ b/common.d.ts @@ -1,6 +1,7 @@ import type parseUrl from 'parse-url'; import type {IpcMain, IpcRenderer} from 'electron'; import type {ExecFileOptions, ExecOptions} from 'child_process'; +import type {configOptions} from './lib/config'; export type Session = { uid: string; @@ -115,6 +116,12 @@ export type IpcCommands = { stdout: string; stderr: string; }; + getLoadedPluginVersions: () => {name: string; version: string}[]; + getPaths: () => {plugins: string[]; localPlugins: string[]}; + getBasePaths: () => {path: string; localPath: string}; + getDeprecatedConfig: () => Record; + getDecoratedConfig: (profile: string) => configOptions; + getDecoratedKeymaps: () => Record; }; export interface IpcMainWithCommands extends IpcMain { diff --git a/lib/command-registry.ts b/lib/command-registry.ts index 27bbe172..0379c50b 100644 --- a/lib/command-registry.ts +++ b/lib/command-registry.ts @@ -1,9 +1,6 @@ -import {require as remoteRequire} from '@electron/remote'; +import {ipcRenderer} from './utils/ipc'; import type {HyperDispatch} from './hyper'; import {closeSearch} from './actions/sessions'; -// TODO: Should be updates to new async API https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31 - -const {getDecoratedKeymaps} = remoteRequire('./plugins') as typeof import('../app/plugins'); let commands: Record void> = { 'editor:search-close': (e, dispatch) => { @@ -12,8 +9,8 @@ let commands: Record void> = { } }; -export const getRegisteredKeys = () => { - const keymaps = getDecoratedKeymaps(); +export const getRegisteredKeys = async () => { + const keymaps = await ipcRenderer.invoke('getDecoratedKeymaps'); return Object.keys(keymaps).reduce((result: Record, actionName) => { const commandKeys = keymaps[actionName]; diff --git a/lib/containers/hyper.tsx b/lib/containers/hyper.tsx index 53efda6c..ea6c15c0 100644 --- a/lib/containers/hyper.tsx +++ b/lib/containers/hyper.tsx @@ -25,7 +25,7 @@ class Hyper extends React.PureComponent { componentDidUpdate(prev: HyperProps) { const {lastConfigUpdate} = this.props; if (lastConfigUpdate && lastConfigUpdate !== prev.lastConfigUpdate) { - this.attachKeyListeners(); + void this.attachKeyListeners(); } if (prev.activeSession !== this.props.activeSession) { this.handleFocusActive(this.props.activeSession); @@ -46,7 +46,7 @@ class Hyper extends React.PureComponent { } }; - attachKeyListeners() { + async attachKeyListeners() { if (!this.mousetrap) { // eslint-disable-next-line @typescript-eslint/no-unsafe-call this.mousetrap = new (Mousetrap as any)(window, true); @@ -58,7 +58,7 @@ class Hyper extends React.PureComponent { this.mousetrap.reset(); } - const keys = getRegisteredKeys(); + const keys = await getRegisteredKeys(); Object.keys(keys).forEach((commandKeys) => { this.mousetrap.bind( commandKeys, @@ -75,7 +75,7 @@ class Hyper extends React.PureComponent { } componentDidMount() { - this.attachKeyListeners(); + void this.attachKeyListeners(); window.rpc.on('term selectAll', this.handleSelectAll); } diff --git a/lib/utils/config.ts b/lib/utils/config.ts index 0cdab4d8..7ed1531b 100644 --- a/lib/utils/config.ts +++ b/lib/utils/config.ts @@ -1,4 +1,4 @@ -import {ipcRenderer} from 'electron'; +import {ipcRenderer} from './ipc'; import {require as remoteRequire, getCurrentWindow} from '@electron/remote'; // TODO: Should be updates to new async API https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31 diff --git a/lib/utils/ipc-child-process.ts b/lib/utils/ipc-child-process.ts index cf6d2b73..0dc4db57 100644 --- a/lib/utils/ipc-child-process.ts +++ b/lib/utils/ipc-child-process.ts @@ -1,7 +1,5 @@ -import electron from 'electron'; -import type {IpcRendererWithCommands} from '../../common'; import type {ExecFileOptions, ExecOptions} from 'child_process'; -const ipcRenderer = electron.ipcRenderer as IpcRendererWithCommands; +import {ipcRenderer} from './ipc'; export function exec(command: string, options: ExecOptions, callback: (..._args: any) => void) { if (typeof options === 'function') { diff --git a/lib/utils/ipc.ts b/lib/utils/ipc.ts new file mode 100644 index 00000000..55a7eeb1 --- /dev/null +++ b/lib/utils/ipc.ts @@ -0,0 +1,4 @@ +import {ipcRenderer as _ipc} from 'electron'; +import type {IpcRendererWithCommands} from '../../common'; + +export const ipcRenderer = _ipc as IpcRendererWithCommands; diff --git a/lib/utils/plugins.ts b/lib/utils/plugins.ts index 456bc3f9..ddf55aa1 100644 --- a/lib/utils/plugins.ts +++ b/lib/utils/plugins.ts @@ -5,7 +5,7 @@ import {require as remoteRequire} from '@electron/remote'; import type {Options} from 'react-redux'; import {connect as reduxConnect} from 'react-redux'; -import {basename} from 'path'; +import pathModule from 'path'; // patching Module._load // so plugins can `require` them without needing their own version @@ -219,8 +219,6 @@ const clearModulesCache = () => { } }; -const pathModule = window.require('path') as typeof import('path'); - const getPluginName = (path: string) => pathModule.basename(path); const getPluginVersion = (path: string): string | null => { @@ -269,7 +267,7 @@ const loadModules = () => { const loadedPlugins = plugins.getLoadedPluginVersions().map((plugin: any) => plugin.name); modules = paths.plugins .concat(paths.localPlugins) - .filter((plugin) => loadedPlugins.indexOf(basename(plugin)) !== -1) + .filter((plugin) => loadedPlugins.indexOf(pathModule.basename(plugin)) !== -1) .map((path) => { let mod: hyperPlugin; const pluginName = getPluginName(path); diff --git a/lib/utils/rpc.ts b/lib/utils/rpc.ts index 0cc5e364..6b67a582 100644 --- a/lib/utils/rpc.ts +++ b/lib/utils/rpc.ts @@ -1,16 +1,16 @@ import {EventEmitter} from 'events'; -import type {IpcRenderer, IpcRendererEvent} from 'electron'; -import electron from 'electron'; -import type {FilterNever, MainEvents, RendererEvents, TypedEmitter} from '../../common'; +import type {IpcRendererEvent} from 'electron'; +import type {FilterNever, IpcRendererWithCommands, MainEvents, RendererEvents, TypedEmitter} from '../../common'; +import {ipcRenderer} from './ipc'; export default class Client { emitter: TypedEmitter; - ipc: IpcRenderer; + ipc: IpcRendererWithCommands; id!: string; constructor() { this.emitter = new EventEmitter(); - this.ipc = electron.ipcRenderer; + this.ipc = ipcRenderer; this.emit = this.emit.bind(this); if (window.__rpcId) { setTimeout(() => { @@ -19,11 +19,12 @@ export default class Client { this.emitter.emit('ready'); }, 0); } else { - this.ipc.on('init', (ev: IpcRendererEvent, uid: string) => { + this.ipc.on('init', (ev: IpcRendererEvent, uid: string, profileName: string) => { // we cache so that if the object // gets re-instantiated we don't // wait for a `init` event window.__rpcId = uid; + // window.profileName = profileName; this.id = uid; this.ipc.on(uid, this.ipcListener); this.emitter.emit('ready'); From 562473a718cad8bb002cd19de9d690791e5d9a40 Mon Sep 17 00:00:00 2001 From: Labhansh Agrawal Date: Sun, 23 Jul 2023 22:35:14 +0530 Subject: [PATCH 016/405] cleanup lodash usage --- .eslintrc.json | 14 +++++++------- app/config/init.ts | 4 ++-- app/config/migrate.ts | 4 ++-- lib/components/split-pane.tsx | 4 ++-- lib/components/term.tsx | 3 ++- package.json | 2 ++ yarn.lock | 9 ++++++++- 7 files changed, 25 insertions(+), 15 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 0f9dec0d..5659f1e4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -3,7 +3,8 @@ "react", "prettier", "@typescript-eslint", - "eslint-comments" + "eslint-comments", + "lodash" ], "extends": [ "eslint:recommended", @@ -93,12 +94,11 @@ "@typescript-eslint/no-unsafe-assignment": "off", "@typescript-eslint/no-unsafe-member-access": "off", "@typescript-eslint/restrict-template-expressions": "off", - "@typescript-eslint/consistent-type-imports": [ - "error", - { - "disallowTypeAnnotations": false - } - ] + "@typescript-eslint/consistent-type-imports": [ "error", { "disallowTypeAnnotations": false } ], + "lodash/prop-shorthand": [ "error", "always" ], + "lodash/import-scope": [ "error", "method" ], + "lodash/collection-return": "error", + "lodash/collection-method-value": "error" } }, { diff --git a/app/config/init.ts b/app/config/init.ts index 00a58bbd..33d4e3e6 100644 --- a/app/config/init.ts +++ b/app/config/init.ts @@ -2,7 +2,7 @@ import vm from 'vm'; import notify from '../notify'; import mapKeys from '../utils/map-keys'; import type {parsedConfig, rawConfig, configOptions} from '../../lib/config'; -import _ from 'lodash'; +import merge from 'lodash/merge'; const _extract = (script?: vm.Script): Record => { const module: Record = {}; @@ -44,7 +44,7 @@ const _init = (userCfg: rawConfig, defaultCfg: rawConfig): parsedConfig => { if (!conf.profiles.map((p) => p.name).includes(conf.defaultProfile)) { conf.defaultProfile = conf.profiles[0].name; } - return _.merge({}, defaultCfg.config, conf); + return merge({}, defaultCfg.config, conf); } else { notify('Error reading configuration: `config` key is missing'); return defaultCfg.config || ({} as configOptions); diff --git a/app/config/migrate.ts b/app/config/migrate.ts index b74a2603..a56b0796 100644 --- a/app/config/migrate.ts +++ b/app/config/migrate.ts @@ -3,7 +3,7 @@ import {builders, namedTypes} from 'ast-types'; import * as babelParser from 'recast/parsers/babel'; import {copy, copySync, existsSync, readFileSync, writeFileSync} from 'fs-extra'; import {dirname, resolve} from 'path'; -import _ from 'lodash'; +import merge from 'lodash/merge'; import notify from '../notify'; import {_extractDefault} from './init'; @@ -166,7 +166,7 @@ export const migrateHyper3Config = () => { try { const legacyCfgRaw = readFileSync(legacyCfgPath, 'utf8'); const legacyCfgData = _extractDefault(legacyCfgRaw); - newCfgData = _.merge({}, defaultCfgData, legacyCfgData); + newCfgData = merge({}, defaultCfgData, legacyCfgData); const pluginCode = configToPlugin(legacyCfgRaw); if (pluginCode) { diff --git a/lib/components/split-pane.tsx b/lib/components/split-pane.tsx index 6efb9bd8..0b979755 100644 --- a/lib/components/split-pane.tsx +++ b/lib/components/split-pane.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import _ from 'lodash'; +import sum from 'lodash/sum'; import type {SplitPaneProps} from '../hyper'; export default class SplitPane extends React.PureComponent { @@ -40,7 +40,7 @@ export default class SplitPane extends React.PureComponent Date: Mon, 24 Jul 2023 12:59:12 +0530 Subject: [PATCH 017/405] Bump react to v18 --- app/package.json | 4 +- app/yarn.lock | 34 +++++-------- bin/snapshot-libs.js | 7 ++- lib/ext-modules.d.ts | 4 -- lib/index.tsx | 11 ++--- lib/utils/plugins.ts | 4 +- package.json | 12 ++--- webpack.config.ts | 1 - yarn.lock | 111 +++++++++++++++++++++---------------------- 9 files changed, 85 insertions(+), 103 deletions(-) diff --git a/app/package.json b/app/package.json index f6d66416..3b668ee3 100644 --- a/app/package.json +++ b/app/package.json @@ -31,8 +31,8 @@ "os-locale": "5.0.0", "parse-url": "8.1.0", "queue": "6.0.2", - "react": "17.0.2", - "react-dom": "17.0.2", + "react": "18.2.0", + "react-dom": "18.2.0", "recast": "0.23.3", "semver": "7.5.4", "shell-env": "3.0.1", diff --git a/app/yarn.lock b/app/yarn.lock index a0e48bd8..c4995991 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -671,11 +671,6 @@ npm-run-path@^4.0.0: dependencies: path-key "^3.0.0" -object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - object-is@^1.0.1: version "1.1.5" resolved "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" @@ -812,22 +807,20 @@ queue@6.0.2: dependencies: inherits "~2.0.3" -react-dom@17.0.2: - version "17.0.2" - resolved "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" - integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== +react-dom@18.2.0: + version "18.2.0" + resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" + integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler "^0.20.2" + scheduler "^0.23.0" -react@17.0.2: - version "17.0.2" - resolved "https://registry.npmjs.org/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" - integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== +react@18.2.0: + version "18.2.0" + resolved "https://registry.npmjs.org/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" + integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" readdirp@~3.6.0: version "3.6.0" @@ -862,13 +855,12 @@ retry@0.13.1: resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== -scheduler@^0.20.2: - version "0.20.2" - resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" - integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== +scheduler@^0.23.0: + version "0.23.0" + resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" + integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" semver@7.5.4, semver@^7.3.5: version "7.5.4" diff --git a/bin/snapshot-libs.js b/bin/snapshot-libs.js index df646315..791e8ec8 100644 --- a/bin/snapshot-libs.js +++ b/bin/snapshot-libs.js @@ -7,10 +7,6 @@ require('normalize-url'); require('parse-url'); require('php-escape-shell'); require('plist'); -require('react-deep-force-update'); -require('react-dom'); -require('react-redux'); -require('react'); require('redux-thunk'); require('redux'); require('reselect'); @@ -22,6 +18,9 @@ if (false) { require('args'); require('mousetrap'); require('open'); + require('react-dom'); + require('react-redux'); + require('react'); require('xterm-addon-fit'); require('xterm-addon-image'); require('xterm-addon-search'); diff --git a/lib/ext-modules.d.ts b/lib/ext-modules.d.ts index d44b8a27..b29eea99 100644 --- a/lib/ext-modules.d.ts +++ b/lib/ext-modules.d.ts @@ -1,7 +1,3 @@ declare module 'php-escape-shell' { export function php_escapeshellcmd(path: string): string; } - -declare module 'react-deep-force-update' { - export default function (...args: any[]): any; -} diff --git a/lib/index.tsx b/lib/index.tsx index 5c7d66b5..85175ddb 100644 --- a/lib/index.tsx +++ b/lib/index.tsx @@ -1,9 +1,8 @@ import './v8-snapshot-util'; import {webFrame} from 'electron'; -import forceUpdate from 'react-deep-force-update'; import {Provider} from 'react-redux'; import React from 'react'; -import {render} from 'react-dom'; +import {createRoot} from 'react-dom/client'; import rpc from './rpc'; import init from './actions/index'; @@ -232,14 +231,14 @@ rpc.on('leave full screen', () => { store_.dispatch(uiActions.leaveFullScreen()); }); -const app = render( +const root = createRoot(document.getElementById('mount')!); + +root.render( - , - document.getElementById('mount') + ); rpc.on('reload', () => { plugins.reload(); - forceUpdate(app); }); diff --git a/lib/utils/plugins.ts b/lib/utils/plugins.ts index ddf55aa1..d2e14540 100644 --- a/lib/utils/plugins.ts +++ b/lib/utils/plugins.ts @@ -3,7 +3,7 @@ import {require as remoteRequire} from '@electron/remote'; // TODO: Should be updates to new async API https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31 -import type {Options} from 'react-redux'; +import type {ConnectOptions} from 'react-redux/es/components/connect'; import {connect as reduxConnect} from 'react-redux'; import pathModule from 'path'; @@ -458,7 +458,7 @@ export function connect( stateFn: (state: HyperState) => stateProps, dispatchFn: (dispatch: HyperDispatch) => dispatchProps, c: null | undefined, - d: Options = {} + d: ConnectOptions = {} ) { return (Class: ComponentType, name: keyof typeof connectors) => { return reduxConnect( diff --git a/package.json b/package.json index 02da3439..e54736c1 100644 --- a/package.json +++ b/package.json @@ -44,10 +44,9 @@ "open": "8.4.2", "ora": "5.4.1", "php-escape-shell": "1.0.0", - "react": "17.0.2", - "react-deep-force-update": "2.1.3", - "react-dom": "17.0.2", - "react-redux": "7.2.8", + "react": "18.2.0", + "react-dom": "18.2.0", + "react-redux": "8.1.1", "react-use": "^17.4.0", "redux": "4.2.1", "redux-thunk": "2.4.2", @@ -92,9 +91,8 @@ "@types/ms": "0.7.31", "@types/node": "18.16.19", "@types/plist": "3.0.2", - "@types/react": "^17.0.43", - "@types/react-dom": "^17.0.14", - "@types/react-redux": "^7.1.22", + "@types/react": "18.2.15", + "@types/react-dom": "18.2.7", "@types/seamless-immutable": "7.1.16", "@types/styled-jsx": "2.2.9", "@types/terser-webpack-plugin": "5.2.0", diff --git a/webpack.config.ts b/webpack.config.ts index 750b04f7..bfa4ddd7 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -108,7 +108,6 @@ const config: webpack.Configuration[] = [ 'parse-url': 'require("./node_modules/parse-url/dist/index.js")', 'php-escape-shell': 'require("./node_modules/php-escape-shell/php-escape-shell.js")', plist: 'require("./node_modules/plist/index.js")', - 'react-deep-force-update': 'require("./node_modules/react-deep-force-update/lib/index.js")', 'react-dom': 'require("./node_modules/react-dom/index.js")', 'react-redux': 'require("./node_modules/react-redux/lib/index.js")', react: 'require("./node_modules/react/index.js")', diff --git a/yarn.lock b/yarn.lock index 137a177f..7f237caa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -554,7 +554,14 @@ dependencies: regenerator-runtime "^0.13.11" -"@babel/runtime@^7.15.4", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.12.1": + version "7.22.6" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.22.6.tgz#57d64b9ae3cff1d67eb067ae117dac087f5bd438" + integrity sha512-wDb5pWm4WDdF6LFUde3Jl8WzPA+3ZbxYqkC6xAXuD3irdEHN1k0NfTRrJD8ZD378SJ61miMLCqIOXYhd8x+AJQ== + dependencies: + regenerator-runtime "^0.13.11" + +"@babel/runtime@^7.9.2": version "7.16.0" resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.0.tgz#e27b977f2e2088ba24748bf99b5e1dece64e4f0b" integrity sha512-Nht8L0O8YCktmsDV6FqFue7vQLRx3Hb0B37lS5y0jDRqRxlBG4wIJHnf9/bgSE2UyipKFA01YtS+npRdTWBUyw== @@ -1072,7 +1079,7 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/hoist-non-react-statics@^3.3.0": +"@types/hoist-non-react-statics@^3.3.1": version "3.3.1" resolved "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz#1124aafe5118cb591977aeb1ceaaed1070eb039f" integrity sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA== @@ -1162,27 +1169,17 @@ resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== -"@types/react-dom@^17.0.14": - version "17.0.14" - resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.14.tgz#c8f917156b652ddf807711f5becbd2ab018dea9f" - integrity sha512-H03xwEP1oXmSfl3iobtmQ/2dHF5aBHr8aUMwyGZya6OW45G+xtdzmq6HkncefiBt5JU8DVyaWl/nWZbjZCnzAQ== +"@types/react-dom@18.2.7": + version "18.2.7" + resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.7.tgz#67222a08c0a6ae0a0da33c3532348277c70abb63" + integrity sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA== dependencies: "@types/react" "*" -"@types/react-redux@^7.1.20", "@types/react-redux@^7.1.22": - version "7.1.22" - resolved "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.22.tgz#0eab76a37ef477cc4b53665aeaf29cb60631b72a" - integrity sha512-GxIA1kM7ClU73I6wg9IRTVwSO9GS+SAKZKe0Enj+82HMU6aoESFU2HNAdNi3+J53IaOHPiUfT3kSG4L828joDQ== - dependencies: - "@types/hoist-non-react-statics" "^3.3.0" - "@types/react" "*" - hoist-non-react-statics "^3.3.0" - redux "^4.0.0" - -"@types/react@*", "@types/react@^17.0.43": - version "17.0.43" - resolved "https://registry.npmjs.org/@types/react/-/react-17.0.43.tgz#4adc142887dd4a2601ce730bc56c3436fdb07a55" - integrity sha512-8Q+LNpdxf057brvPu1lMtC5Vn7J119xrP1aq4qiaefNioQUYANF/CYeK4NsKorSZyUGJ66g0IM+4bbjwx45o2A== +"@types/react@*", "@types/react@18.2.15": + version "18.2.15" + resolved "https://registry.npmjs.org/@types/react/-/react-18.2.15.tgz#14792b35df676c20ec3cf595b262f8c615a73066" + integrity sha512-oEjE7TQt1fFTFSbf8kkNuc798ahTUzn3Le67/PWjE8MAfYAD/qB7O8hSTcromLFqHCt9bcdOg5GXMokzTjJ5SA== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -1229,6 +1226,11 @@ dependencies: terser-webpack-plugin "*" +"@types/use-sync-external-store@^0.0.3": + version "0.0.3" + resolved "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43" + integrity sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA== + "@types/uuid@9.0.2": version "9.0.2" resolved "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.2.tgz#ede1d1b1e451548d44919dc226253e32a6952c4b" @@ -6085,7 +6087,7 @@ promise-stream-reader@^1.0.1: resolved "https://registry.npmjs.org/promise-stream-reader/-/promise-stream-reader-1.0.1.tgz#4e793a79c9d49a73ccd947c6da9c127f12923649" integrity sha512-Tnxit5trUjBAqqZCGWwjyxhmgMN4hGrtpW3Oc/tRI4bpm/O2+ej72BB08l6JBnGQgVDGCLvHFGjGgQS6vzhwXg== -prop-types@^15.7.2, prop-types@^15.8.1: +prop-types@^15.8.1: version "15.8.1" resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -6153,41 +6155,35 @@ rc@1.2.8: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-deep-force-update@2.1.3: - version "2.1.3" - resolved "https://registry.npmjs.org/react-deep-force-update/-/react-deep-force-update-2.1.3.tgz#740612322e617bcced38f61794a4af75dc3d98e7" - integrity sha512-lqD4eHKVuB65RyO/hGbEST53E2/GPbcIPcFYyeW/p4vNngtH4G7jnKGlU6u1OqrFo0uNfIvwuBOg98IbLHlNEA== - -react-dom@17.0.2: - version "17.0.2" - resolved "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23" - integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== +react-dom@18.2.0: + version "18.2.0" + resolved "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d" + integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" - scheduler "^0.20.2" + scheduler "^0.23.0" react-is@^16.13.1, react-is@^16.7.0: version "16.13.1" resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== -react-is@^17.0.2: - version "17.0.2" - resolved "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" - integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +react-is@^18.0.0: + version "18.2.0" + resolved "https://registry.npmjs.org/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b" + integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w== -react-redux@7.2.8: - version "7.2.8" - resolved "https://registry.npmjs.org/react-redux/-/react-redux-7.2.8.tgz#a894068315e65de5b1b68899f9c6ee0923dd28de" - integrity sha512-6+uDjhs3PSIclqoCk0kd6iX74gzrGc3W5zcAjbrFgEdIjRSQObdIwfx80unTkVUYvbQ95Y8Av3OvFHq1w5EOUw== +react-redux@8.1.1: + version "8.1.1" + resolved "https://registry.npmjs.org/react-redux/-/react-redux-8.1.1.tgz#8e740f3fd864a4cd0de5ba9cdc8ad39cc9e7c81a" + integrity sha512-5W0QaKtEhj+3bC0Nj0NkqkhIv8gLADH/2kYFMTHxCVqQILiWzLv6MaLuV5wJU3BQEdHKzTfcvPN0WMS6SC1oyA== dependencies: - "@babel/runtime" "^7.15.4" - "@types/react-redux" "^7.1.20" + "@babel/runtime" "^7.12.1" + "@types/hoist-non-react-statics" "^3.3.1" + "@types/use-sync-external-store" "^0.0.3" hoist-non-react-statics "^3.3.2" - loose-envify "^1.4.0" - prop-types "^15.7.2" - react-is "^17.0.2" + react-is "^18.0.0" + use-sync-external-store "^1.0.0" react-universal-interface@^0.6.2: version "0.6.2" @@ -6214,13 +6210,12 @@ react-use@^17.4.0: ts-easing "^0.2.0" tslib "^2.1.0" -react@17.0.2: - version "17.0.2" - resolved "https://registry.npmjs.org/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037" - integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== +react@18.2.0: + version "18.2.0" + resolved "https://registry.npmjs.org/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5" + integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" read-config-file@6.3.2: version "6.3.2" @@ -6317,7 +6312,7 @@ redux-thunk@2.4.2: resolved "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.4.2.tgz#b9d05d11994b99f7a91ea223e8b04cf0afa5ef3b" integrity sha512-+P3TjtnP0k/FEjcBL5FZpoovtvrTNT/UXd4/sluaSyrURlSlhLSzEdfsTBW7WsKB6yPvgd7q/iZPICFjW4o57Q== -redux@4.2.1, redux@^4.0.0: +redux@4.2.1: version "4.2.1" resolved "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz#c08f4306826c49b5e9dc901dee0452ea8fce6197" integrity sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w== @@ -6563,13 +6558,12 @@ sax@^1.2.4: resolved "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== -scheduler@^0.20.2: - version "0.20.2" - resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91" - integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== +scheduler@^0.23.0: + version "0.23.0" + resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe" + integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw== dependencies: loose-envify "^1.1.0" - object-assign "^4.1.1" schema-utils@^3.0.0, schema-utils@^3.1.1, schema-utils@^3.2.0: version "3.3.0" @@ -7515,6 +7509,11 @@ uri-js@^4.2.2: dependencies: punycode "^2.1.0" +use-sync-external-store@^1.0.0: + version "1.2.0" + resolved "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" + integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== + utf8-byte-length@^1.0.1: version "1.0.4" resolved "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz#f45f150c4c66eee968186505ab93fcbb8ad6bf61" From 7a5df2fc5e05af8a15f9839bbad71db0814ca163 Mon Sep 17 00:00:00 2001 From: Labhansh Agrawal Date: Mon, 24 Jul 2023 00:51:04 +0530 Subject: [PATCH 018/405] Update components --- lib/components/notification.tsx | 5 ++++- lib/components/notifications.tsx | 10 ++++++---- lib/components/searchBox.tsx | 10 ++++++---- lib/components/split-pane.tsx | 5 ++++- lib/components/style-sheet.tsx | 10 ++++++---- lib/components/tab.tsx | 9 ++++++--- lib/components/tabs.tsx | 10 ++++++---- lib/components/terms.tsx | 2 +- 8 files changed, 39 insertions(+), 22 deletions(-) diff --git a/lib/components/notification.tsx b/lib/components/notification.tsx index 21510a8e..1b394cc7 100644 --- a/lib/components/notification.tsx +++ b/lib/components/notification.tsx @@ -1,7 +1,10 @@ import React from 'react'; import type {NotificationProps, NotificationState} from '../hyper'; -export default class Notification extends React.PureComponent { +export default class Notification extends React.PureComponent< + React.PropsWithChildren, + NotificationState +> { dismissTimer!: NodeJS.Timeout; constructor(props: NotificationProps) { super(props); diff --git a/lib/components/notifications.tsx b/lib/components/notifications.tsx index f9e71de7..07793949 100644 --- a/lib/components/notifications.tsx +++ b/lib/components/notifications.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, {forwardRef} from 'react'; import {decorate} from '../utils/plugins'; @@ -7,9 +7,9 @@ import type {NotificationsProps} from '../hyper'; const Notification = decorate(Notification_, 'Notification'); -const Notifications: React.FC = (props) => { +const Notifications = forwardRef((props, ref) => { return ( -
+
{props.customChildrenBefore} {props.fontShowing && ( = (props) => { `}
); -}; +}); + +Notifications.displayName = 'Notifications'; export default Notifications; diff --git a/lib/components/searchBox.tsx b/lib/components/searchBox.tsx index b9ff6086..c172584d 100644 --- a/lib/components/searchBox.tsx +++ b/lib/components/searchBox.tsx @@ -1,4 +1,4 @@ -import React, {useCallback, useRef, useEffect} from 'react'; +import React, {useCallback, useRef, useEffect, forwardRef} from 'react'; import type {SearchBoxProps} from '../hyper'; import {VscArrowUp} from '@react-icons/all-files/vsc/VscArrowUp'; import {VscArrowDown} from '@react-icons/all-files/vsc/VscArrowDown'; @@ -82,7 +82,7 @@ const SearchButton = ({ ); }; -const SearchBox = (props: SearchBoxProps) => { +const SearchBox = forwardRef((props, ref) => { const { caseSensitive, wholeWord, @@ -127,7 +127,7 @@ const SearchBox = (props: SearchBoxProps) => { }; return ( -
+
@@ -228,6 +228,8 @@ const SearchBox = (props: SearchBoxProps) => {
); -}; +}); + +SearchBox.displayName = 'SearchBox'; export default SearchBox; diff --git a/lib/components/split-pane.tsx b/lib/components/split-pane.tsx index 0b979755..9c67d413 100644 --- a/lib/components/split-pane.tsx +++ b/lib/components/split-pane.tsx @@ -2,7 +2,10 @@ import React from 'react'; import sum from 'lodash/sum'; import type {SplitPaneProps} from '../hyper'; -export default class SplitPane extends React.PureComponent { +export default class SplitPane extends React.PureComponent< + React.PropsWithChildren, + {dragging: boolean} +> { dragPanePosition!: number; dragTarget!: Element; panes!: Element[]; diff --git a/lib/components/style-sheet.tsx b/lib/components/style-sheet.tsx index f8079740..0c9ef4bb 100644 --- a/lib/components/style-sheet.tsx +++ b/lib/components/style-sheet.tsx @@ -1,11 +1,11 @@ -import React from 'react'; +import React, {forwardRef} from 'react'; import type {StyleSheetProps} from '../hyper'; -const StyleSheet: React.FC = (props) => { +const StyleSheet: React.FC = forwardRef((props, ref) => { const {borderColor} = props; return ( - ); -}; +}); + +StyleSheet.displayName = 'StyleSheet'; export default StyleSheet; diff --git a/lib/components/tab.tsx b/lib/components/tab.tsx index 6c9ded50..5c4c1329 100644 --- a/lib/components/tab.tsx +++ b/lib/components/tab.tsx @@ -1,7 +1,7 @@ -import React from 'react'; +import React, {forwardRef} from 'react'; import type {TabProps} from '../hyper'; -const Tab = (props: TabProps) => { +const Tab = forwardRef((props, ref) => { const handleClick = (event: React.MouseEvent) => { const isLeftClick = event.nativeEvent.which === 1; @@ -28,6 +28,7 @@ const Tab = (props: TabProps) => { className={`tab_tab ${isFirst ? 'tab_first' : ''} ${isActive ? 'tab_active' : ''} ${ isFirst && isActive ? 'tab_firstActive' : '' } ${hasActivity ? 'tab_hasActivity' : ''}`} + ref={ref} > {props.customChildrenBefore} { `} ); -}; +}); + +Tab.displayName = 'Tab'; export default Tab; diff --git a/lib/components/tabs.tsx b/lib/components/tabs.tsx index 60a1ecd5..e966b317 100644 --- a/lib/components/tabs.tsx +++ b/lib/components/tabs.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, {forwardRef} from 'react'; import {decorate, getTabProps} from '../utils/plugins'; @@ -9,13 +9,13 @@ import DropdownButton from './new-tab'; const Tab = decorate(Tab_, 'Tab'); const isMac = /Mac/.test(navigator.userAgent); -const Tabs = (props: TabsProps) => { +const Tabs = forwardRef((props, ref) => { const {tabs = [], borderColor, onChange, onClose, fullScreen} = props; const hide = !isMac && tabs.length === 1; return ( -