Просмотр исходного кода

Merge branch 'master' into support/add-comment-e-two-e-test

ryoji-s 2 лет назад
Родитель
Сommit
87fd52d6ec
44 измененных файлов с 513 добавлено и 309 удалено
  1. 2 0
      .github/release-drafter.yml
  2. 2 0
      .github/workflows/ci-app-prod.yml
  3. 3 2
      .github/workflows/draft-release.yml
  4. 1 1
      .mergify.yml
  5. 24 1
      CHANGELOG.md
  6. 2 2
      apps/app/package.json
  7. 1 1
      apps/app/public/static/locales/en_US/translation.json
  8. 1 1
      apps/app/public/static/locales/ja_JP/translation.json
  9. 1 1
      apps/app/public/static/locales/zh_CN/translation.json
  10. 2 3
      apps/app/src/components/Navbar/PageEditorModeManager.jsx
  11. 1 1
      apps/app/src/components/NotCreatablePage.tsx
  12. 9 6
      apps/app/src/components/PageAlert/TrashPageAlert.tsx
  13. 2 3
      apps/app/src/components/PrivateLegacyPages.tsx
  14. 3 10
      apps/app/src/components/Sidebar/SidebarNav.tsx
  15. 9 3
      apps/app/src/components/TemplateModal/TemplateModal.tsx
  16. 15 0
      apps/app/src/stores/context.tsx
  17. 2 4
      apps/app/test/cypress/e2e/20-basic-features/20-basic-features--access-to-page.cy.ts
  18. 4 1
      apps/app/test/cypress/tsconfig.json
  19. 1 1
      apps/slackbot-proxy/package.json
  20. 8 8
      package.json
  21. 1 1
      packages/core/package.json
  22. 1 1
      packages/core/vite.config.ts
  23. 1 1
      packages/hackmd/package.json
  24. 1 1
      packages/hackmd/vite.config.js
  25. 1 1
      packages/pluginkit/vite.config.ts
  26. 1 1
      packages/presentation/package.json
  27. 1 1
      packages/presentation/vite.config.ts
  28. 1 1
      packages/preset-templates/package.json
  29. 1 1
      packages/preset-themes/package.json
  30. 1 1
      packages/preset-themes/vite.libs.config.ts
  31. 1 1
      packages/remark-attachment-refs/package.json
  32. 1 1
      packages/remark-attachment-refs/vite.client.config.ts
  33. 1 1
      packages/remark-attachment-refs/vite.server.config.ts
  34. 1 1
      packages/remark-drawio/package.json
  35. 1 1
      packages/remark-drawio/vite.config.ts
  36. 1 1
      packages/remark-growi-directive/package.json
  37. 2 2
      packages/remark-lsx/package.json
  38. 1 1
      packages/remark-lsx/vite.client.config.ts
  39. 1 1
      packages/remark-lsx/vite.server.config.ts
  40. 1 1
      packages/slack/package.json
  41. 1 1
      packages/slack/vite.config.ts
  42. 1 1
      packages/ui/package.json
  43. 1 1
      packages/ui/vite.config.ts
  44. 396 236
      yarn.lock

+ 2 - 0
.github/release-drafter.yml

@@ -1,3 +1,5 @@
+# Filter previous releases to consider only those with the target matching commitish.
+filter-by-commitish: true
 categories:
 categories:
   - title: 'BREAKING CHANGES'
   - title: 'BREAKING CHANGES'
     labels:
     labels:

+ 2 - 0
.github/workflows/ci-app-prod.yml

@@ -4,6 +4,7 @@ on:
   push:
   push:
     branches:
     branches:
       - master
       - master
+      - dev/6.*.x
     paths:
     paths:
       - .github/workflows/ci-app-prod.yml
       - .github/workflows/ci-app-prod.yml
       - .github/workflows/reusable-app-prod.yml
       - .github/workflows/reusable-app-prod.yml
@@ -18,6 +19,7 @@ on:
   pull_request:
   pull_request:
     branches:
     branches:
       - master
       - master
+      - dev/6.*.x
     types: [opened, reopened, synchronize]
     types: [opened, reopened, synchronize]
     paths:
     paths:
       - .github/workflows/ci-app-prod.yml
       - .github/workflows/ci-app-prod.yml

+ 3 - 2
.github/workflows/draft-release.yml

@@ -4,6 +4,8 @@ on:
   push:
   push:
     branches:
     branches:
       - master
       - master
