Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v7.0.22 #9274

Merged
merged 16 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ updates:
- dependency-name: handsontable
- dependency-name: typeorm
- dependency-name: mysql2

- dependency-name: "@codemirror/*"

2 changes: 1 addition & 1 deletion apps/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@growi/app",
"version": "7.0.21",
"version": "7.0.22-RC.0",
"license": "MIT",
"private": "true",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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 (
<>
Expand Down
8 changes: 7 additions & 1 deletion apps/app/src/pages/[[...path]].page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ const Page: NextPageWithLayout<Props> = (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.
Expand All @@ -294,6 +293,13 @@ const Page: NextPageWithLayout<Props> = (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);
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/stores/yjs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const useSWRMUTxCurrentPageYjsData = (): SWRMutationResponse<CurrentPageY

return useSWRMutation(
key,
([endpoint]) => apiv3Get<{ yjsData: CurrentPageYjsData }>(endpoint).then(result => result.data.yjsData),
endpoint => apiv3Get<{ yjsData: CurrentPageYjsData }>(endpoint).then(result => result.data.yjsData),
{ populateCache: true, revalidate: false },
);
};
22 changes: 14 additions & 8 deletions apps/app/src/utils/next.config.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
});
});
Expand All @@ -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);
}
}
});

Expand Down
2 changes: 1 addition & 1 deletion apps/slackbot-proxy/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
12 changes: 7 additions & 5 deletions packages/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,24 @@
},
"// 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://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": {
"@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",
"@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",
Expand Down
90 changes: 39 additions & 51 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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==
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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"

Expand Down Expand Up @@ -3227,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/[email protected]":
"@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==
Expand Down Expand Up @@ -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==
Expand All @@ -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"
Expand Down Expand Up @@ -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==
Expand All @@ -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"
Expand Down Expand Up @@ -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==
Expand All @@ -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"
Expand Down
Loading