fix: reduce global DOM/Node type conflicts in server-only packages (#12737)

Currently, we globally enable both DOM and Node.js types. While this
mostly works, it can cause conflicts - particularly with `fetch`. For
example, TypeScript may incorrectly allow browser-only properties (like
`cache`) and reject valid Node.js ones like `dispatcher`.

This PR disables DOM types for server-only packages like payload,
ensuring Node-specific typings are applied. This caught a few instances
of incorrect fetch usage that were previously masked by overlapping DOM
types.

This is not a perfect solution - packages that contain both server and
client code (like richtext-lexical or next) will still suffer from this
issue. However, it's an improvement in cases where we can cleanly
separate server and client types, like for the `payload` package which
is server-only.

## Use-case

This change enables https://github.com/payloadcms/payload/pull/12622 to
explore using node-native fetch + `dispatcher`, instead of `node-fetch`
+ `agent`.

Currently, it will incorrectly report that `dispatcher` is not a valid
property for node-native fetch
This commit is contained in:
Alessio Gravili
2025-06-11 13:59:19 -07:00
committed by GitHub
parent 018317dfba
commit 67fb29b2a4
43 changed files with 205 additions and 187 deletions

View File

@@ -141,7 +141,7 @@
"@types/fs-extra": "^11.0.2",
"@types/jest": "29.5.12",
"@types/minimist": "1.2.5",
"@types/node": "22.5.4",
"@types/node": "22.15.30",
"@types/react": "19.1.0",
"@types/react-dom": "19.1.2",
"@types/shelljs": "0.8.15",

View File

@@ -77,7 +77,7 @@
"@types/esprima": "^4.0.6",
"@types/fs-extra": "^9.0.12",
"@types/jest": "29.5.12",
"@types/node": "22.5.4"
"@types/node": "22.15.30"
},
"engines": {
"node": "^18.20.2 || >=20.9.0"

View File

@@ -7,7 +7,7 @@ export async function getExamples({ branch }: { branch: string }): Promise<Proje
const response = await fetch(url)
const examplesResponseList: { name: string; path: string }[] = await response.json()
const examplesResponseList = (await response.json()) as { name: string; path: string }[]
const examples: ProjectExample[] = examplesResponseList.map((example) => ({
name: example.name,

View File

@@ -19,7 +19,7 @@ export async function getLatestPackageVersion({
}) {
try {
const response = await fetch(`https://registry.npmjs.org/${packageName}`)
const data = await response.json()
const data = (await response.json()) as { 'dist-tags': { latest: string } }
const latestVersion = data['dist-tags'].latest
if (debug) {

View File

@@ -1,3 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -1,4 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"references": [{ "path": "../payload" }, { "path": "../translations" }]
"references": [{ "path": "../payload" }, { "path": "../translations" }],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -10,5 +10,9 @@
{
"path": "../drizzle"
}
]
],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -10,5 +10,9 @@
{
"path": "../drizzle"
}
]
],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -10,5 +10,9 @@
{
"path": "../drizzle"
}
]
],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -4,6 +4,8 @@
/* TODO: remove the following lines */
"strict": false,
"noUncheckedIndexedAccess": false,
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
},
"references": [{ "path": "../payload" }, { "path": "../translations" }]
}

View File

@@ -1,4 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"references": [{ "path": "../payload" }]
"references": [{ "path": "../payload" }],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -1,4 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"references": [{ "path": "../payload" }]
"references": [{ "path": "../payload" }],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -4,6 +4,8 @@
/* TODO: remove the following lines */
"strict": false,
"noUncheckedIndexedAccess": false,
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
},
"references": [{ "path": "../payload" }]
}

View File

