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

Merge branch 'imprv/ssr-performance' into imprv/ssr-performance-wip

Yuki Takei 1 год назад
Родитель
Сommit
3759bf6a0e

+ 5 - 0
.changeset/tasty-baboons-burn.md

@@ -0,0 +1,5 @@
+---
+'@growi/pluginkit': patch
+---
+
+Update tsconfig.json module setting

+ 2 - 2
apps/app/package.json

@@ -35,9 +35,9 @@
     "lint": "run-p lint:*",
     "prelint:swagger2openapi": "yarn openapi:v3",
     "test": "run-p test:*",
-    "test:jest": "cross-env NODE_ENV=test NODE_OPTIONS=\"--max-old-space-size=4096\" jest --logHeapUsage",
+    "test:jest": "cross-env NODE_ENV=test TS_NODE_PROJECT=test/integration/tsconfig.json jest",
     "test:vitest": "run-p vitest:run vitest:run:integ vitest:run:components",
-    "jest:run": "cross-env NODE_ENV=test jest --passWithNoTests -- ",
+    "jest:run": "cross-env NODE_ENV=test TS_NODE_PROJECT=test/integration/tsconfig.json jest --passWithNoTests -- ",
     "reg:run": "reg-suit run",
     "vitest:run": "vitest run config src --coverage",
     "vitest:run:integ": "vitest run -c vitest.config.integ.ts src --coverage",

+ 1 - 2
apps/app/src/server/models/config.ts

@@ -1,4 +1,3 @@
-import { PresetThemes } from '@growi/preset-themes';
 import type { Types } from 'mongoose';
 import { Schema } from 'mongoose';
 import uniqueValidator from 'mongoose-unique-validator';
@@ -124,7 +123,7 @@ export const defaultCrowiConfigs: { [key: string]: any } = {
   'customize:title' : undefined,
   'customize:highlightJsStyle' : 'github',
   'customize:highlightJsStyleBorder' : false,
-  'customize:theme' : PresetThemes.DEFAULT,
+  'customize:theme' : 'default', // PresetThemes.DEFAULT
   'customize:theme:forcedColorScheme' : null,
   'customize:isContainerFluid' : false,
   'customize:isEnabledTimeline' : true,

+ 2 - 2
apps/app/test/cypress/tsconfig.json

@@ -1,10 +1,10 @@
 {
-  "extends": "../tsconfig.json",
+  "extends": "../../tsconfig.json",
   "compilerOptions": {
     "noEmit": true,
     // be explicit about types included
     // to avoid clashing with Jest types
-    "types": ["cypress"],
+    "types": ["cypress", "cypress-real-events"],
     // turn off sourceMap
     // see: https://github.com/cypress-io/cypress/issues/26203
     "sourceMap": false

+ 6 - 0
apps/app/test/integration/tsconfig.json

@@ -0,0 +1,6 @@
+{
+  "extends": "../../tsconfig.json",
+  "compilerOptions": {
+    "module": "CommonJS"
+  },
+}

+ 0 - 7
apps/app/test/tsconfig.json

@@ -1,7 +0,0 @@
-{
-  "extends": "../tsconfig.json",
-  "compilerOptions": {
-    "isolatedModules": false,
-    "types": ["cypress", "cypress-real-events"],
-  },
-}

+ 0 - 1
packages/pluginkit/tsconfig.json

@@ -2,7 +2,6 @@
   "$schema": "http://json.schemastore.org/tsconfig",
   "extends": "../../tsconfig.base.json",
   "compilerOptions": {
-    "module": "CommonJS",
     "types": [
       "vitest/globals"
     ]