+      - dev/*.*.*
+
 
 
 concurrency:
 concurrency:
   group: ${{ github.workflow }}-${{ github.ref }}
   group: ${{ github.workflow }}-${{ github.ref }}
@@ -27,7 +29,6 @@ jobs:
         uses: myrotvorets/info-from-package-json-action@1.2.0
         uses: myrotvorets/info-from-package-json-action@1.2.0
         id: package-json
         id: package-json
 
 
-      # Drafts your next Release notes as Pull Requests are merged into "master"
       - uses: release-drafter/release-drafter@v5
       - uses: release-drafter/release-drafter@v5
         id: release-drafter
         id: release-drafter
         with:
         with:
@@ -60,7 +61,7 @@ jobs:
         env:
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
           GIT_PR_RELEASE_BRANCH_PRODUCTION: release/current
           GIT_PR_RELEASE_BRANCH_PRODUCTION: release/current
-          GIT_PR_RELEASE_BRANCH_STAGING: master
+          GIT_PR_RELEASE_BRANCH_STAGING: ${{ github.ref_name }}
           GIT_PR_RELEASE_TEMPLATE: .github/git-pr-release-template.erb
           GIT_PR_RELEASE_TEMPLATE: .github/git-pr-release-template.erb
           GIT_PR_RELEASE_TITLE: Release v${{ steps.release-version.outputs.RELEASE_VERSION }}
           GIT_PR_RELEASE_TITLE: Release v${{ steps.release-version.outputs.RELEASE_VERSION }}
           GIT_PR_RELEASE_BODY: ${{ needs.update-release-draft.outputs.RELEASE_DRAFT_BODY }}
           GIT_PR_RELEASE_BODY: ${{ needs.update-release-draft.outputs.RELEASE_DRAFT_BODY }}

+ 1 - 1
.mergify.yml

@@ -6,8 +6,8 @@ pull_request_rules:
       - check-success = "lint (18.x)"
       - check-success = "lint (18.x)"
       - check-success = "test (18.x)"
       - check-success = "test (18.x)"
       - check-success = "launch-dev (18.x)"
       - check-success = "launch-dev (18.x)"
-      - check-success = "test-prod-node14 / launch-prod"
       - check-success = "test-prod-node16 / launch-prod"
       - check-success = "test-prod-node16 / launch-prod"
+      - check-success = "test-prod-node18 / launch-prod"
     actions:
     actions:
       merge:
       merge:
         method: merge
         method: merge

+ 24 - 1
CHANGELOG.md

@@ -1,9 +1,32 @@
 # Changelog
 # Changelog
 
 
-## [Unreleased](https://github.com/weseek/growi/compare/v6.1.7...HEAD)
+## [Unreleased](https://github.com/weseek/growi/compare/v6.1.8...HEAD)
 
 
 *Please do not manually update this file. We've automated the process.*
 *Please do not manually update this file. We've automated the process.*
 
 
+## [v6.1.8](https://github.com/weseek/growi/compare/v6.1.7...v6.1.8) - 2023-07-24
+
+### 💎 Features
+
+- feat: Add plugin badge to TemplateModal's list of templates (#7897) @TatsuyaIse
+
+### 🚀 Improvement
+
+- imprv: Replace isAdmin with usersAdminHooks (#7840) @WNomunomu
+- imprv: Show alert for trashed pages only when the page is not empty (#7903) @TatsuyaIse
+- imprv: Template name truncation (#7898) @TatsuyaIse
+
+### 🐛 Bug Fixes
+
+- fix: Cancel a comment will cancel all comments (#7804) @mudana-grune
+
+### 🧰 Maintenance
+
+- ci(deps-dev): bump vite from 4.3.8 to 4.4.5 (#7901) @dependabot
+- ci(deps): bump semver from 5.7.1 to 5.7.2 (#7867) @dependabot
+- ci(deps): bump mongoose from 6.11.1 to 6.11.3 (#7891) @dependabot
+- ci(deps): bump word-wrap from 1.2.3 to 1.2.4 (#7892) @dependabot
+
 ## [v6.1.7](https://github.com/weseek/growi/compare/v6.1.6...v6.1.7) - 2023-07-19
 ## [v6.1.7](https://github.com/weseek/growi/compare/v6.1.6...v6.1.7) - 2023-07-19
 
 
 ### 💎 Features
 ### 💎 Features

+ 2 - 2
apps/app/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@growi/app",
   "name": "@growi/app",
-  "version": "6.1.8-RC.0",
+  "version": "6.1.9-RC.0",
   "license": "MIT",
   "license": "MIT",
   "scripts": {
   "scripts": {
     "//// for production": "",
     "//// for production": "",
@@ -131,7 +131,7 @@
     "method-override": "^3.0.0",
     "method-override": "^3.0.0",
     "migrate-mongo": "^8.2.3",
     "migrate-mongo": "^8.2.3",
     "mkdirp": "^1.0.3",
     "mkdirp": "^1.0.3",
-    "mongoose": "^6.5.0",
+    "mongoose": "^6.11.3",
     "mongoose-gridfs": "^1.2.42",
     "mongoose-gridfs": "^1.2.42",
     "mongoose-paginate-v2": "^1.3.9",
     "mongoose-paginate-v2": "^1.3.9",
     "mongoose-unique-validator": "^2.0.3",
     "mongoose-unique-validator": "^2.0.3",

+ 1 - 1
apps/app/public/static/locales/en_US/translation.json

@@ -165,7 +165,7 @@
   "folder_name": "Folder name",
   "folder_name": "Folder name",
   "field": "field",
   "field": "field",
   "not_creatable_page": {
   "not_creatable_page": {
-    "could_not_creata_path": "Couldn't create path."
+    "message": "Page contents cannot be created in this path."
   },
   },
   "custom_navigation": {
   "custom_navigation": {
     "no_pages_under_this_page": "There are no pages under this page."
     "no_pages_under_this_page": "There are no pages under this page."

+ 1 - 1
apps/app/public/static/locales/ja_JP/translation.json

@@ -166,7 +166,7 @@
   "folder_name": "フォルダ名",
   "folder_name": "フォルダ名",
   "field": "フィールド",
   "field": "フィールド",
   "not_creatable_page": {
   "not_creatable_page": {
-    "could_not_creata_path": "パスを作成できませんでした。"
+    "message": "このパスではページ コンテンツを作成できません。"
   },
   },
   "custom_navigation": {
   "custom_navigation": {
     "no_pages_under_this_page": "このページの配下にはページが存在しません。"
     "no_pages_under_this_page": "このページの配下にはページが存在しません。"

+ 1 - 1
apps/app/public/static/locales/zh_CN/translation.json

@@ -172,7 +172,7 @@
   "folder_name": "文件夹名称",
   "folder_name": "文件夹名称",
   "field": "字段",
   "field": "字段",
   "not_creatable_page": {
   "not_creatable_page": {
-    "could_not_creata_path": "无法创建路径"
+    "message": "无法在此路径中创建页面内容。"
   },
   },
   "custom_navigation": {
   "custom_navigation": {
     "no_pages_under_this_page": "There are no pages under this page."
     "no_pages_under_this_page": "There are no pages under this page."

+ 2 - 3
apps/app/src/components/Navbar/PageEditorModeManager.jsx

@@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';
 import PropTypes from 'prop-types';
 import PropTypes from 'prop-types';
 import { UncontrolledTooltip } from 'reactstrap';
 import { UncontrolledTooltip } from 'reactstrap';
 
 
-import { useCurrentUser, useHackmdUri } from '~/stores/context';
+import { useIsAdmin, useHackmdUri } from '~/stores/context';
 import { EditorMode, useIsDeviceSmallerThanMd } from '~/stores/ui';
 import { EditorMode, useIsDeviceSmallerThanMd } from '~/stores/ui';
 
 
 import styles from './PageEditorModeManager.module.scss';
 import styles from './PageEditorModeManager.module.scss';
@@ -47,10 +47,9 @@ function PageEditorModeManager(props) {
 
 
   const { t } = useTranslation();
   const { t } = useTranslation();
   const { data: isDeviceSmallerThanMd } = useIsDeviceSmallerThanMd();
   const { data: isDeviceSmallerThanMd } = useIsDeviceSmallerThanMd();
-  const { data: currentUser } = useCurrentUser();
   const { data: hackmdUri } = useHackmdUri();
   const { data: hackmdUri } = useHackmdUri();
 
 
-  const isAdmin = currentUser?.admin;
+  const { data: isAdmin } = useIsAdmin();
   const isHackmdEnabled = hackmdUri != null;
   const isHackmdEnabled = hackmdUri != null;
   const showHackmdBtn = isHackmdEnabled || isAdmin;
   const showHackmdBtn = isHackmdEnabled || isAdmin;
 
 

+ 1 - 1
apps/app/src/components/NotCreatablePage.tsx

@@ -10,7 +10,7 @@ export const NotCreatablePage: FC = () => {
       <div className="col-md-12">
       <div className="col-md-12">
         <h2 className="text-muted">
         <h2 className="text-muted">
           <i className="icon-ban mr-1" aria-hidden="true"></i>
           <i className="icon-ban mr-1" aria-hidden="true"></i>
-          { t('not_creatable_page.could_not_creata_path') }
+          { t('not_creatable_page.message') }
         </h2>
         </h2>
       </div>
       </div>
     </div>
     </div>

+ 9 - 6
apps/app/src/components/PageAlert/TrashPageAlert.tsx

@@ -42,10 +42,11 @@ export const TrashPageAlert = (): JSX.Element => {
   const deleteUser = pageData?.deleteUser;
   const deleteUser = pageData?.deleteUser;
   const deletedAt = pageData?.deletedAt ? format(new Date(pageData?.deletedAt), 'yyyy/MM/dd HH:mm') : '';
   const deletedAt = pageData?.deletedAt ? format(new Date(pageData?.deletedAt), 'yyyy/MM/dd HH:mm') : '';
   const revisionId = pageData?.revision?._id;
   const revisionId = pageData?.revision?._id;
-
+  const isEmptyPage = pageId == null || revisionId == null || pagePath == null;
 
 
   const openPutbackPageModalHandler = useCallback(() => {
   const openPutbackPageModalHandler = useCallback(() => {
-    if (pageId == null || pagePath == null) {
+    // User cannot operate empty page.
+    if (isEmptyPage) {
       return;
       return;
     }
     }
     const putBackedHandler = () => {
     const putBackedHandler = () => {
@@ -62,10 +63,11 @@ export const TrashPageAlert = (): JSX.Element => {
       }
       }
     };
     };
     openPutBackPageModal({ pageId, path: pagePath }, { onPutBacked: putBackedHandler });
     openPutBackPageModal({ pageId, path: pagePath }, { onPutBacked: putBackedHandler });
-  }, [currentPagePath, mutateCurrentPage, openPutBackPageModal, pageId, pagePath, router]);
+  }, [currentPagePath, mutateCurrentPage, openPutBackPageModal, pageId, pagePath, router, isEmptyPage]);
 
 
   const openPageDeleteModalHandler = useCallback(() => {
   const openPageDeleteModalHandler = useCallback(() => {
-    if (pageId === undefined || revisionId === undefined || pagePath === undefined) {
+    // User cannot operate empty page.
+    if (isEmptyPage) {
       return;
       return;
     }
     }
     const pageToDelete = {
     const pageToDelete = {
@@ -77,7 +79,7 @@ export const TrashPageAlert = (): JSX.Element => {
       meta: pageInfo,
       meta: pageInfo,
     };
     };
     openDeleteModal([pageToDelete], { onDeleted: onDeletedHandler });
     openDeleteModal([pageToDelete], { onDeleted: onDeletedHandler });
-  }, [openDeleteModal, pageId, pageInfo, pagePath, revisionId]);
+  }, [openDeleteModal, pageId, pageInfo, pagePath, revisionId, isEmptyPage]);
 
 
   const renderTrashPageManagementButtons = useCallback(() => {
   const renderTrashPageManagementButtons = useCallback(() => {
     return (
     return (
@@ -103,7 +105,8 @@ export const TrashPageAlert = (): JSX.Element => {
     );
     );
   }, [openPageDeleteModalHandler, openPutbackPageModalHandler, pageInfo?.isAbleToDeleteCompletely, t]);
   }, [openPageDeleteModalHandler, openPutbackPageModalHandler, pageInfo?.isAbleToDeleteCompletely, t]);
 
 
-  if (!isTrashPage) {
+  // Show this alert only for non-empty pages in trash.
+  if (!isTrashPage || isEmptyPage) {
     return <></>;
     return <></>;
   }
   }
 
 

+ 2 - 3
apps/app/src/components/PrivateLegacyPages.tsx

@@ -14,7 +14,7 @@ import { V5ConversionErrCode } from '~/interfaces/errors/v5-conversion-error';
 import { V5MigrationStatus } from '~/interfaces/page-listing-results';
 import { V5MigrationStatus } from '~/interfaces/page-listing-results';
 import { IFormattedSearchResult } from '~/interfaces/search';
 import { IFormattedSearchResult } from '~/interfaces/search';
 import { PageMigrationErrorData, SocketEventName } from '~/interfaces/websocket';
 import { PageMigrationErrorData, SocketEventName } from '~/interfaces/websocket';
-import { useCurrentUser } from '~/stores/context';
+import { useIsAdmin } from '~/stores/context';
 import {
 import {
   ILegacyPrivatePage, usePrivateLegacyPagesMigrationModal,
   ILegacyPrivatePage, usePrivateLegacyPagesMigrationModal,
 } from '~/stores/modal';
 } from '~/stores/modal';
@@ -191,9 +191,8 @@ ConvertByPathModal.displayName = 'ConvertByPathModal';
 
 
 const PrivateLegacyPages = (): JSX.Element => {
 const PrivateLegacyPages = (): JSX.Element => {
   const { t } = useTranslation();
   const { t } = useTranslation();
-  const { data: currentUser } = useCurrentUser();
 
 
-  const isAdmin = currentUser?.admin;
+  const { data: isAdmin } = useIsAdmin();
 
 
   const [keyword, setKeyword] = useState<string>(initQ);
   const [keyword, setKeyword] = useState<string>(initQ);
   const [offset, setOffset] = useState<number>(0);
   const [offset, setOffset] = useState<number>(0);

+ 3 - 10
apps/app/src/components/Sidebar/SidebarNav.tsx

@@ -1,12 +1,12 @@
 import React, {
 import React, {
-  FC, memo, useCallback, useEffect, useState,
+  FC, memo, useCallback,
 } from 'react';
 } from 'react';
 
 
 import Link from 'next/link';
 import Link from 'next/link';
 
 
 import { useUserUISettings } from '~/client/services/user-ui-settings';
 import { useUserUISettings } from '~/client/services/user-ui-settings';
 import { SidebarContentsType } from '~/interfaces/ui';
 import { SidebarContentsType } from '~/interfaces/ui';
-import { useCurrentUser, useGrowiCloudUri } from '~/stores/context';
+import { useIsAdmin, useGrowiCloudUri } from '~/stores/context';
 import { useCurrentSidebarContents } from '~/stores/ui';
 import { useCurrentSidebarContents } from '~/stores/ui';
 
 
 import styles from './SidebarNav.module.scss';
 import styles from './SidebarNav.module.scss';
@@ -82,18 +82,11 @@ type Props = {
 }
 }
 
 
 export const SidebarNav: FC<Props> = (props: Props) => {
 export const SidebarNav: FC<Props> = (props: Props) => {
-
-  const { data: currentUser } = useCurrentUser();
+  const { data: isAdmin } = useIsAdmin();
   const { data: growiCloudUri } = useGrowiCloudUri();
   const { data: growiCloudUri } = useGrowiCloudUri();
 
 
-  const [isAdmin, setAdmin] = useState(false);
-
   const { onItemSelected } = props;
   const { onItemSelected } = props;
 
 
-  useEffect(() => {
-    setAdmin(currentUser?.admin === true);
-  }, [currentUser?.admin]);
-
   return (
   return (
     <div className={`grw-sidebar-nav ${styles['grw-sidebar-nav']}`} data-vrt-blackout-sidebar-nav>
     <div className={`grw-sidebar-nav ${styles['grw-sidebar-nav']}`} data-vrt-blackout-sidebar-nav>
       <div className="grw-sidebar-nav-primary-container">
       <div className="grw-sidebar-nav-primary-container">

+ 9 - 3
apps/app/src/components/TemplateModal/TemplateModal.tsx

@@ -68,7 +68,10 @@ const TemplateListGroupItem: React.FC<TemplateSummaryItemProps> = ({
       onClick={onClick}
       onClick={onClick}
       aria-current="true"
       aria-current="true"
     >
     >
-      <h4 className="mb-1">{localizedTemplate.title}</h4>
+      <h4 className="mb-1 d-flex">
+        <span className="d-inline-block text-truncate">{localizedTemplate.title}</span>
+        {localizedTemplate.pluginId != null ? <i className="icon-fw icon-puzzle ml-2 text-muted small"></i> : ''}
+      </h4>
       <p className="mb-2">{localizedTemplate.desc}</p>
       <p className="mb-2">{localizedTemplate.desc}</p>
       { templateLocales != null && Array.from(templateLocales).map(locale => (
       { templateLocales != null && Array.from(templateLocales).map(locale => (
         <span key={locale} className="badge border rounded-pill text-muted mr-1">{locale}</span>
         <span key={locale} className="badge border rounded-pill text-muted mr-1">{locale}</span>
@@ -94,7 +97,10 @@ const TemplateDropdownItem: React.FC<TemplateSummaryItemProps> = ({
       onClick={onClick}
       onClick={onClick}
       className="px-4 py-3"
       className="px-4 py-3"
     >
     >
-      <h4 className="mb-1 text-wrap">{localizedTemplate.title}</h4>
+      <h4 className="mb-1 d-flex">
+        <span className="d-inline-block text-truncate">{localizedTemplate.title}</span>
+        {localizedTemplate.pluginId != null ? <i className="icon-fw icon-puzzle ml-2 text-muted small"></i> : ''}
+      </h4>
       <p className="mb-1 text-wrap">{localizedTemplate.desc}</p>
       <p className="mb-1 text-wrap">{localizedTemplate.desc}</p>
       { templateLocales != null && Array.from(templateLocales).map(locale => (
       { templateLocales != null && Array.from(templateLocales).map(locale => (
         <span key={locale} className="badge border rounded-pill text-muted mr-1">{locale}</span>
         <span key={locale} className="badge border rounded-pill text-muted mr-1">{locale}</span>
@@ -217,7 +223,7 @@ const TemplateModalSubstance = (props: TemplateModalSubstanceProps): JSX.Element
                   })() }
                   })() }
                 </span>
                 </span>
               </DropdownToggle>
               </DropdownToggle>
-              <DropdownMenu role="menu" className={`p-0 ${styles['dm-templates']}`}>
+              <DropdownMenu role="menu" className={`p-0 mw-100 ${styles['dm-templates']}`}>
                 { templateSummaries != null && templateSummaries.map((templateSummary) => {
                 { templateSummaries != null && templateSummaries.map((templateSummary) => {
                   const templateId = constructTemplateId(templateSummary);
                   const templateId = constructTemplateId(templateSummary);
 
 

+ 15 - 0
apps/app/src/stores/context.tsx

@@ -229,6 +229,21 @@ export const useIsReadOnlyUser = (): SWRResponse<boolean, Error> => {
   );
   );
 };
 };
 
 
+export const useIsAdmin = (): SWRResponse<boolean, Error> => {
+  const { data: currentUser, isLoading } = useCurrentUser();
+
+  const isAdminUser = currentUser != null ? currentUser.admin : false;
+
+  return useSWRImmutable(
+    isLoading ? null : ['isAdminUser', currentUser?._id],
+    () => isAdminUser,
+    {
+      fallbackData: isAdminUser,
+      keepPreviousData: true,
+    },
+  );
+};
+
 export const useIsEditable = (): SWRResponse<boolean, Error> => {
 export const useIsEditable = (): SWRResponse<boolean, Error> => {
   const { data: isGuestUser } = useIsGuestUser();
   const { data: isGuestUser } = useIsGuestUser();
   const { data: isReadOnlyUser } = useIsReadOnlyUser();
   const { data: isReadOnlyUser } = useIsReadOnlyUser();

+ 2 - 4
apps/app/test/cypress/e2e/20-basic-features/20-basic-features--access-to-page.cy.ts

@@ -295,8 +295,7 @@ context('Access to Template Editing Mode', () => {
       cy.screenshot(`${ssPrefix}-open-template-page-for-children-in-editor-mode`);
       cy.screenshot(`${ssPrefix}-open-template-page-for-children-in-editor-mode`);
     });
     });
 
 
-    cy.get('.CodeMirror textarea').type(templateBody1, { force: true });
-    cy.get('.CodeMirror-code').should('contain.text', templateBody1);
+    appendTextToEditorUntilContains(templateBody1);
     cy.get('.page-editor-preview-body').should('contain.text', templateBody1);
     cy.get('.page-editor-preview-body').should('contain.text', templateBody1);
     cy.getByTestid('page-editor').should('be.visible');
     cy.getByTestid('page-editor').should('be.visible');
     cy.getByTestid('save-page-btn').click();
     cy.getByTestid('save-page-btn').click();
@@ -330,8 +329,7 @@ context('Access to Template Editing Mode', () => {
       cy.screenshot(`${ssPrefix}-open-template-page-for-descendants-in-editor-mode`);
       cy.screenshot(`${ssPrefix}-open-template-page-for-descendants-in-editor-mode`);
     })
     })
 
 
-    cy.get('.CodeMirror textarea').type(templateBody2, { force: true });
-    cy.get('.CodeMirror-code').should('contain.text', templateBody2);
+    appendTextToEditorUntilContains(templateBody2);
     cy.get('.page-editor-preview-body').should('contain.text', templateBody2);
     cy.get('.page-editor-preview-body').should('contain.text', templateBody2);
     cy.getByTestid('page-editor').should('be.visible');
     cy.getByTestid('page-editor').should('be.visible');
     cy.getByTestid('save-page-btn').click();
     cy.getByTestid('save-page-btn').click();

+ 4 - 1
apps/app/test/cypress/tsconfig.json

@@ -4,7 +4,10 @@
     "noEmit": true,
     "noEmit": true,
     // be explicit about types included
     // be explicit about types included
     // to avoid clashing with Jest types
     // to avoid clashing with Jest types
-    "types": ["cypress"]
+    "types": ["cypress"],
+    // turn off sourceMap
+    // see: https://github.com/cypress-io/cypress/issues/26203
+    "sourceMap": false
   },
   },
   "include": [
   "include": [
     "../../node_modules/cypress",
     "../../node_modules/cypress",

+ 1 - 1
apps/slackbot-proxy/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@growi/slackbot-proxy",
   "name": "@growi/slackbot-proxy",
-  "version": "6.1.8-slackbot-proxy.0",
+  "version": "6.1.9-slackbot-proxy.0",
   "license": "MIT",
   "license": "MIT",
   "scripts": {
   "scripts": {
     "build": "yarn tsc && tsc-alias -p tsconfig.build.json",
     "build": "yarn tsc && tsc-alias -p tsconfig.build.json",

+ 8 - 8
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "growi",
   "name": "growi",
-  "version": "6.1.8-RC.0",
+  "version": "6.1.9-RC.0",
   "description": "Team collaboration software using markdown",
   "description": "Team collaboration software using markdown",
   "tags": [
   "tags": [
     "wiki",
     "wiki",
@@ -52,7 +52,7 @@
     "@swc-node/register": "^1.6.2",
     "@swc-node/register": "^1.6.2",
     "@swc/core": "^1.3.36",
     "@swc/core": "^1.3.36",
     "@swc/helpers": "^0.4.14",
     "@swc/helpers": "^0.4.14",
-    "@testing-library/cypress": "^8.0.2",
+    "@testing-library/cypress": "^9.0.0",
     "@types/css-modules": "^1.0.2",
     "@types/css-modules": "^1.0.2",
     "@types/eslint": "^8.37.0",
     "@types/eslint": "^8.37.0",
     "@types/estree": "^1.0.1",
     "@types/estree": "^1.0.1",
@@ -60,10 +60,10 @@
     "@types/path-browserify": "^1.0.0",
     "@types/path-browserify": "^1.0.0",
     "@typescript-eslint/eslint-plugin": "^5.59.7",
     "@typescript-eslint/eslint-plugin": "^5.59.7",
     "@typescript-eslint/parser": "^5.59.7",
     "@typescript-eslint/parser": "^5.59.7",
-    "@vitejs/plugin-react": "^3.1.0",
+    "@vitejs/plugin-react": "^4.0.3",
     "@vitest/coverage-c8": "^0.31.1",
     "@vitest/coverage-c8": "^0.31.1",
     "@vitest/ui": "^0.31.1",
     "@vitest/ui": "^0.31.1",
-    "cypress": "^12.0.1",
+    "cypress": "^12.17.2",
     "cypress-wait-until": "^1.7.2",
     "cypress-wait-until": "^1.7.2",
     "eslint": "^8.41.0",
     "eslint": "^8.41.0",
     "eslint-config-next": "^12.1.6",
     "eslint-config-next": "^12.1.6",
@@ -83,15 +83,15 @@
     "reg-notify-github-plugin": "^0.11.1",
     "reg-notify-github-plugin": "^0.11.1",
     "reg-notify-slack-plugin": "^0.11.0",
     "reg-notify-slack-plugin": "^0.11.0",
     "reg-publish-s3-plugin": "^0.11.0",
     "reg-publish-s3-plugin": "^0.11.0",
-    "reg-suit": "^0.12.1",
+    "reg-suit": "^0.12.2",
     "shx": "^0.3.4",
     "shx": "^0.3.4",
     "stylelint": "^14.2.0",
     "stylelint": "^14.2.0",
     "stylelint-config-recess-order": "^3.0.0",
     "stylelint-config-recess-order": "^3.0.0",
     "ts-node-dev": "^2.0.0",
     "ts-node-dev": "^2.0.0",
     "tsconfig-paths": "^3.9.0",
     "tsconfig-paths": "^3.9.0",
-    "typescript": "~4.9",
-    "vite": "^4.3.8",
-    "vite-plugin-dts": "^2.0.0-beta.0",
+    "typescript": "~5.0.0",
+    "vite": "^4.4.0",
+    "vite-plugin-dts": "^2.3.0",
     "vite-tsconfig-paths": "^4.2.0",
     "vite-tsconfig-paths": "^4.2.0",
     "vitest": "^0.31.4",
     "vitest": "^0.31.4",
     "vitest-mock-extended": "^1.1.3"
     "vitest-mock-extended": "^1.1.3"

+ 1 - 1
packages/core/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@growi/core",
   "name": "@growi/core",
-  "version": "6.1.8-RC.0",
+  "version": "6.1.9-RC.0",
   "description": "GROWI Core Libraries",
   "description": "GROWI Core Libraries",
   "license": "MIT",
   "license": "MIT",
   "keywords": [
   "keywords": [

+ 1 - 1
packages/core/vite.config.ts

@@ -7,7 +7,7 @@ import dts from 'vite-plugin-dts';
 // https://vitejs.dev/config/
 // https://vitejs.dev/config/
 export default defineConfig({
 export default defineConfig({
   plugins: [
   plugins: [
-    dts(),
+    dts({ copyDtsFiles: true }),
   ],
   ],
   build: {
   build: {
     outDir: 'dist',
     outDir: 'dist',

+ 1 - 1
packages/hackmd/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@growi/hackmd",
   "name": "@growi/hackmd",
-  "version": "6.1.8-RC.0",
+  "version": "6.1.9-RC.0",
   "description": "GROWI js and css files to use hackmd",
   "description": "GROWI js and css files to use hackmd",
   "license": "MIT",
   "license": "MIT",
   "type": "module",
   "type": "module",

+ 1 - 1
packages/hackmd/vite.config.js

@@ -5,7 +5,7 @@ import dts from 'vite-plugin-dts';
 // https://vitejs.dev/config/
 // https://vitejs.dev/config/
 export default defineConfig({
 export default defineConfig({
   plugins: [
   plugins: [
-    dts(),
+    dts({ copyDtsFiles: true }),
   ],
   ],
   build: {
   build: {
     outDir: 'dist',
     outDir: 'dist',

+ 1 - 1
packages/pluginkit/vite.config.ts

@@ -8,7 +8,7 @@ import dts from 'vite-plugin-dts';
 // https://vitejs.dev/config/
 // https://vitejs.dev/config/
 export default defineConfig({
 export default defineConfig({
   plugins: [
   plugins: [
-    dts(),
+    dts({ copyDtsFiles: true }),
   ],
   ],
   build: {
   build: {
     outDir: 'dist',
     outDir: 'dist',

+ 1 - 1
packages/presentation/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@growi/presentation",
   "name": "@growi/presentation",
-  "version": "6.1.8-RC.0",
+  "version": "6.1.9-RC.0",
   "description": "GROWI plugin for presentation",
   "description": "GROWI plugin for presentation",
   "license": "MIT",
   "license": "MIT",
   "keywords": [
   "keywords": [

+ 1 - 1
packages/presentation/vite.config.ts

@@ -6,7 +6,7 @@ import dts from 'vite-plugin-dts';
 export default defineConfig({
 export default defineConfig({
   plugins: [
   plugins: [
     react(),
     react(),
-    dts(),
+    dts({ copyDtsFiles: true }),
   ],
   ],
   build: {
   build: {
     outDir: 'dist',
     outDir: 'dist',

+ 1 - 1
packages/preset-templates/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@growi/preset-templates",
   "name": "@growi/preset-templates",
-  "version": "6.1.8-RC.0",
+  "version": "6.1.9-RC.0",
   "scripts": {
   "scripts": {
     "test": "vitest run",
     "test": "vitest run",
     "version": "yarn version --no-git-tag-version --preid=RC"
     "version": "yarn version --no-git-tag-version --preid=RC"

+ 1 - 1
packages/preset-themes/package.json

@@ -1,7 +1,7 @@
 {
 {
   "name": "@growi/preset-themes",
   "name": "@growi/preset-themes",
   "description": "GROWI preset themes",
   "description": "GROWI preset themes",
-  "version": "6.1.8-RC.0",
+  "version": "6.1.9-RC.0",
   "license": "MIT",
   "license": "MIT",
   "main": "dist/libs/preset-themes.umd.js",
   "main": "dist/libs/preset-themes.umd.js",
   "module": "dist/libs/preset-themes.mjs",
   "module": "dist/libs/preset-themes.mjs",

+ 1 - 1
packages/preset-themes/vite.libs.config.ts

@@ -4,7 +4,7 @@ import dts from 'vite-plugin-dts';
 // https://vitejs.dev/config/
 // https://vitejs.dev/config/
 export default defineConfig({
 export default defineConfig({
   plugins: [
   plugins: [
-    dts(),
+    dts({ copyDtsFiles: true }),
   ],
   ],
   build: {
   build: {
     outDir: 'dist/libs',
     outDir: 'dist/libs',

+ 1 - 1
packages/remark-attachment-refs/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@growi/remark-attachment-refs",
   "name": "@growi/remark-attachment-refs",
-  "version": "6.1.8-RC.0",
+  "version": "6.1.9-RC.0",
   "description": "GROWI Plugin to add ref/refimg/refs/refsimg tags",
   "description": "GROWI Plugin to add ref/refimg/refs/refsimg tags",
   "license": "MIT",
   "license": "MIT",
   "keywords": [
   "keywords": [

+ 1 - 1
packages/remark-attachment-refs/vite.client.config.ts

@@ -6,7 +6,7 @@ import dts from 'vite-plugin-dts';
 export default defineConfig({
 export default defineConfig({
   plugins: [
   plugins: [
     react(),
     react(),
-    dts(),
+    dts({ copyDtsFiles: true }),
   ],
   ],
   build: {
   build: {
     outDir: 'dist/client',
     outDir: 'dist/client',

+ 1 - 1
packages/remark-attachment-refs/vite.server.config.ts

@@ -4,7 +4,7 @@ import dts from 'vite-plugin-dts';
 // https://vitejs.dev/config/
 // https://vitejs.dev/config/
 export default defineConfig({
 export default defineConfig({
   plugins: [
   plugins: [
-    dts(),
+    dts({ copyDtsFiles: true }),
   ],
   ],
   build: {
   build: {
     outDir: 'dist/server',
     outDir: 'dist/server',

+ 1 - 1
packages/remark-drawio/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@growi/remark-drawio",
   "name": "@growi/remark-drawio",
-  "version": "6.1.8-RC.0",
+  "version": "6.1.9-RC.0",
   "description": "remark plugin to draw diagrams with draw.io (diagrams.net)",
   "description": "remark plugin to draw diagrams with draw.io (diagrams.net)",
   "license": "MIT",
   "license": "MIT",
   "keywords": [
   "keywords": [

+ 1 - 1
packages/remark-drawio/vite.config.ts

@@ -6,7 +6,7 @@ import dts from 'vite-plugin-dts';
 export default defineConfig({
 export default defineConfig({
   plugins: [
   plugins: [
     react(),
     react(),
-    dts(),
+    dts({ copyDtsFiles: true }),
   ],
   ],
   build: {
   build: {
     outDir: 'dist',
     outDir: 'dist',

+ 1 - 1
packages/remark-growi-directive/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@growi/remark-growi-directive",
   "name": "@growi/remark-growi-directive",
-  "version": "6.1.8-RC.0",
+  "version": "6.1.9-RC.0",
   "description": "remark plugin to support GROWI plugin (forked from remark-directive@2.0.1)",
   "description": "remark plugin to support GROWI plugin (forked from remark-directive@2.0.1)",
   "license": "MIT",
   "license": "MIT",
   "keywords": [
   "keywords": [

+ 2 - 2
packages/remark-lsx/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@growi/remark-lsx",
   "name": "@growi/remark-lsx",
-  "version": "6.1.8-RC.0",
+  "version": "6.1.9-RC.0",
   "description": "GROWI plugin to list pages",
   "description": "GROWI plugin to list pages",
   "license": "MIT",
   "license": "MIT",
   "keywords": [
   "keywords": [
@@ -37,7 +37,7 @@
     "@growi/ui": "link:../ui",
     "@growi/ui": "link:../ui",
     "escape-string-regexp": "^4.0.0",
     "escape-string-regexp": "^4.0.0",
     "express": "^4.16.1",
     "express": "^4.16.1",
-    "mongoose": "^6.5.0",
+    "mongoose": "^6.11.3",
     "swr": "^2.0.3"
     "swr": "^2.0.3"
   },
   },
   "devDependencies": {
   "devDependencies": {

+ 1 - 1
packages/remark-lsx/vite.client.config.ts

@@ -6,7 +6,7 @@ import dts from 'vite-plugin-dts';
 export default defineConfig({
 export default defineConfig({
   plugins: [
   plugins: [
     react(),
     react(),
-    dts(),
+    dts({ copyDtsFiles: true }),
   ],
   ],
   build: {
   build: {
     outDir: 'dist/client',
     outDir: 'dist/client',

+ 1 - 1
packages/remark-lsx/vite.server.config.ts

@@ -4,7 +4,7 @@ import dts from 'vite-plugin-dts';
 // https://vitejs.dev/config/
 // https://vitejs.dev/config/
 export default defineConfig({
 export default defineConfig({
   plugins: [
   plugins: [
-    dts(),
+    dts({ copyDtsFiles: true }),
   ],
   ],
   build: {
   build: {
     outDir: 'dist/server',
     outDir: 'dist/server',

+ 1 - 1
packages/slack/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@growi/slack",
   "name": "@growi/slack",
-  "version": "6.1.8-RC.0",
+  "version": "6.1.9-RC.0",
   "license": "MIT",
   "license": "MIT",
   "main": "dist/index.js",
   "main": "dist/index.js",
   "module": "dist/index.mjs",
   "module": "dist/index.mjs",

+ 1 - 1
packages/slack/vite.config.ts

@@ -7,7 +7,7 @@ import dts from 'vite-plugin-dts';
 // https://vitejs.dev/config/
 // https://vitejs.dev/config/
 export default defineConfig({
 export default defineConfig({
   plugins: [
   plugins: [
-    dts(),
+    dts({ copyDtsFiles: true }),
   ],
   ],
   build: {
   build: {
     outDir: 'dist',
     outDir: 'dist',

+ 1 - 1
packages/ui/package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "@growi/ui",
   "name": "@growi/ui",
-  "version": "6.1.8-RC.0",
+  "version": "6.1.9-RC.0",
   "description": "GROWI UI Libraries",
   "description": "GROWI UI Libraries",
   "license": "MIT",
   "license": "MIT",
   "keywords": [
   "keywords": [

+ 1 - 1
packages/ui/vite.config.ts

@@ -9,7 +9,7 @@ import dts from 'vite-plugin-dts';
 export default defineConfig({
 export default defineConfig({
   plugins: [
   plugins: [
     react(),
     react(),
-    dts(),
+    dts({ copyDtsFiles: true }),
   ],
   ],
   build: {
   build: {
     outDir: 'dist',
     outDir: 'dist',

Разница между файлами не показана из-за своего большого размера
+ 396 - 236
yarn.lock


Некоторые файлы не были показаны из-за большого количества измененных файлов