From 485f4ffbfd20278ad1103ff8a55d19d8a73d56e7 Mon Sep 17 00:00:00 2001 From: GitHub Action <> Date: Tue, 15 Oct 2024 08:20:13 +0000 Subject: [PATCH 01/10] Bump version --- apps/app/package.json | 2 +- apps/slackbot-proxy/package.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/app/package.json b/apps/app/package.json index 93c1ac39e13..473b4d157ca 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -1,6 +1,6 @@ { "name": "@growi/app", - "version": "7.0.21", + "version": "7.0.22-RC.0", "license": "MIT", "private": "true", "scripts": { diff --git a/apps/slackbot-proxy/package.json b/apps/slackbot-proxy/package.json index 9d644fb010e..f99483bdc11 100644 --- a/apps/slackbot-proxy/package.json +++ b/apps/slackbot-proxy/package.json @@ -1,6 +1,6 @@ { "name": "@growi/slackbot-proxy", - "version": "7.0.21-slackbot-proxy.0", + "version": "7.0.22-slackbot-proxy.0", "license": "MIT", "private": "true", "scripts": { diff --git a/package.json b/package.json index 837f14dac70..9cb5a5e482b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "growi", - "version": "7.0.21", + "version": "7.0.22-RC.0", "description": "Team collaboration software using markdown", "license": "MIT", "private": "true", From 8820d68340eca7f2b7652e3087ba406ea72d686d Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 18 Oct 2024 09:07:50 +0000 Subject: [PATCH 02/10] fix versions --- packages/editor/package.json | 10 ++-- yarn.lock | 88 ++++++++++++++++-------------------- 2 files changed, 44 insertions(+), 54 deletions(-) diff --git a/packages/editor/package.json b/packages/editor/package.json index 0ab4984d4e1..9eff09e9c0d 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -25,15 +25,17 @@ }, "// comments for devDependencies": { "string-width": "5.0.0 or above exports only ESM.", + "@codemirror/*": "Fix version of @codemirror/state < 6.4.0 due to fix the issue of https://redmine.weseek.co.jp/issues/155911", "@codemirror/merge": "Fixed version at 6.0.0 due to errors caused by dependent packages" }, "devDependencies": { - "@codemirror/lang-markdown": "^6.3.0", - "@codemirror/language": "^6.10.3", + "@codemirror/commands": "~6.2.5", + "@codemirror/lang-markdown": "~6.2.5", + "@codemirror/language": "~6.9.3", "@codemirror/language-data": "^6.5.1", "@codemirror/merge": "6.0.0", - "@codemirror/state": "^6.4.1", - "@codemirror/view": "^6.34.1", + "@codemirror/state": "~6.3.0", + "@codemirror/view": "~6.22.3", "@emoji-mart/data": "^1.2.1", "@emoji-mart/react": "^1.1.1", "@growi/core": "link:../core", diff --git a/yarn.lock b/yarn.lock index 9acaec822e3..5cb5a0fdde4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1493,15 +1493,15 @@ "@codemirror/view" "^6.17.0" "@lezer/common" "^1.0.0" -"@codemirror/commands@^6.0.0", "@codemirror/commands@^6.1.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@codemirror/commands/-/commands-6.6.0.tgz#d308f143fe1b8896ca25fdb855f66acdaf019dd4" - integrity sha512-qnY+b7j1UNcTS31Eenuc/5YJB6gQOzkUoNmJQc0rznwqSRpeaWWpjkWy2C/MPTcePpsKJEM26hXrOXl1+nceXg== +"@codemirror/commands@^6.0.0", "@codemirror/commands@^6.1.0", "@codemirror/commands@~6.2.5": + version "6.2.5" + resolved "https://registry.yarnpkg.com/@codemirror/commands/-/commands-6.2.5.tgz#e889f93f9cc85b32f6b2844d85d08688f695a6b8" + integrity sha512-dSi7ow2P2YgPBZflR9AJoaTHvqmeGIgkhignYMd5zK5y6DANTvxKxp6eMEpIDUJkRAaOY/TFZ4jP1ADIO/GLVA== dependencies: "@codemirror/language" "^6.0.0" - "@codemirror/state" "^6.4.0" - "@codemirror/view" "^6.27.0" - "@lezer/common" "^1.1.0" + "@codemirror/state" "^6.2.0" + "@codemirror/view" "^6.0.0" + "@lezer/common" "^1.0.0" "@codemirror/lang-angular@^0.1.0": version "0.1.3" @@ -1614,7 +1614,7 @@ "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.3.1" -"@codemirror/lang-markdown@^6.0.0", "@codemirror/lang-markdown@^6.3.0": +"@codemirror/lang-markdown@^6.0.0": version "6.3.0" resolved "https://registry.yarnpkg.com/@codemirror/lang-markdown/-/lang-markdown-6.3.0.tgz#949f8803332441705ed6def34c565f2166479538" integrity sha512-lYrI8SdL/vhd0w0aHIEvIRLRecLF7MiiRfzXFZY94dFwHqC9HtgxgagJ8fyYNBldijGatf9wkms60d8SrAj6Nw== @@ -1627,6 +1627,19 @@ "@lezer/common" "^1.2.1" "@lezer/markdown" "^1.0.0" +"@codemirror/lang-markdown@~6.2.5": + version "6.2.5" + resolved "https://registry.yarnpkg.com/@codemirror/lang-markdown/-/lang-markdown-6.2.5.tgz#451941bf743d3788e73598f1aedb71cbeb6f71ba" + integrity sha512-Hgke565YcO4fd9pe2uLYxnMufHO5rQwRr+AAhFq8ABuhkrjyX8R5p5s+hZUTdV60O0dMRjxKhBLxz8pu/MkUVA== + dependencies: + "@codemirror/autocomplete" "^6.7.1" + "@codemirror/lang-html" "^6.0.0" + "@codemirror/language" "^6.3.0" + "@codemirror/state" "^6.0.0" + "@codemirror/view" "^6.0.0" + "@lezer/common" "^1.2.1" + "@lezer/markdown" "^1.0.0" + "@codemirror/lang-php@^6.0.0": version "6.0.1" resolved "https://registry.yarnpkg.com/@codemirror/lang-php/-/lang-php-6.0.1.tgz#fa34cc75562178325861a5731f79bd621f57ffaa" @@ -1754,13 +1767,13 @@ "@codemirror/language" "^6.0.0" "@codemirror/legacy-modes" "^6.4.0" -"@codemirror/language@^6.0.0", "@codemirror/language@^6.10.3", "@codemirror/language@^6.3.0", "@codemirror/language@^6.4.0", "@codemirror/language@^6.6.0", "@codemirror/language@^6.8.0": - version "6.10.3" - resolved "https://registry.yarnpkg.com/@codemirror/language/-/language-6.10.3.tgz#eb25fc5ade19032e7bf1dcaa957804e5f1660585" - integrity sha512-kDqEU5sCP55Oabl6E7m5N+vZRoc0iWqgDVhEKifcHzPzjqCegcO4amfrYVL9PmPZpl4G0yjkpTpUO/Ui8CzO8A== +"@codemirror/language@^6.0.0", "@codemirror/language@^6.3.0", "@codemirror/language@^6.4.0", "@codemirror/language@^6.6.0", "@codemirror/language@^6.8.0", "@codemirror/language@~6.9.3": + version "6.9.3" + resolved "https://registry.yarnpkg.com/@codemirror/language/-/language-6.9.3.tgz#1c127dc43e025d4c9b1ba1b79f4b1ba081d5aeaa" + integrity sha512-qq48pYzoi6ldYWV/52+Z9Ou6QouVI+8YwvxFbUypI33NbjG2UeRHKENRyhwljTTiOqjQ33FjyZj6EREQ9apAOQ== dependencies: "@codemirror/state" "^6.0.0" - "@codemirror/view" "^6.23.0" + "@codemirror/view" "^6.0.0" "@lezer/common" "^1.1.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" @@ -1799,10 +1812,10 @@ "@codemirror/view" "^6.0.0" crelt "^1.0.5" -"@codemirror/state@^6.0.0", "@codemirror/state@^6.1.1", "@codemirror/state@^6.4.0", "@codemirror/state@^6.4.1": - version "6.4.1" - resolved "https://registry.yarnpkg.com/@codemirror/state/-/state-6.4.1.tgz#da57143695c056d9a3c38705ed34136e2b68171b" - integrity sha512-QkEyUiLhsJoZkbumGZlswmAhA7CBU02Wrz7zvH4SrcifbsqwlXShVXg65f3v/ts57W3dqyamEriMhij1Z3Zz4A== +"@codemirror/state@^6.0.0", "@codemirror/state@^6.1.1", "@codemirror/state@^6.1.4", "@codemirror/state@^6.2.0", "@codemirror/state@~6.3.0": + version "6.3.3" + resolved "https://registry.yarnpkg.com/@codemirror/state/-/state-6.3.3.tgz#6a647c2fa62b68604187152de497e91aabf43f82" + integrity sha512-0wufKcTw2dEwEaADajjHf6hBy1sh3M6V0e+q4JKIhLuiMSe5td5HOWpUdvKth1fT1M9VYOboajoBHpkCd7PG7A== "@codemirror/theme-one-dark@^6.0.0": version "6.1.2" @@ -1814,12 +1827,12 @@ "@codemirror/view" "^6.0.0" "@lezer/highlight" "^1.0.0" -"@codemirror/view@^6.0.0", "@codemirror/view@^6.17.0", "@codemirror/view@^6.23.0", "@codemirror/view@^6.27.0", "@codemirror/view@^6.34.1": - version "6.34.1" - resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.34.1.tgz#b17ed29c563e4adc60086233f2d3e7197e2dc33e" - integrity sha512-t1zK/l9UiRqwUNPm+pdIT0qzJlzuVckbTEMVNFhfWkGiBQClstzg+78vedCvLSX0xJEZ6lwZbPpnljL7L6iwMQ== +"@codemirror/view@^6.0.0", "@codemirror/view@^6.17.0", "@codemirror/view@~6.22.3": + version "6.22.3" + resolved "https://registry.yarnpkg.com/@codemirror/view/-/view-6.22.3.tgz#22514a0256d0fbd3e9079d7c49cb97f35593156c" + integrity sha512-rqnq+Zospwoi3x1vZ8BGV1MlRsaGljX+6qiGYmIpJ++M+LCC+wjfDaPklhwpWSgv7pr/qx29KiAKQBH5+DOn4w== dependencies: - "@codemirror/state" "^6.4.0" + "@codemirror/state" "^6.1.4" style-mod "^4.1.0" w3c-keyname "^2.2.4" @@ -16998,7 +17011,7 @@ string-template@>=1.0.0: resolved "https://registry.yarnpkg.com/string-template/-/string-template-1.0.0.tgz#9e9f2233dc00f218718ec379a28a5673ecca8b96" integrity sha1-np8iM9wA8hhxjsN5oopWc+zKi5Y= -"string-width-cjs@npm:string-width@^4.2.0": +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -17016,15 +17029,6 @@ string-width@=4.2.2: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.0" -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -17108,7 +17112,7 @@ stringify-entities@^4.0.0: character-entities-html4 "^2.0.0" character-entities-legacy "^3.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -17122,13 +17126,6 @@ strip-ansi@^3.0.0: dependencies: ansi-regex "^2.0.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1, strip-ansi@^7.1.0: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -18923,7 +18920,7 @@ word-wrap@^1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -18941,15 +18938,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 89bea943a3997402451cc0c54def0a2854918fac Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 18 Oct 2024 09:37:36 +0000 Subject: [PATCH 03/10] clean version expression --- packages/editor/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/package.json b/packages/editor/package.json index 9eff09e9c0d..c27982d9613 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -42,7 +42,7 @@ "@growi/core-styles": "link:../core-styles", "@popperjs/core": "^2.11.8", "@replit/codemirror-emacs": "^6.1.0", - "@replit/codemirror-vim": "6.2.1", + "@replit/codemirror-vim": "^6.2.1", "@replit/codemirror-vscode-keymap": "^6.0.2", "@types/react": "^18.2.14", "@types/react-dom": "^18.2.6", From 5eaad1d914bbb05efd3d6a46f71a39032b07af23 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 18 Oct 2024 09:45:46 +0000 Subject: [PATCH 04/10] update comment --- packages/editor/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/package.json b/packages/editor/package.json index c27982d9613..e2bf3c1a443 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -25,7 +25,7 @@ }, "// comments for devDependencies": { "string-width": "5.0.0 or above exports only ESM.", - "@codemirror/*": "Fix version of @codemirror/state < 6.4.0 due to fix the issue of https://redmine.weseek.co.jp/issues/155911", + "@codemirror/*": "Fix version of @codemirror/state < 6.4.0 due to fix the issue of https://github.com/weseek/growi/pull/9267 and https://github.com/weseek/growi/pull/9043", "@codemirror/merge": "Fixed version at 6.0.0 due to errors caused by dependent packages" }, "devDependencies": { From bf0c25f5dd482f5cf97b58e0c3d92c9542e55426 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 18 Oct 2024 10:32:08 +0000 Subject: [PATCH 05/10] fix SWR --- apps/app/src/stores/yjs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/app/src/stores/yjs.ts b/apps/app/src/stores/yjs.ts index 8ae1fabe678..75431d8109b 100644 --- a/apps/app/src/stores/yjs.ts +++ b/apps/app/src/stores/yjs.ts @@ -43,7 +43,7 @@ export const useSWRMUTxCurrentPageYjsData = (): SWRMutationResponse apiv3Get<{ yjsData: CurrentPageYjsData }>(endpoint).then(result => result.data.yjsData), + endpoint => apiv3Get<{ yjsData: CurrentPageYjsData }>(endpoint).then(result => result.data.yjsData), { populateCache: true, revalidate: false }, ); }; From e3ae77b938b96f406addcdcfe44d38ce07647695 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 18 Oct 2024 10:32:23 +0000 Subject: [PATCH 06/10] fix show condition --- .../src/client/components/ReactMarkdownComponents/Header.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/app/src/client/components/ReactMarkdownComponents/Header.tsx b/apps/app/src/client/components/ReactMarkdownComponents/Header.tsx index d9872cebe00..ec6cf643242 100644 --- a/apps/app/src/client/components/ReactMarkdownComponents/Header.tsx +++ b/apps/app/src/client/components/ReactMarkdownComponents/Header.tsx @@ -67,7 +67,7 @@ export const Header = (props: HeaderProps): JSX.Element => { const { data: isReadOnlyUser } = useIsReadOnlyUser(); const { data: isSharedUser } = useIsSharedUser(); const { data: shareLinkId } = useShareLinkId(); - const { data: currentPageYjsData } = useCurrentPageYjsData(); + const { data: currentPageYjsData, isLoading: isLoadingCurrentPageYjsData } = useCurrentPageYjsData(); const router = useRouter(); @@ -118,7 +118,7 @@ export const Header = (props: HeaderProps): JSX.Element => { // It will be possible to address this TODO ySyncAnnotation become available for import. // Ref: https://github.com/yjs/y-codemirror.next/pull/30 const showEditButton = !isGuestUser && !isReadOnlyUser && !isSharedUser && shareLinkId == null - && currentPageYjsData?.hasYdocsNewerThanLatestRevision === false; + && (!isLoadingCurrentPageYjsData && !currentPageYjsData?.hasYdocsNewerThanLatestRevision); return ( <> From a30ce6cb0c03253f4c8006762a800f3c177315ff Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 18 Oct 2024 10:32:56 +0000 Subject: [PATCH 07/10] load current yjs data even when SSR --- apps/app/src/pages/[[...path]].page.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/app/src/pages/[[...path]].page.tsx b/apps/app/src/pages/[[...path]].page.tsx index 4dd4124783e..1a922be51a5 100644 --- a/apps/app/src/pages/[[...path]].page.tsx +++ b/apps/app/src/pages/[[...path]].page.tsx @@ -282,7 +282,6 @@ const Page: NextPageWithLayout = (props: Props) => { const mutatePageData = async() => { const pageData = await mutateCurrentPage(); mutateEditingMarkdown(pageData?.revision?.body); - mutateCurrentPageYjsDataFromApi(); }; // If skipSSR is true, use the API to retrieve page data. @@ -294,6 +293,13 @@ const Page: NextPageWithLayout = (props: Props) => { mutateCurrentPageYjsDataFromApi, mutateEditingMarkdown, props.isNotFound, props.skipSSR, ]); + // Load current yjs data + useEffect(() => { + if (currentPageId != null && revisionId != null && !props.isNotFound) { + mutateCurrentPageYjsDataFromApi(); + } + }, [currentPageId, mutateCurrentPageYjsDataFromApi, props.isNotFound, revisionId]); + // sync pathname by Shallow Routing https://nextjs.org/docs/routing/shallow-routing useEffect(() => { const decodedURI = decodeURI(window.location.pathname); From 775a740ba65bf60f8841749a4969ec1f74f52623 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 18 Oct 2024 11:07:18 +0000 Subject: [PATCH 08/10] check package.json existence --- apps/app/src/utils/next.config.utils.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/apps/app/src/utils/next.config.utils.js b/apps/app/src/utils/next.config.utils.js index ec68077c3ee..6644caf93a1 100644 --- a/apps/app/src/utils/next.config.utils.js +++ b/apps/app/src/utils/next.config.utils.js @@ -25,14 +25,17 @@ exports.listScopedPackages = (scopes, opts = defaultOpts) => { fs.readdirSync(path.resolve(nodeModulesPath, scope)) .filter(name => !name.startsWith('.')) .forEach((folderName) => { - const { name } = require(path.resolve( + const packageJsonPath = path.resolve( nodeModulesPath, scope, folderName, 'package.json', - )); - if (!opts.ignorePackageNames.includes(name)) { - scopedPackages.push(name); + ); + if (fs.existsSync(packageJsonPath)) { + const { name } = require(packageJsonPath); + if (!opts.ignorePackageNames.includes(name)) { + scopedPackages.push(name); + } } }); }); @@ -51,13 +54,16 @@ exports.listPrefixedPackages = (prefixes, opts = defaultOpts) => { .filter(name => prefixes.some(prefix => name.startsWith(prefix))) .filter(name => !name.startsWith('.')) .forEach((folderName) => { - const { name } = require(path.resolve( + const packageJsonPath = path.resolve( nodeModulesPath, folderName, 'package.json', - )); - if (!opts.ignorePackageNames.includes(name)) { - prefixedPackages.push(name); + ); + if (fs.existsSync(packageJsonPath)) { + const { name } = require(packageJsonPath); + if (!opts.ignorePackageNames.includes(name)) { + prefixedPackages.push(name); + } } }); From 32c112ec307426305fd80ba5511c24bc62606bdc Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 18 Oct 2024 11:21:31 +0000 Subject: [PATCH 09/10] update yarn.lock --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 5cb5a0fdde4..41ff790820f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3240,7 +3240,7 @@ resolved "https://registry.yarnpkg.com/@replit/codemirror-emacs/-/codemirror-emacs-6.1.0.tgz#662dffc3b354c47cbf930219f8cb75cfc9e7f6fe" integrity sha512-74DITnht6Cs6sHg02PQ169IKb1XgtyhI9sLD0JeOFco6Ds18PT+dkD8+DgXBDokne9UIFKsBbKPnpFRAz60/Lw== -"@replit/codemirror-vim@6.2.1": +"@replit/codemirror-vim@^6.2.1": version "6.2.1" resolved "https://registry.yarnpkg.com/@replit/codemirror-vim/-/codemirror-vim-6.2.1.tgz#6673ff4be93b7da03d303ef37d6cbfa5f647b74b" integrity sha512-qDAcGSHBYU5RrdO//qCmD8K9t6vbP327iCj/iqrkVnjbrpFhrjOt92weGXGHmTNRh16cUtkUZ7Xq7rZf+8HVow== From 4aed06cd49323edfac68a1e13d7117e31c602a61 Mon Sep 17 00:00:00 2001 From: Yuki Takei Date: Fri, 18 Oct 2024 11:48:59 +0000 Subject: [PATCH 10/10] ignore codemirror packages for dependabot --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5b6ac13c4d9..904bf0b0bce 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -30,5 +30,5 @@ updates: - dependency-name: handsontable - dependency-name: typeorm - dependency-name: mysql2 - + - dependency-name: "@codemirror/*"