@@ -1,4 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"references": [{ "path": "../payload" }]
"references": [{ "path": "../payload" }],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -344,7 +344,10 @@ export const json: JSONFieldValidation = (
}
return response.json()
})
.then((json) => {
.then((_json) => {
const json = _json as {
id: string
}
const jsonSchemaSanitizations = {
id: undefined,
$id: json.id,

View File

@@ -20,6 +20,7 @@ export const deleteHandler: PayloadHandler = async (incomingReq): Promise<Respon
if (data) {
reqWithData.data = data
// @ts-expect-error
reqWithData.json = () => Promise.resolve(data)
}

View File

@@ -20,6 +20,7 @@ export const findByIDHandler: PayloadHandler = async (incomingReq): Promise<Resp
if (data) {
reqWithData.data = data
// @ts-expect-error
reqWithData.json = () => Promise.resolve(data)
}

View File

@@ -20,6 +20,7 @@ export const updateHandler: PayloadHandler = async (incomingReq) => {
if (data) {
reqWithData.data = data
// @ts-expect-error
reqWithData.json = () => Promise.resolve(data)
}

View File

@@ -24,6 +24,7 @@ export const addDataAndFileToRequest: AddDataAndFileToRequest = async (req) => {
req.payload.logger.error(error)
} finally {
req.data = data
// @ts-expect-error
req.json = () => Promise.resolve(data)
}
} else if (bodyByteSize && contentType?.includes('multipart/')) {

View File

@@ -92,6 +92,7 @@ export const handleEndpoints = async ({
config: incomingConfig,
path,
request: new Request(url, {
// @ts-expect-error // TODO: check if this is required
cache: request.cache,
credentials: request.credentials,
headers: request.headers,

View File

@@ -21,7 +21,7 @@ export const routeError = async ({
config: Promise<SanitizedConfig> | SanitizedConfig
err: APIError
req: PayloadRequest | Request
}) => {
}): Promise<Response> => {
if ('payloadInitError' in err && err.payloadInitError === true) {
// do not attempt initializing Payload if the error is due to a failed initialization. Otherwise,
// it will cause an infinite loop of initialization attempts and endless error responses, without

View File

@@ -1,4 +1,9 @@
{
"extends": "../../tsconfig.base.json",
"references": [{ "path": "../translations" }]
"references": [{ "path": "../translations" }],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as payload is a server-only package.
// This ensures node types do not conflict with node types (e.g. fetch.dispatcher)
"lib": ["ES2022"],
}
}

View File

@@ -1,4 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"references": [{ "path": "../payload" }, { "path": "../ui" }]
"references": [{ "path": "../payload" }, { "path": "../ui" }],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -1,4 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"references": [{ "path": "../payload" }]
"references": [{ "path": "../payload" }],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -1,4 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"references": [{ "path": "../payload" }]
"references": [{ "path": "../payload" }],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -396,7 +396,7 @@
"@payloadcms/eslint-config": "workspace:*",
"@types/escape-html": "1.0.4",
"@types/json-schema": "7.0.15",
"@types/node": "22.5.4",
"@types/node": "22.15.30",
"@types/react": "19.1.0",
"@types/react-dom": "19.1.2",
"babel-plugin-react-compiler": "19.1.0-rc.2",

View File

@@ -66,7 +66,7 @@
"devDependencies": {
"@payloadcms/eslint-config": "workspace:*",
"@types/is-hotkey": "^0.1.10",
"@types/node": "22.5.4",
"@types/node": "22.15.30",
"@types/react": "19.1.0",
"@types/react-dom": "19.1.2",
"payload": "workspace:*"

View File

@@ -13,7 +13,9 @@ export const AzureClientUploadHandler = createClientUploadHandler({
method: 'POST',
})
const { url } = await response.json()
const { url } = (await response.json()) as {
url: string
}
await fetch(url, {
body: file,

View File

@@ -28,7 +28,11 @@ export const getGenerateSignedURLHandler = ({
throw new APIError('Unreachable')
}
const { collectionSlug, filename, mimeType } = await req.json()
const { collectionSlug, filename, mimeType } = (await req.json()) as {
collectionSlug: string
filename: string
mimeType: string
}
const collectionS3Config = collections[collectionSlug]
if (!collectionS3Config) {

View File

@@ -5,9 +5,11 @@
"noEmit": false /* Do not emit outputs. */,
"emitDeclarationOnly": true,
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
"rootDir": "./src" /* Specify the root folder within your source files. */,
},
"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" }],
}

View File

@@ -13,7 +13,7 @@ export const GcsClientUploadHandler = createClientUploadHandler({
method: 'POST',
})
const { url } = await response.json()
const { url } = (await response.json()) as { url: string }
await fetch(url, {
body: file,

View File

@@ -28,7 +28,11 @@ export const getGenerateSignedURLHandler = ({
throw new APIError('Unreachable')
}
const { collectionSlug, filename, mimeType } = await req.json()
const { collectionSlug, filename, mimeType } = (await req.json()) as {
collectionSlug: string
filename: string
mimeType: string
}
const collectionS3Config = collections[collectionSlug]
if (!collectionS3Config) {

View File

@@ -6,6 +6,8 @@
"emitDeclarationOnly": true,
"outDir": "./dist" /* Specify an output folder for all emitted files. */,
"rootDir": "./src" /* Specify the root folder within your source files. */,
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
},
"exclude": ["dist", "node_modules"],
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.d.ts", "src/**/*.json"],

View File

@@ -13,7 +13,9 @@ export const S3ClientUploadHandler = createClientUploadHandler({
method: 'POST',
})
const { url } = await response.json()
const { url } = (await response.json()) as {
url: string
}
await fetch(url, {
body: file,

View File

@@ -30,7 +30,11 @@ export const getGenerateSignedURLHandler = ({
throw new APIError('Content-Type expected to be application/json', 400)
}
const { collectionSlug, filename, mimeType } = await req.json()
const { collectionSlug, filename, mimeType } = (await req.json()) as {
collectionSlug: string
filename: string
mimeType: string
}
const collectionS3Config = collections[collectionSlug]
if (!collectionS3Config) {

View File

@@ -85,7 +85,7 @@ export const getHandler = ({
command,
typeof signedDownloads === 'object' ? signedDownloads : { expiresIn: 7200 },
)
return Response.redirect(signedUrl)
return Response.redirect(signedUrl, 302)
}
}

View File

@@ -1,4 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"references": [{ "path": "../payload" }, { "path": "../plugin-cloud-storage" }]
"references": [{ "path": "../payload" }, { "path": "../plugin-cloud-storage" }],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -1,4 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"references": [{ "path": "../payload" }, { "path": "../plugin-cloud-storage" }]
"references": [{ "path": "../payload" }, { "path": "../plugin-cloud-storage" }],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -41,7 +41,10 @@ export const getStaticHandler = (
}
const response = await fetch(`${fileUrl}?${uploadedAtString}`, {
cache: 'no-store',
headers: {
'Cache-Control': 'no-store, no-cache, must-revalidate',
Pragma: 'no-cache',
},
})
const blob = await response.blob()

View File

@@ -1,4 +1,8 @@
{
"extends": "../../tsconfig.base.json",
"references": [{ "path": "../payload" }, { "path": "../plugin-cloud-storage" }]
"references": [{ "path": "../payload" }, { "path": "../plugin-cloud-storage" }],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

View File

@@ -3,4 +3,8 @@
"include": [
"./src/**/*.ts",
],
"compilerOptions": {
// Do not include DOM and DOM.Iterable as this is a server-only package.
"lib": ["ES2022"],
}
}

226
pnpm-lock.yaml generated
View File

@@ -67,8 +67,8 @@ importers:
specifier: 1.2.5
version: 1.2.5
'@types/node':
specifier: 22.5.4
version: 22.5.4
specifier: 22.15.30
version: 22.15.30
'@types/react':
specifier: 19.1.0
version: 19.1.0
@@ -116,7 +116,7 @@ importers:
version: 9.0.11
jest:
specifier: 29.7.0
version: 29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0)
version: 29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0)
lint-staged:
specifier: 15.2.7
version: 15.2.7
@@ -128,7 +128,7 @@ importers:
version: 10.1.4(@aws-sdk/credential-providers@3.687.0(@aws-sdk/client-sso-oidc@3.687.0(@aws-sdk/client-sts@3.687.0)))(socks@2.8.3)
next:
specifier: 15.3.2
version: 15.3.2(@babel/core@7.27.3)(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4)
version: 15.3.2(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4)
open:
specifier: ^10.1.0
version: 10.1.0
@@ -261,8 +261,8 @@ importers:
specifier: 29.5.12
version: 29.5.12
'@types/node':
specifier: 22.5.4
version: 22.5.4
specifier: 22.15.30
version: 22.15.30
packages/db-mongodb:
dependencies:
@@ -496,7 +496,7 @@ importers:
version: 29.5.12
jest:
specifier: ^29.7.0
version: 29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0)
version: 29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0)
payload:
specifier: workspace:*
version: link:../payload
@@ -529,7 +529,7 @@ importers:
version: 4.6.1(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3)
eslint-plugin-jest:
specifier: 28.11.0
version: 28.11.0(@typescript-eslint/eslint-plugin@8.26.1(@typescript-eslint/parser@8.26.1(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.6))(jest@29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0))(typescript@5.7.3)
version: 28.11.0(@typescript-eslint/eslint-plugin@8.26.1(@typescript-eslint/parser@8.26.1(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.6))(jest@29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0))(typescript@5.7.3)
eslint-plugin-jest-dom:
specifier: 5.5.0
version: 5.5.0(eslint@9.22.0(jiti@1.21.6))
@@ -583,7 +583,7 @@ importers:
version: 4.6.1(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3)
eslint-plugin-jest:
specifier: 28.11.0
version: 28.11.0(@typescript-eslint/eslint-plugin@8.26.1(@typescript-eslint/parser@8.26.1(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.6))(jest@29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0))(typescript@5.7.3)
version: 28.11.0(@typescript-eslint/eslint-plugin@8.26.1(@typescript-eslint/parser@8.26.1(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.6))(jest@29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0))(typescript@5.7.3)
eslint-plugin-jest-dom:
specifier: 5.5.0
version: 5.5.0(eslint@9.22.0(jiti@1.21.6))
@@ -1356,8 +1356,8 @@ importers:
specifier: 7.0.15
version: 7.0.15
'@types/node':
specifier: 22.5.4
version: 22.5.4
specifier: 22.15.30
version: 22.15.30
'@types/react':
specifier: 19.1.0
version: 19.1.0
@@ -1417,8 +1417,8 @@ importers:
specifier: ^0.1.10
version: 0.1.10
'@types/node':
specifier: 22.5.4
version: 22.5.4
specifier: 22.15.30
version: 22.15.30
'@types/react':
specifier: 19.1.0
version: 19.1.0
@@ -1782,7 +1782,7 @@ importers:
version: link:../packages/ui
'@sentry/nextjs':
specifier: ^8.33.1
version: 8.37.1(@opentelemetry/core@1.27.0(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.54.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.27.0(@opentelemetry/api@1.9.0))(next@15.3.2(@babel/core@7.27.3)(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(react@19.1.0)(webpack@5.96.1(@swc/core@1.11.29)(esbuild@0.19.12))
version: 8.37.1(@opentelemetry/core@1.27.0(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.54.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.27.0(@opentelemetry/api@1.9.0))(next@15.3.2(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(react@19.1.0)(webpack@5.96.1(@swc/core@1.11.29))
'@sentry/react':
specifier: ^7.77.0
version: 7.119.2(react@19.1.0)
@@ -1836,7 +1836,7 @@ importers:
version: 2.1.0
jest:
specifier: 29.7.0
version: 29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0)
version: 29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0)
jwt-decode:
specifier: 4.0.0
version: 4.0.0
@@ -1845,7 +1845,7 @@ importers:
version: 8.15.1(@aws-sdk/credential-providers@3.687.0(@aws-sdk/client-sso-oidc@3.687.0(@aws-sdk/client-sts@3.687.0)))(socks@2.8.3)
next:
specifier: 15.3.2
version: 15.3.2(@babel/core@7.27.3)(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4)
version: 15.3.2(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4)
nodemailer:
specifier: 6.9.16
version: 6.9.16
@@ -5500,8 +5500,8 @@ packages:
'@types/mysql@2.15.26':
resolution: {integrity: sha512-DSLCOXhkvfS5WNNPbfn2KdICAmk8lLc+/PNvnPnF7gOdMZCxopXduqv0OQ13y/yA/zXTSikZZqVgybUxOEg6YQ==}
'@types/node@22.5.4':
resolution: {integrity: sha512-FDuKUJQm/ju9fT/SeX/6+gBzoPzlVCzfzmGkwKvRHQVxi4BntVbyIwf6a4Xn62mrvndLiml6z/UBXIdEVjQLXg==}
'@types/node@22.15.30':
resolution: {integrity: sha512-6Q7lr06bEHdlfplU6YRbgG1SFBdlsfNC4/lX+SkhiTs0cpJkOElmWls8PxDFv4yY/xKb8Y6SO0OmSX4wgqTZbA==}
'@types/nodemailer@6.4.17':
resolution: {integrity: sha512-I9CCaIp6DTldEg7vyUTZi8+9Vo0hi1/T8gv3C89yk1rSAAzoKQ8H8ki/jBYJSFoH/BisgLP8tkZMlQ91CIquww==}
@@ -8140,7 +8140,6 @@ packages:
libsql@0.4.7:
resolution: {integrity: sha512-T9eIRCs6b0J1SHKYIvD8+KCJMcWZ900iZyxdnSCdqxN12Z1ijzT+jY5nrk72Jw4B0HGzms2NgpryArlJqvc3Lw==}
cpu: [x64, arm64, wasm32]
os: [darwin, linux, win32]
license-checker@25.0.1:
@@ -10187,8 +10186,8 @@ packages:
unbzip2-stream@1.4.3:
resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==}
undici-types@6.19.8:
resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
undici-types@6.21.0:
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
undici@5.28.4:
resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==}
@@ -13076,7 +13075,7 @@ snapshots:
'@jest/console@29.7.0':
dependencies:
'@jest/types': 29.6.3
'@types/node': 22.5.4
'@types/node': 22.15.30
chalk: 4.1.2
jest-message-util: 29.7.0
jest-util: 29.7.0
@@ -13089,14 +13088,14 @@ snapshots:
'@jest/test-result': 29.7.0
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
'@types/node': 22.5.4
'@types/node': 22.15.30
ansi-escapes: 4.3.2
chalk: 4.1.2
ci-info: 3.9.0
exit: 0.1.2
graceful-fs: 4.2.11
jest-changed-files: 29.7.0
jest-config: 29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0)
jest-config: 29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0)
jest-haste-map: 29.7.0
jest-message-util: 29.7.0
jest-regex-util: 29.6.3
@@ -13125,7 +13124,7 @@ snapshots:
dependencies:
'@jest/fake-timers': 29.7.0
'@jest/types': 29.6.3
'@types/node': 22.5.4
'@types/node': 22.15.30
jest-mock: 29.7.0
'@jest/expect-utils@29.7.0':
@@ -13143,7 +13142,7 @@ snapshots:
dependencies:
'@jest/types': 29.6.3
'@sinonjs/fake-timers': 10.3.0
'@types/node': 22.5.4
'@types/node': 22.15.30
jest-message-util: 29.7.0
jest-mock: 29.7.0
jest-util: 29.7.0
@@ -13165,7 +13164,7 @@ snapshots:
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
'@jridgewell/trace-mapping': 0.3.25
'@types/node': 22.5.4
'@types/node': 22.15.30
chalk: 4.1.2
collect-v8-coverage: 1.0.2
exit: 0.1.2
@@ -13235,7 +13234,7 @@ snapshots:
'@jest/schemas': 29.6.3
'@types/istanbul-lib-coverage': 2.0.6
'@types/istanbul-reports': 3.0.4
'@types/node': 22.5.4
'@types/node': 22.15.30
'@types/yargs': 17.0.33
chalk: 4.1.2
@@ -14141,35 +14140,6 @@ snapshots:
'@sentry/utils': 7.119.2
localforage: 1.10.0
'@sentry/nextjs@8.37.1(@opentelemetry/core@1.27.0(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.54.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.27.0(@opentelemetry/api@1.9.0))(next@15.3.2(@babel/core@7.27.3)(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(react@19.1.0)(webpack@5.96.1(@swc/core@1.11.29)(esbuild@0.19.12))':
dependencies:
'@opentelemetry/api': 1.9.0
'@opentelemetry/instrumentation-http': 0.53.0(@opentelemetry/api@1.9.0)
'@opentelemetry/semantic-conventions': 1.27.0
'@rollup/plugin-commonjs': 26.0.1(rollup@3.29.5)
'@sentry-internal/browser-utils': 8.37.1
'@sentry/core': 8.37.1
'@sentry/node': 8.37.1
'@sentry/opentelemetry': 8.37.1(@opentelemetry/api@1.9.0)(@opentelemetry/core@1.27.0(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.54.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.27.0(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.27.0)
'@sentry/react': 8.37.1(react@19.1.0)
'@sentry/types': 8.37.1
'@sentry/utils': 8.37.1
'@sentry/vercel-edge': 8.37.1
'@sentry/webpack-plugin': 2.22.6(webpack@5.96.1(@swc/core@1.11.29)(esbuild@0.19.12))
chalk: 3.0.0
next: 15.3.2(@babel/core@7.27.3)(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4)
resolve: 1.22.8
rollup: 3.29.5
stacktrace-parser: 0.1.10
transitivePeerDependencies:
- '@opentelemetry/core'
- '@opentelemetry/instrumentation'
- '@opentelemetry/sdk-trace-base'
- encoding
- react
- supports-color
- webpack
'@sentry/nextjs@8.37.1(@opentelemetry/core@1.27.0(@opentelemetry/api@1.9.0))(@opentelemetry/instrumentation@0.54.2(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@1.27.0(@opentelemetry/api@1.9.0))(next@15.3.2(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4))(react@19.1.0)(webpack@5.96.1(@swc/core@1.11.29))':
dependencies:
'@opentelemetry/api': 1.9.0
@@ -14186,7 +14156,7 @@ snapshots:
'@sentry/vercel-edge': 8.37.1
'@sentry/webpack-plugin': 2.22.6(webpack@5.96.1(@swc/core@1.11.29))
chalk: 3.0.0
next: 15.3.2(@babel/core@7.27.3)(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4)
next: 15.3.2(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4)
resolve: 1.22.8
rollup: 3.29.5
stacktrace-parser: 0.1.10
@@ -14294,16 +14264,6 @@ snapshots:
'@sentry/types': 8.37.1
'@sentry/utils': 8.37.1
'@sentry/webpack-plugin@2.22.6(webpack@5.96.1(@swc/core@1.11.29)(esbuild@0.19.12))':
dependencies:
'@sentry/bundler-plugin-core': 2.22.6
unplugin: 1.0.1
uuid: 9.0.0
webpack: 5.96.1(@swc/core@1.11.29)(esbuild@0.19.12)
transitivePeerDependencies:
- encoding
- supports-color
'@sentry/webpack-plugin@2.22.6(webpack@5.96.1(@swc/core@1.11.29))':
dependencies:
'@sentry/bundler-plugin-core': 2.22.6
@@ -14977,13 +14937,13 @@ snapshots:
'@types/busboy@1.5.4':
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
'@types/caseless@0.12.5': {}
'@types/connect@3.4.36':
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
'@types/debug@4.1.12':
dependencies:
@@ -15018,20 +14978,20 @@ snapshots:
'@types/fs-extra@11.0.4':
dependencies:
'@types/jsonfile': 6.1.4
'@types/node': 22.5.4
'@types/node': 22.15.30
'@types/fs-extra@9.0.13':
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
'@types/glob@7.2.0':
dependencies:
'@types/minimatch': 5.1.2
'@types/node': 22.5.4
'@types/node': 22.15.30
'@types/graceful-fs@4.1.9':
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
'@types/hast@3.0.4':
dependencies:
@@ -15060,7 +15020,7 @@ snapshots:
'@types/jsonfile@6.1.4':
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
'@types/lodash.get@4.4.9':
dependencies:
@@ -15080,7 +15040,7 @@ snapshots:
'@types/mongoose-aggregate-paginate-v2@1.0.12(@aws-sdk/credential-providers@3.687.0(@aws-sdk/client-sso-oidc@3.687.0(@aws-sdk/client-sts@3.687.0)))(socks@2.8.3)':
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
mongoose: 8.15.1(@aws-sdk/credential-providers@3.687.0(@aws-sdk/client-sso-oidc@3.687.0(@aws-sdk/client-sts@3.687.0)))(socks@2.8.3)
transitivePeerDependencies:
- '@aws-sdk/credential-providers'
@@ -15096,15 +15056,15 @@ snapshots:
'@types/mysql@2.15.26':
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
'@types/node@22.5.4':
'@types/node@22.15.30':
dependencies:
undici-types: 6.19.8
undici-types: 6.21.0
'@types/nodemailer@6.4.17':
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
'@types/parse-json@4.0.2': {}
@@ -15114,19 +15074,19 @@ snapshots:
'@types/pg@8.10.2':
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
pg-protocol: 1.7.0
pg-types: 4.0.2
'@types/pg@8.11.6':
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
pg-protocol: 1.7.0
pg-types: 4.0.2
'@types/pg@8.6.1':
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
pg-protocol: 1.7.0
pg-types: 2.2.0
@@ -15134,7 +15094,7 @@ snapshots:
'@types/prompts@2.4.9':
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
kleur: 3.0.3
'@types/range-parser@1.2.7': {}
@@ -15154,7 +15114,7 @@ snapshots:
'@types/request@2.48.12':
dependencies:
'@types/caseless': 0.12.5
'@types/node': 22.5.4
'@types/node': 22.15.30
'@types/tough-cookie': 4.0.5
form-data: 2.5.2
@@ -15163,7 +15123,7 @@ snapshots:
'@types/shelljs@0.8.15':
dependencies:
'@types/glob': 7.2.0
'@types/node': 22.5.4
'@types/node': 22.15.30
'@types/shimmer@1.2.0': {}
@@ -15187,7 +15147,7 @@ snapshots:
'@types/ws@8.5.13':
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
'@types/yargs-parser@21.0.3': {}
@@ -16198,13 +16158,13 @@ snapshots:
path-type: 4.0.0
yaml: 1.10.2
create-jest@29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0):
create-jest@29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0):
dependencies:
'@jest/types': 29.6.3
chalk: 4.1.2
exit: 0.1.2
graceful-fs: 4.2.11
jest-config: 29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0)
jest-config: 29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0)
jest-util: 29.7.0
prompts: 2.4.2
transitivePeerDependencies:
@@ -16714,13 +16674,13 @@ snapshots:
eslint: 9.22.0(jiti@1.21.6)
requireindex: 1.2.0
eslint-plugin-jest@28.11.0(@typescript-eslint/eslint-plugin@8.26.1(@typescript-eslint/parser@8.26.1(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.6))(jest@29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0))(typescript@5.7.3):
eslint-plugin-jest@28.11.0(@typescript-eslint/eslint-plugin@8.26.1(@typescript-eslint/parser@8.26.1(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.6))(jest@29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0))(typescript@5.7.3):
dependencies:
'@typescript-eslint/utils': 8.14.0(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3)
eslint: 9.22.0(jiti@1.21.6)
optionalDependencies:
'@typescript-eslint/eslint-plugin': 8.26.1(@typescript-eslint/parser@8.26.1(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3))(eslint@9.22.0(jiti@1.21.6))(typescript@5.7.3)
jest: 29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0)
jest: 29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0)
transitivePeerDependencies:
- supports-color
- typescript
@@ -17843,7 +17803,7 @@ snapshots:
'@jest/expect': 29.7.0
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
'@types/node': 22.5.4
'@types/node': 22.15.30
chalk: 4.1.2
co: 4.6.0
dedent: 1.5.3(babel-plugin-macros@3.1.0)
@@ -17863,16 +17823,16 @@ snapshots:
- babel-plugin-macros
- supports-color
jest-cli@29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0):
jest-cli@29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0):
dependencies:
'@jest/core': 29.7.0(babel-plugin-macros@3.1.0)
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
chalk: 4.1.2
create-jest: 29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0)
create-jest: 29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0)
exit: 0.1.2
import-local: 3.2.0
jest-config: 29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0)
jest-config: 29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0)
jest-util: 29.7.0
jest-validate: 29.7.0
yargs: 17.7.2
@@ -17882,7 +17842,7 @@ snapshots:
- supports-color
- ts-node
jest-config@29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0):
jest-config@29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0):
dependencies:
'@babel/core': 7.27.3
'@jest/test-sequencer': 29.7.0
@@ -17907,7 +17867,7 @@ snapshots:
slash: 3.0.0
strip-json-comments: 3.1.1
optionalDependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
transitivePeerDependencies:
- babel-plugin-macros
- supports-color
@@ -17936,7 +17896,7 @@ snapshots:
'@jest/environment': 29.7.0
'@jest/fake-timers': 29.7.0
'@jest/types': 29.6.3
'@types/node': 22.5.4
'@types/node': 22.15.30
jest-mock: 29.7.0
jest-util: 29.7.0
@@ -17946,7 +17906,7 @@ snapshots:
dependencies:
'@jest/types': 29.6.3
'@types/graceful-fs': 4.1.9
'@types/node': 22.5.4
'@types/node': 22.15.30
anymatch: 3.1.3
fb-watchman: 2.0.2
graceful-fs: 4.2.11
@@ -17985,7 +17945,7 @@ snapshots:
jest-mock@29.7.0:
dependencies:
'@jest/types': 29.6.3
'@types/node': 22.5.4
'@types/node': 22.15.30
jest-util: 29.7.0
jest-pnp-resolver@1.2.3(jest-resolve@29.7.0):
@@ -18020,7 +17980,7 @@ snapshots:
'@jest/test-result': 29.7.0
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
'@types/node': 22.5.4
'@types/node': 22.15.30
chalk: 4.1.2
emittery: 0.13.1
graceful-fs: 4.2.11
@@ -18048,7 +18008,7 @@ snapshots:
'@jest/test-result': 29.7.0
'@jest/transform': 29.7.0
'@jest/types': 29.6.3
'@types/node': 22.5.4
'@types/node': 22.15.30
chalk: 4.1.2
cjs-module-lexer: 1.4.1
collect-v8-coverage: 1.0.2
@@ -18094,7 +18054,7 @@ snapshots:
jest-util@29.7.0:
dependencies:
'@jest/types': 29.6.3
'@types/node': 22.5.4
'@types/node': 22.15.30
chalk: 4.1.2
ci-info: 3.9.0
graceful-fs: 4.2.11
@@ -18113,7 +18073,7 @@ snapshots:
dependencies:
'@jest/test-result': 29.7.0
'@jest/types': 29.6.3
'@types/node': 22.5.4
'@types/node': 22.15.30
ansi-escapes: 4.3.2
chalk: 4.1.2
emittery: 0.13.1
@@ -18122,23 +18082,23 @@ snapshots:
jest-worker@27.5.1:
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
merge-stream: 2.0.0
supports-color: 8.1.1
jest-worker@29.7.0:
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
jest-util: 29.7.0
merge-stream: 2.0.0
supports-color: 8.1.1
jest@29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0):
jest@29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0):
dependencies:
'@jest/core': 29.7.0(babel-plugin-macros@3.1.0)
'@jest/types': 29.6.3
import-local: 3.2.0
jest-cli: 29.7.0(@types/node@22.5.4)(babel-plugin-macros@3.1.0)
jest-cli: 29.7.0(@types/node@22.15.30)(babel-plugin-macros@3.1.0)
transitivePeerDependencies:
- '@types/node'
- babel-plugin-macros
@@ -18852,7 +18812,7 @@ snapshots:
- '@babel/core'
- babel-plugin-macros
next@15.3.2(@babel/core@7.27.3)(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4):
next@15.3.2(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4):
dependencies:
'@next/env': 15.3.2
'@swc/counter': 0.1.3
@@ -20210,7 +20170,7 @@ snapshots:
stripe@10.17.0:
dependencies:
'@types/node': 22.5.4
'@types/node': 22.15.30
qs: 6.13.0
strnum@1.0.5: {}
@@ -20330,18 +20290,6 @@ snapshots:
ansi-escapes: 4.3.2
supports-hyperlinks: 2.3.0
terser-webpack-plugin@5.3.10(@swc/core@1.11.29)(esbuild@0.19.12)(webpack@5.96.1(@swc/core@1.11.29)(esbuild@0.19.12)):
dependencies:
'@jridgewell/trace-mapping': 0.3.25
jest-worker: 27.5.1
schema-utils: 3.3.0
serialize-javascript: 6.0.2
terser: 5.36.0
webpack: 5.96.1(@swc/core@1.11.29)(esbuild@0.19.12)
optionalDependencies:
'@swc/core': 1.11.29
esbuild: 0.19.12
terser-webpack-plugin@5.3.10(@swc/core@1.11.29)(webpack@5.96.1(@swc/core@1.11.29)):
dependencies:
'@jridgewell/trace-mapping': 0.3.25
@@ -20557,7 +20505,7 @@ snapshots:
buffer: 5.7.1
through: 2.3.8
undici-types@6.19.8: {}
undici-types@6.21.0: {}
undici@5.28.4:
dependencies:
@@ -20633,7 +20581,7 @@ snapshots:
'@uploadthing/shared': 7.1.1
effect: 3.10.3
optionalDependencies:
next: 15.3.2(@babel/core@7.27.3)(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4)
next: 15.3.2(@opentelemetry/api@1.9.0)(@playwright/test@1.50.0)(babel-plugin-macros@3.1.0)(babel-plugin-react-compiler@19.1.0-rc.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(sass@1.77.4)
uri-js@4.4.1:
dependencies:
@@ -20764,36 +20712,6 @@ snapshots:
- esbuild
- uglify-js
webpack@5.96.1(@swc/core@1.11.29)(esbuild@0.19.12):
dependencies:
'@types/eslint-scope': 3.7.7
'@types/estree': 1.0.6
'@webassemblyjs/ast': 1.14.1
'@webassemblyjs/wasm-edit': 1.14.1
'@webassemblyjs/wasm-parser': 1.14.1
acorn: 8.14.0
browserslist: 4.25.0
chrome-trace-event: 1.0.4
enhanced-resolve: 5.17.1
es-module-lexer: 1.5.4
eslint-scope: 5.1.1
events: 3.3.0
glob-to-regexp: 0.4.1
graceful-fs: 4.2.11
json-parse-even-better-errors: 2.3.1
loader-runner: 4.3.0
mime-types: 2.1.35
neo-async: 2.6.2
schema-utils: 3.3.0
tapable: 2.2.1
terser-webpack-plugin: 5.3.10(@swc/core@1.11.29)(esbuild@0.19.12)(webpack@5.96.1(@swc/core@1.11.29)(esbuild@0.19.12))
watchpack: 2.4.2
webpack-sources: 3.2.3
transitivePeerDependencies:
- '@swc/core'
- esbuild
- uglify-js
whatwg-url@13.0.0:
dependencies:
tr46: 4.1.1

View File

@@ -16,13 +16,13 @@
"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"],
"lib": ["DOM", "DOM.Iterable", "ES2022"],
"types": ["node", "jest"],
"incremental": true,
"isolatedModules": true,
"plugins": [