chore: successful build
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"build": "pnpm copyfiles && pnpm build:swc && pnpm build:types && ts-node -T ../../scripts/exportPointerFiles.ts ../packages/payload dist/exports",
|
||||
"build": "pnpm copyfiles && pnpm build:swc && pnpm build:types && tsx ../../scripts/exportPointerFiles.ts ../packages/payload dist/exports",
|
||||
"build:swc": "swc ./src -d ./dist --config-file .swcrc",
|
||||
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
||||
"build:watch": "nodemon --watch 'src/**' --ext 'ts,tsx' --exec \"pnpm build:tsc\"",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"types": "./dist/index.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "pnpm copyfiles && pnpm build:swc && pnpm build:types && ts-node -T ../../scripts/exportPointerFiles.ts ../packages/richtext-lexical dist/exports",
|
||||
"build": "pnpm copyfiles && pnpm build:swc && pnpm build:types && tsx ../../scripts/exportPointerFiles.ts ../packages/richtext-lexical dist/exports",
|
||||
"build:swc": "swc ./src -d ./dist --config-file .swcrc",
|
||||
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
||||
"build:clean": "find . \\( -type d \\( -name build -o -name dist -o -name .cache \\) -o -type f -name tsconfig.tsbuildinfo \\) -exec rm -rf {} + && pnpm build",
|
||||
|
||||
@@ -23,7 +23,6 @@ export type BlockFields = {
|
||||
}
|
||||
|
||||
const BlockComponent = React.lazy(() =>
|
||||
// @ts-expect-error-next-line TypeScript being dumb
|
||||
import('../component').then((module) => ({
|
||||
default: module.BlockComponent,
|
||||
})),
|
||||
@@ -88,6 +87,7 @@ export class BlockNode extends DecoratorBlockNode {
|
||||
return false
|
||||
}
|
||||
decorate(editor: LexicalEditor, config: EditorConfig): JSX.Element {
|
||||
// @ts-expect-error
|
||||
return <BlockComponent formData={this.getFields()} nodeKey={this.getKey()} />
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ export type SerializedUnknownConvertedNode = Spread<
|
||||
>
|
||||
|
||||
const Component = React.lazy(() =>
|
||||
// @ts-expect-error-next-line TypeScript being dumb
|
||||
import('./Component').then((module) => ({
|
||||
default: module.UnknownConvertedNodeComponent,
|
||||
})),
|
||||
|
||||
@@ -17,7 +17,6 @@ export type SerializedUnknownConvertedNode = Spread<
|
||||
>
|
||||
|
||||
const Component = React.lazy(() =>
|
||||
// @ts-expect-error-next-line TypeScript being dumb
|
||||
import('./Component').then((module) => ({
|
||||
default: module.UnknownConvertedNodeComponent,
|
||||
})),
|
||||
|
||||
@@ -17,7 +17,6 @@ import {
|
||||
import * as React from 'react'
|
||||
|
||||
const RelationshipComponent = React.lazy(() =>
|
||||
// @ts-expect-error-next-line TypeScript being dumb
|
||||
import('./components/RelationshipComponent').then((module) => ({
|
||||
default: module.RelationshipComponent,
|
||||
})),
|
||||
|
||||
@@ -12,7 +12,6 @@ import {
|
||||
} from 'lexical'
|
||||
import * as React from 'react'
|
||||
|
||||
// @ts-expect-error-next-line TypeScript being dumb
|
||||
const RawUploadComponent = React.lazy(async () => await import('../component'))
|
||||
|
||||
export type RawUploadPayload = {
|
||||
@@ -104,6 +103,7 @@ export class UploadNode extends DecoratorBlockNode {
|
||||
}
|
||||
|
||||
decorate(): JSX.Element {
|
||||
// @ts-expect-error
|
||||
return <RawUploadComponent data={this.__data} format={this.__format} nodeKey={this.getKey()} />
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import { defaultEditorLexicalConfig } from './lexical/config/client/default'
|
||||
import { loadClientFeatures } from './lexical/config/client/loader'
|
||||
import { sanitizeClientEditorConfig } from './lexical/config/client/sanitize'
|
||||
|
||||
// @ts-expect-error-next-line Just TypeScript being broken // TODO: Open TypeScript issue
|
||||
const RichTextEditor = lazy(() => import('./Field'))
|
||||
|
||||
export const RichTextField: React.FC<
|
||||
|
||||
@@ -84,7 +84,6 @@ export function lexicalEditor(props?: LexicalEditorProps): LexicalRichTextAdapte
|
||||
}),
|
||||
|
||||
LazyFieldComponent: () =>
|
||||
// @ts-expect-error
|
||||
import('./field').then((module) => {
|
||||
const RichTextField = module.RichTextField
|
||||
return import('@payloadcms/ui').then((module2) =>
|
||||
|
||||
@@ -11,7 +11,6 @@ import type { EnabledFeatures } from './types'
|
||||
|
||||
import { createFeatureMap } from './createFeatureMap'
|
||||
|
||||
// @ts-expect-error Just TypeScript being broken // TODO: Open TypeScript issue
|
||||
const RichTextEditor = lazy(() => import('./RichText'))
|
||||
|
||||
const RichTextField: React.FC<
|
||||
|
||||
15
packages/translations/.swcrc
Normal file
15
packages/translations/.swcrc
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/swcrc",
|
||||
"sourceMaps": "inline",
|
||||
"jsc": {
|
||||
"target": "esnext",
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"tsx": true,
|
||||
"dts": true
|
||||
}
|
||||
},
|
||||
"module": {
|
||||
"type": "es6"
|
||||
}
|
||||
}
|
||||
@@ -5,9 +5,11 @@
|
||||
"types": "./dist/types.d.ts",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"writeFiles": "npx ts-node ./writeTranslationFiles.ts",
|
||||
"build": "pnpm writeFiles && tsc",
|
||||
"build:swc": "swc ./src -d ./dist --config-file .swcrc",
|
||||
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
||||
"build": "pnpm writeFiles && pnpm build:swc && pnpm build:types",
|
||||
"clean": "rimraf {dist,*.tsbuildinfo}",
|
||||
"writeFiles": "npx tsx ./writeTranslationFiles.ts",
|
||||
"prepublishOnly": "pnpm clean && pnpm turbo build"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const fs = require('fs')
|
||||
import fs from 'fs'
|
||||
|
||||
export function copyFile(source, destination) {
|
||||
fs.copyFile(source, destination, (err) => {
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
"compilerOptions": {
|
||||
"composite": true, // Make sure typescript knows that this module depends on their references
|
||||
"esModuleInterop": true,
|
||||
"target": "ESNext",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"resolveJsonModule": true,
|
||||
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
|
||||
"rootDir": "./src",
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
import * as fs from 'fs'
|
||||
import * as path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
import { ensureDirectoryExists } from './src/utilities/ensureDirExists'
|
||||
import { copyFile } from './src/utilities/copyFile'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
|
||||
const serverTranslationKeys = [
|
||||
'authentication:account',
|
||||
'authentication:api',
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
import fs from 'fs'
|
||||
import path from 'path'
|
||||
import { fileURLToPath } from 'url'
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
|
||||
const [baseDirRelativePath] = process.argv.slice(2)
|
||||
const [sourceDirRelativePath] = process.argv.slice(3)
|
||||
|
||||
@@ -3,18 +3,14 @@
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"target": "ESNext",
|
||||
"module": "Node16",
|
||||
"moduleResolution": "Node16",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"allowJs": true,
|
||||
"checkJs": false,
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "preserve",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"noEmit": true,
|
||||
"outDir": "./dist",
|
||||
"resolveJsonModule": true,
|
||||
@@ -22,11 +18,7 @@
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"strict": false,
|
||||
"types": [
|
||||
"jest",
|
||||
"node",
|
||||
"@types/jest"
|
||||
],
|
||||
"types": ["jest", "node", "@types/jest"],
|
||||
"incremental": true,
|
||||
"isolatedModules": true,
|
||||
"plugins": [
|
||||
@@ -35,65 +27,28 @@
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"payload": [
|
||||
"./packages/payload/src"
|
||||
],
|
||||
"payload/*": [
|
||||
"./packages/payload/src/exports/*"
|
||||
],
|
||||
"@payloadcms/db-mongodb": [
|
||||
"./packages/db-mongodb/src"
|
||||
],
|
||||
"@payloadcms/richtext-lexical": [
|
||||
"./packages/richtext-lexical/src"
|
||||
],
|
||||
"@payloadcms/plugin-cloud": [
|
||||
"./packages/plugin-cloud/src"
|
||||
],
|
||||
"@payloadcms/plugin-cloud-storage": [
|
||||
"./packages/plugin-cloud-storage/src"
|
||||
],
|
||||
"@payloadcms/ui": [
|
||||
"./packages/ui/src/exports/index.ts"
|
||||
],
|
||||
"@payloadcms/ui/*": [
|
||||
"./packages/ui/src/exports/*"
|
||||
],
|
||||
"@payloadcms/ui/scss": [
|
||||
"./packages/ui/src/scss/styles.scss"
|
||||
],
|
||||
"@payloadcms/ui/scss/app.scss": [
|
||||
"./packages/ui/src/scss/app.scss"
|
||||
],
|
||||
"@payloadcms/translations": [
|
||||
"./packages/translations/src/exports/index.ts"
|
||||
],
|
||||
"payload": ["./packages/payload/src"],
|
||||
"payload/*": ["./packages/payload/src/exports/*"],
|
||||
"@payloadcms/db-mongodb": ["./packages/db-mongodb/src"],
|
||||
"@payloadcms/richtext-lexical": ["./packages/richtext-lexical/src"],
|
||||
"@payloadcms/plugin-cloud": ["./packages/plugin-cloud/src"],
|
||||
"@payloadcms/plugin-cloud-storage": ["./packages/plugin-cloud-storage/src"],
|
||||
"@payloadcms/ui": ["./packages/ui/src/exports/index.ts"],
|
||||
"@payloadcms/ui/*": ["./packages/ui/src/exports/*"],
|
||||
"@payloadcms/ui/scss": ["./packages/ui/src/scss/styles.scss"],
|
||||
"@payloadcms/ui/scss/app.scss": ["./packages/ui/src/scss/app.scss"],
|
||||
"@payloadcms/translations": ["./packages/translations/src/exports/index.ts"],
|
||||
"@payloadcms/translations/client": [
|
||||
"./packages/translations/src/_generatedFiles_/client/index.ts"
|
||||
],
|
||||
"@payloadcms/translations/api": [
|
||||
"./packages/translations/src/_generatedFiles_/api/index.ts"
|
||||
],
|
||||
"@payloadcms/next/*": [
|
||||
"./packages/next/src/*"
|
||||
],
|
||||
"@payloadcms/next": [
|
||||
"./packages/next/src/exports/*"
|
||||
],
|
||||
"@payloadcms/graphql": [
|
||||
"./packages/graphql/src"
|
||||
],
|
||||
"@payload-config": [
|
||||
"./test/_community/config.ts"
|
||||
]
|
||||
"@payloadcms/translations/api": ["./packages/translations/src/_generatedFiles_/api/index.ts"],
|
||||
"@payloadcms/next/*": ["./packages/next/src/*"],
|
||||
"@payloadcms/next": ["./packages/next/src/exports/*"],
|
||||
"@payloadcms/graphql": ["./packages/graphql/src"],
|
||||
"@payload-config": ["./test/_community/config.ts"]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
"build",
|
||||
"temp",
|
||||
"node_modules"
|
||||
],
|
||||
"exclude": ["dist", "build", "temp", "node_modules"],
|
||||
"composite": true,
|
||||
"references": [
|
||||
{
|
||||
@@ -161,4 +116,4 @@
|
||||
"app/**/*.tsx",
|
||||
"scripts/**/*.ts"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user