build: fix tsconfig monorepo setup (#10028)
Should fix messed up import suggestions and simplifies all tsconfigs through inheritance. One main issue was that packages were inheriting `baseURL: "."` from the root tsconfig. This caused incorrect import suggestions that start with "packages/...". This PR ensures that packages do not inherit this baseURL: "." property, while ensuring the root, non-inherited tsconfig still keeps it to get tests to work (the importMap needs it)
This commit is contained in:
@@ -1,13 +1,6 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
||||||
"strict": true
|
"strict": true
|
||||||
},
|
},
|
||||||
"exclude": ["dist", "build", "tests", "test", "node_modules", "eslint.config.js"],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.spec.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }, { "path": "../translations" }]
|
"references": [{ "path": "../payload" }, { "path": "../translations" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,32 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
// Make sure typescript knows that this module depends on their references
|
|
||||||
"composite": true,
|
|
||||||
/* Do not emit outputs. */
|
|
||||||
"noEmit": false,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
/* Specify an output folder for all emitted files. */
|
|
||||||
"outDir": "./dist",
|
|
||||||
/* Specify the root folder within your source files. */
|
|
||||||
"rootDir": "./src"
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"src",
|
|
||||||
"src/**/*.ts",
|
|
||||||
],
|
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../payload"
|
"path": "../payload"
|
||||||
|
|||||||
@@ -1,32 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true,
|
|
||||||
// Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false
|
|
||||||
/* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist"
|
|
||||||
/* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src"
|
|
||||||
/* Specify the root folder within your source files. */
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"src",
|
|
||||||
"src/**/*.ts"
|
|
||||||
],
|
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../payload"
|
"path": "../payload"
|
||||||
|
|||||||
@@ -1,29 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true,
|
|
||||||
"noEmit": false,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist",
|
|
||||||
"rootDir": "./src",
|
|
||||||
"skipLibCheck": true,
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"src",
|
|
||||||
"src/**/*.ts",
|
|
||||||
],
|
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "../payload"
|
"path": "../payload"
|
||||||
|
|||||||
@@ -1,28 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
// Make sure typescript knows that this module depends on their references
|
|
||||||
"composite": true,
|
|
||||||
/* Do not emit outputs. */
|
|
||||||
"noEmit": false,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
/* Specify an output folder for all emitted files. */
|
|
||||||
"outDir": "./dist",
|
|
||||||
/* Specify the root folder within your source files. */
|
|
||||||
"rootDir": "./src"
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }, { "path": "../translations" }]
|
"references": [{ "path": "../payload" }, { "path": "../translations" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
||||||
"strict": true
|
"strict": true
|
||||||
},
|
},
|
||||||
"exclude": ["dist", "node_modules"],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }]
|
"references": [{ "path": "../payload" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
||||||
"strict": true
|
"strict": true
|
||||||
},
|
},
|
||||||
"exclude": ["dist", "node_modules", "src/**/*.spec.ts"],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }]
|
"references": [{ "path": "../payload" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }]
|
"references": [{ "path": "../payload" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
||||||
"jsx": "react-jsx"
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }]
|
"references": [{ "path": "../payload" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
||||||
"jsx": "react-jsx"
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }] // db-mongodb depends on payload
|
"references": [{ "path": "../payload" }] // db-mongodb depends on payload
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }]
|
"references": [{ "path": "../payload" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "CommonJS",
|
|
||||||
"composite": true, // Required for references to work
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist/cjs" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
||||||
"sourceMap": true
|
|
||||||
},
|
|
||||||
"include": ["src/withPayload.js" /* Include the withPayload.js file in the build */]
|
|
||||||
}
|
|
||||||
@@ -1,25 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Required for references to work
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
||||||
"sourceMap": true
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx",
|
|
||||||
"src/**/*.json"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"src/**/*.ts",
|
|
||||||
"src/**/*.tsx",
|
|
||||||
"src/withPayload.js" /* Include the withPayload.js file in the build */
|
|
||||||
, "../ui/src/utilities/renderFields.tsx" ],
|
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "../payload" },
|
{ "path": "../payload" },
|
||||||
{ "path": "../ui" },
|
{ "path": "../ui" },
|
||||||
|
|||||||
@@ -1,13 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */
|
|
||||||
},
|
|
||||||
"exclude": ["dist", "build", "tests", "test", "node_modules", "eslint.config.js"],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }]
|
"references": [{ "path": "../payload" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,38 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Required for packages/db-mongodb to build
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
|
|
||||||
"outDir": "./dist" /* Redirect output structure to the directory. */,
|
|
||||||
"paths": {
|
|
||||||
"payload/auth": ["./src/auth/types.ts"],
|
|
||||||
"payload/config": ["./src/config/types.ts"],
|
|
||||||
"payload/generated-types": ["./src/generated-types.ts"],
|
|
||||||
"payload/types": ["./src/types/index.ts"]
|
|
||||||
},
|
|
||||||
"types": ["jest", "node", "@types/jest"],
|
|
||||||
"lib": [
|
|
||||||
"DOM",
|
|
||||||
"DOM.Iterable",
|
|
||||||
"ES2022"
|
|
||||||
],
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx",
|
|
||||||
"temp"
|
|
||||||
],
|
|
||||||
/* Like tsconfig.build.json, but includes test directory and doesnt emit anything */
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../translations" }]
|
"references": [{ "path": "../translations" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }]
|
"references": [{ "path": "../payload" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx",
|
|
||||||
"src/**/mocks/*"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*"],
|
|
||||||
"references": [{ "path": "../payload" }, { "path": "../ui" }]
|
"references": [{ "path": "../payload" }, { "path": "../ui" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
||||||
"jsx": "react-jsx"
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }]
|
"references": [{ "path": "../payload" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }]
|
"references": [{ "path": "../payload" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }, { "path": "../ui" }, { "path": "../next" }]
|
"references": [{ "path": "../payload" }, { "path": "../ui" }, { "path": "../next" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src", /* Specify the root folder within your source files. */
|
|
||||||
"jsx": "react-jsx"
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }]
|
"references": [{ "path": "../payload" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src", /* Specify the root folder within your source files. */
|
|
||||||
"jsx": "react-jsx"
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }, { "path": "../ui" }, { "path": "../next" }]
|
"references": [{ "path": "../payload" }, { "path": "../ui" }, { "path": "../next" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }, { "path": "../ui" }, { "path": "../next" }]
|
"references": [{ "path": "../payload" }, { "path": "../ui" }, { "path": "../next" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,10 @@ import type { TextFormatType } from 'lexical'
|
|||||||
|
|
||||||
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
|
||||||
import { TEXT_TYPE_TO_FORMAT, TextNode } from 'lexical'
|
import { TEXT_TYPE_TO_FORMAT, TextNode } from 'lexical'
|
||||||
import { type SanitizedClientFeatures } from 'packages/richtext-lexical/src/features/typesClient.js'
|
|
||||||
import { useEffect } from 'react'
|
import { useEffect } from 'react'
|
||||||
|
|
||||||
|
import type { SanitizedClientFeatures } from '../../../features/typesClient.js'
|
||||||
|
|
||||||
export function TextPlugin({ features }: { features: SanitizedClientFeatures }) {
|
export function TextPlugin({ features }: { features: SanitizedClientFeatures }) {
|
||||||
const [editor] = useLexicalComposerContext()
|
const [editor] = useLexicalComposerContext()
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,10 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"strictNullChecks": true,
|
"strictNullChecks": true,
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
||||||
"strict": true
|
"strict": true
|
||||||
},
|
},
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "../payload" },
|
{ "path": "../payload" },
|
||||||
{ "path": "../translations" },
|
{ "path": "../translations" },
|
||||||
|
|||||||
@@ -1,14 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
||||||
"strict": true
|
|
||||||
},
|
|
||||||
"exclude": ["dist", "node_modules"],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }, { "path": "../plugin-cloud-storage" }]
|
"references": [{ "path": "../payload" }, { "path": "../plugin-cloud-storage" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
||||||
"strict": true
|
|
||||||
},
|
|
||||||
"exclude": ["dist", "node_modules"],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }, { "path": "../plugin-cloud-storage" }]
|
"references": [{ "path": "../payload" }, { "path": "../plugin-cloud-storage" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */,
|
|
||||||
"strict": true
|
|
||||||
},
|
|
||||||
"exclude": ["dist", "node_modules"],
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],
|
|
||||||
"references": [{ "path": "../payload" }, { "path": "../plugin-cloud-storage" }]
|
"references": [{ "path": "../payload" }, { "path": "../plugin-cloud-storage" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,8 +45,9 @@
|
|||||||
"dist"
|
"dist"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "pnpm build:types",
|
"build": "pnpm build:types && pnpm build:swc",
|
||||||
"build:types": "tsc --outDir dist",
|
"build:swc": "swc ./src -d ./dist --config-file .swcrc --strip-leading-paths",
|
||||||
|
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
||||||
"clean": "rimraf {dist,*.tsbuildinfo}",
|
"clean": "rimraf {dist,*.tsbuildinfo}",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"lint:fix": "eslint . --fix",
|
"lint:fix": "eslint . --fix",
|
||||||
|
|||||||
@@ -1,19 +1,3 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
"allowJs": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src",
|
|
||||||
"lib": [
|
|
||||||
"DOM",
|
|
||||||
"DOM.Iterable",
|
|
||||||
"ES2022"
|
|
||||||
],
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": false
|
|
||||||
},
|
|
||||||
"include": ["src/**/*.ts", "src/**/*.js"]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -138,4 +138,4 @@ const RadioGroupFieldComponent: RadioFieldClientComponent = (props) => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const RadioGroupField = withCondition(RadioGroupFieldComponent)
|
export const RadioGroupField: any = withCondition(RadioGroupFieldComponent)
|
||||||
|
|||||||
@@ -1,33 +1,4 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.base.json",
|
||||||
"compilerOptions": {
|
|
||||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
|
||||||
"noEmit": false /* Do not emit outputs. */,
|
|
||||||
"emitDeclarationOnly": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
|
||||||
"rootDir": "./src" /* Specify the root folder within your source files. */
|
|
||||||
},
|
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"tests",
|
|
||||||
"test",
|
|
||||||
"node_modules",
|
|
||||||
"eslint.config.js",
|
|
||||||
"src/**/*.spec.js",
|
|
||||||
"src/**/*.spec.jsx",
|
|
||||||
"src/**/*.spec.ts",
|
|
||||||
"src/**/*.spec.tsx"
|
|
||||||
],
|
|
||||||
"include": [
|
|
||||||
"src/scss/app.scss",
|
|
||||||
"src/**/*.png",
|
|
||||||
"src/**/*.svg",
|
|
||||||
"src/**/*.ts",
|
|
||||||
"src/**/*.tsx",
|
|
||||||
"src/**/*.d.ts",
|
|
||||||
"src/**/*.json"
|
|
||||||
],
|
|
||||||
"references": [{ "path": "../payload" }, { "path": "../translations" }]
|
"references": [{ "path": "../payload" }, { "path": "../translations" }]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,15 +11,20 @@ import { parse, stringify } from 'comment-json'
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
import fs from 'fs/promises'
|
import fs from 'fs/promises'
|
||||||
import { fileURLToPath } from 'url'
|
import { fileURLToPath } from 'url'
|
||||||
|
import { existsSync } from 'fs'
|
||||||
|
|
||||||
const filename = fileURLToPath(import.meta.url)
|
const filename = fileURLToPath(import.meta.url)
|
||||||
const dirname = path.dirname(filename)
|
const dirname = path.dirname(filename)
|
||||||
|
|
||||||
const tsConfigPath = path.resolve(dirname, '../tsconfig.json')
|
const tsConfigBasePath = path.resolve(dirname, '../tsconfig.base.json')
|
||||||
|
const tsConfigPath = existsSync(tsConfigBasePath)
|
||||||
|
? tsConfigBasePath
|
||||||
|
: path.resolve(dirname, '../tsconfig.json')
|
||||||
|
|
||||||
|
|
||||||
const tsConfigContent = await fs.readFile(tsConfigPath, 'utf8')
|
const tsConfigContent = await fs.readFile(tsConfigPath, 'utf8')
|
||||||
const tsConfig = parse(tsConfigContent)
|
const tsConfig = parse(tsConfigContent)
|
||||||
|
|
||||||
// @ts-expect-error
|
|
||||||
tsConfig.compilerOptions.paths['@payload-config'] = ['./test/_community/config.ts']
|
tsConfig.compilerOptions.paths['@payload-config'] = ['./test/_community/config.ts']
|
||||||
const output = stringify(tsConfig, null, 2) + `\n`
|
const output = stringify(tsConfig, null, 2) + `\n`
|
||||||
await fs.writeFile(tsConfigPath, output)
|
await fs.writeFile(tsConfigPath, output)
|
||||||
|
|||||||
2
test/next-env.d.ts
vendored
2
test/next-env.d.ts
vendored
@@ -2,4 +2,4 @@
|
|||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
|
||||||
|
|||||||
@@ -10,7 +10,12 @@ const filename = fileURLToPath(import.meta.url)
|
|||||||
const dirname = path.dirname(filename)
|
const dirname = path.dirname(filename)
|
||||||
|
|
||||||
export const createTestHooks = async (testSuiteName = '_community') => {
|
export const createTestHooks = async (testSuiteName = '_community') => {
|
||||||
const tsConfigPath = path.resolve(getNextRootDir().rootDir, './tsconfig.json')
|
const rootDir = getNextRootDir().rootDir
|
||||||
|
const tsConfigBasePath = path.resolve(rootDir, './tsconfig.base.json')
|
||||||
|
const tsConfigPath = existsSync(tsConfigBasePath)
|
||||||
|
? tsConfigBasePath
|
||||||
|
: path.resolve(rootDir, './tsconfig.json')
|
||||||
|
|
||||||
const tsConfigContent = await readFile(tsConfigPath, 'utf8')
|
const tsConfigContent = await readFile(tsConfigPath, 'utf8')
|
||||||
const tsConfig = parse(tsConfigContent)
|
const tsConfig = parse(tsConfigContent)
|
||||||
|
|
||||||
@@ -20,7 +25,7 @@ export const createTestHooks = async (testSuiteName = '_community') => {
|
|||||||
*/
|
*/
|
||||||
beforeTest: async () => {
|
beforeTest: async () => {
|
||||||
// Delete entire .next cache folder
|
// Delete entire .next cache folder
|
||||||
const nextCache = path.resolve(getNextRootDir().rootDir, './.next')
|
const nextCache = path.resolve(rootDir, './.next')
|
||||||
if (existsSync(nextCache)) {
|
if (existsSync(nextCache)) {
|
||||||
await rm(nextCache, { recursive: true })
|
await rm(nextCache, { recursive: true })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,12 +12,20 @@
|
|||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"jsx": "preserve",
|
"jsx": "preserve",
|
||||||
"lib": ["DOM", "DOM.Iterable", "ES2022"],
|
"lib": [
|
||||||
|
"DOM",
|
||||||
|
"DOM.Iterable",
|
||||||
|
"ES2022"
|
||||||
|
],
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"strict": false,
|
"strict": false,
|
||||||
"types": ["jest", "node", "@types/jest"],
|
"types": [
|
||||||
|
"jest",
|
||||||
|
"node",
|
||||||
|
"@types/jest"
|
||||||
|
],
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"plugins": [
|
"plugins": [
|
||||||
@@ -27,7 +35,9 @@
|
|||||||
],
|
],
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@payload-config": ["./fields/config.ts"]
|
"@payload-config": [
|
||||||
|
"./_community/config.ts"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
@@ -38,6 +48,12 @@
|
|||||||
"dist/**/*.js",
|
"dist/**/*.js",
|
||||||
"**/dist/**/*.js"
|
"**/dist/**/*.js"
|
||||||
],
|
],
|
||||||
"include": ["./**/*.ts", "./**/*.tsx", "next-env.d.ts", ".next/types/**/*.ts", "setup.js"],
|
"include": [
|
||||||
|
"./**/*.ts",
|
||||||
|
"./**/*.tsx",
|
||||||
|
"next-env.d.ts",
|
||||||
|
".next/types/**/*.ts",
|
||||||
|
"setup.js"
|
||||||
|
],
|
||||||
"references": []
|
"references": []
|
||||||
}
|
}
|
||||||
|
|||||||
107
tsconfig.base.json
Normal file
107
tsconfig.base.json
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"composite": true,
|
||||||
|
"declaration": true,
|
||||||
|
"declarationMap": true,
|
||||||
|
"target": "ES2022",
|
||||||
|
"rootDir": "${configDir}/src",
|
||||||
|
"module": "NodeNext",
|
||||||
|
"moduleResolution": "NodeNext",
|
||||||
|
"allowJs": true,
|
||||||
|
"checkJs": false,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"jsx": "preserve",
|
||||||
|
"lib": [
|
||||||
|
"DOM",
|
||||||
|
"DOM.Iterable",
|
||||||
|
"ES2022"
|
||||||
|
],
|
||||||
|
"outDir": "${configDir}/dist",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"emitDeclarationOnly": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"types": [
|
||||||
|
"jest",
|
||||||
|
"node",
|
||||||
|
"@types/jest"
|
||||||
|
],
|
||||||
|
"incremental": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"strict": false,
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "next"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"paths": {
|
||||||
|
"@payload-config": [
|
||||||
|
"./test/_community/config.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/live-preview": [
|
||||||
|
"./packages/live-preview/src"
|
||||||
|
],
|
||||||
|
"@payloadcms/live-preview-react": [
|
||||||
|
"./packages/live-preview-react/src/index.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/live-preview-vue": [
|
||||||
|
"./packages/live-preview-vue/src/index.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/ui": [
|
||||||
|
"./packages/ui/src/exports/client/index.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/ui/shared": [
|
||||||
|
"./packages/ui/src/exports/shared/index.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/ui/scss": [
|
||||||
|
"./packages/ui/src/scss.scss"
|
||||||
|
],
|
||||||
|
"@payloadcms/ui/scss/app.scss": [
|
||||||
|
"./packages/ui/src/scss/app.scss"
|
||||||
|
],
|
||||||
|
"@payloadcms/next/*": [
|
||||||
|
"./packages/next/src/exports/*.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/richtext-lexical/client": [
|
||||||
|
"./packages/richtext-lexical/src/exports/client/index.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/richtext-lexical/rsc": [
|
||||||
|
"./packages/richtext-lexical/src/exports/server/rsc.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/richtext-slate/rsc": [
|
||||||
|
"./packages/richtext-slate/src/exports/server/rsc.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/richtext-slate/client": [
|
||||||
|
"./packages/richtext-slate/src/exports/client/index.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/plugin-seo/client": [
|
||||||
|
"./packages/plugin-seo/src/exports/client.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/plugin-sentry/client": [
|
||||||
|
"./packages/plugin-sentry/src/exports/client.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/plugin-stripe/client": [
|
||||||
|
"./packages/plugin-stripe/src/exports/client.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/plugin-search/client": [
|
||||||
|
"./packages/plugin-search/src/exports/client.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/plugin-form-builder/client": [
|
||||||
|
"./packages/plugin-form-builder/src/exports/client.ts"
|
||||||
|
],
|
||||||
|
"@payloadcms/next": [
|
||||||
|
"./packages/next/src/exports/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"${configDir}/src"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"${configDir}/dist",
|
||||||
|
"${configDir}/build",
|
||||||
|
"${configDir}/temp",
|
||||||
|
"**/*.spec.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
112
tsconfig.json
112
tsconfig.json
@@ -1,107 +1,11 @@
|
|||||||
{
|
{
|
||||||
|
"extends": "./tsconfig.base.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"baseUrl": ".",
|
"composite": false,
|
||||||
"declaration": true,
|
|
||||||
"declarationMap": true,
|
|
||||||
"target": "ES2022",
|
|
||||||
"module": "NodeNext",
|
|
||||||
"moduleResolution": "NodeNext",
|
|
||||||
"allowJs": true,
|
|
||||||
"checkJs": false,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"jsx": "preserve",
|
|
||||||
"lib": [
|
|
||||||
"DOM",
|
|
||||||
"DOM.Iterable",
|
|
||||||
"ES2022"
|
|
||||||
],
|
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"outDir": "./dist",
|
"baseUrl": ".",
|
||||||
"resolveJsonModule": true,
|
|
||||||
"rootDir": ".",
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"sourceMap": true,
|
|
||||||
"strict": false,
|
|
||||||
"types": [
|
|
||||||
"jest",
|
|
||||||
"node",
|
|
||||||
"@types/jest"
|
|
||||||
],
|
|
||||||
"incremental": true,
|
|
||||||
"isolatedModules": true,
|
|
||||||
"plugins": [
|
|
||||||
{
|
|
||||||
"name": "next"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"paths": {
|
|
||||||
"@payload-config": [
|
|
||||||
"./test/_community/config.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/live-preview": [
|
|
||||||
"./packages/live-preview/src"
|
|
||||||
],
|
|
||||||
"@payloadcms/live-preview-react": [
|
|
||||||
"./packages/live-preview-react/src/index.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/live-preview-vue": [
|
|
||||||
"./packages/live-preview-vue/src/index.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/ui": [
|
|
||||||
"./packages/ui/src/exports/client/index.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/ui/shared": [
|
|
||||||
"./packages/ui/src/exports/shared/index.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/ui/scss": [
|
|
||||||
"./packages/ui/src/scss.scss"
|
|
||||||
],
|
|
||||||
"@payloadcms/ui/scss/app.scss": [
|
|
||||||
"./packages/ui/src/scss/app.scss"
|
|
||||||
],
|
|
||||||
"@payloadcms/next/*": [
|
|
||||||
"./packages/next/src/exports/*.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/richtext-lexical/client": [
|
|
||||||
"./packages/richtext-lexical/src/exports/client/index.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/richtext-lexical/rsc": [
|
|
||||||
"./packages/richtext-lexical/src/exports/server/rsc.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/richtext-slate/rsc": [
|
|
||||||
"./packages/richtext-slate/src/exports/server/rsc.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/richtext-slate/client": [
|
|
||||||
"./packages/richtext-slate/src/exports/client/index.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/plugin-seo/client": [
|
|
||||||
"./packages/plugin-seo/src/exports/client.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/plugin-sentry/client": [
|
|
||||||
"./packages/plugin-sentry/src/exports/client.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/plugin-stripe/client": [
|
|
||||||
"./packages/plugin-stripe/src/exports/client.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/plugin-search/client": [
|
|
||||||
"./packages/plugin-search/src/exports/client.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/plugin-form-builder/client": [
|
|
||||||
"./packages/plugin-form-builder/src/exports/client.ts"
|
|
||||||
],
|
|
||||||
"@payloadcms/next": [
|
|
||||||
"./packages/next/src/exports/*"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"exclude": [
|
|
||||||
"dist",
|
|
||||||
"build",
|
|
||||||
"temp",
|
|
||||||
"node_modules"
|
|
||||||
],
|
|
||||||
"composite": true,
|
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "./packages/create-payload-app"
|
"path": "./packages/create-payload-app"
|
||||||
@@ -171,11 +75,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"include": [
|
"include": [
|
||||||
"app",
|
"${configDir}/src",
|
||||||
".next/types/**/*.ts",
|
".next/types/**/*.ts"
|
||||||
"scripts/**/*.ts",
|
|
||||||
"instrumentation.ts",
|
|
||||||
"sentry.server.config.ts",
|
|
||||||
"sentry.client.config.ts"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user