Skip to content

Commit fbc28b0

Browse files
authored
perf: upgrade ajv, and upgrade typescript to 5.6.2 in monorepo (#8204)
Ajv 8.14.0 => 8.17.1 - Bundle size: 119.6kB => 111kB - Dependencies: 5 => 4 - Gets rid of dependency on `punycode`. Will help with the annoying deprecated module console warning spam This also upgrades TypeScript to 5.6.2 in our monorepo. The most type-relevant packages are updated as well, e.g. ts-essentials and @types/node
1 parent ec624bd commit fbc28b0

File tree

27 files changed

+1756
-1698
lines changed

27 files changed

+1756
-1698
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
"@types/fs-extra": "^11.0.2",
117117
"@types/jest": "29.5.12",
118118
"@types/minimist": "1.2.5",
119-
"@types/node": "20.12.5",
119+
"@types/node": "22.5.4",
120120
"@types/prompts": "^2.4.5",
121121
"@types/react": "npm:types-react@19.0.0-rc.0",
122122
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0",
@@ -159,9 +159,9 @@
159159
"sort-package-json": "^2.10.0",
160160
"swc-plugin-transform-remove-imports": "1.15.0",
161161
"tempy": "1.0.1",
162-
"tsx": "4.17.0",
162+
"tsx": "4.19.1",
163163
"turbo": "^2.1.1",
164-
"typescript": "5.5.4"
164+
"typescript": "5.6.2"
165165
},
166166
"peerDependencies": {
167167
"react": "^19.0.0 || ^19.0.0-rc-06d0b89e-20240801",

packages/create-payload-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@
6868
"@types/esprima": "^4.0.6",
6969
"@types/fs-extra": "^9.0.12",
7070
"@types/jest": "29.5.12",
71-
"@types/node": "20.12.5"
71+
"@types/node": "22.5.4"
7272
}
7373
}

packages/eslint-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"eslint-plugin-react-hooks": "5.1.0-rc-a19a8ab4-20240829",
3434
"eslint-plugin-regexp": "2.6.0",
3535
"globals": "15.9.0",
36-
"typescript": "5.5.4",
36+
"typescript": "5.6.2",
3737
"typescript-eslint": "8.3.0"
3838
}
3939
}

packages/eslint-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"eslint-plugin-react-hooks": "5.1.0-rc-a19a8ab4-20240829",
3333
"eslint-plugin-regexp": "2.6.0",
3434
"globals": "15.9.0",
35-
"typescript": "5.5.4",
35+
"typescript": "5.6.2",
3636
"typescript-eslint": "8.3.0"
3737
}
3838
}

packages/graphql/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
"dependencies": {
4646
"graphql-scalars": "1.22.2",
4747
"pluralize": "8.0.0",
48-
"ts-essentials": "7.0.3",
49-
"tsx": "4.17.0"
48+
"ts-essentials": "10.0.2",
49+
"tsx": "4.19.1"
5050
},
5151
"devDependencies": {
5252
"@payloadcms/eslint-config": "workspace:*",

packages/payload/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"@next/env": "^15.0.0-canary.104",
8989
"@payloadcms/translations": "workspace:*",
9090
"@types/busboy": "1.5.4",
91-
"ajv": "8.14.0",
91+
"ajv": "8.17.1",
9292
"bson-objectid": "2.0.4",
9393
"ci-info": "^4.0.0",
9494
"console-table-printer": "2.11.2",
@@ -107,8 +107,8 @@
107107
"pluralize": "8.0.0",
108108
"sanitize-filename": "1.6.3",
109109
"scmp": "2.1.0",
110-
"ts-essentials": "7.0.3",
111-
"tsx": "4.17.0",
110+
"ts-essentials": "10.0.2",
111+
"tsx": "4.19.1",
112112
"uuid": "10.0.0"
113113
},
114114
"devDependencies": {

packages/payload/src/fields/hooks/afterChange/promise.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const promise = async ({
132132
req,
133133
schemaPath: fieldSchemaPath,
134134
siblingData: siblingData?.[field.name]?.[i] || {},
135-
siblingDoc: ({ ...(row as JsonObject) } as JsonObject) || {},
135+
siblingDoc: row ? { ...row } : {},
136136
}),
137137
)
138138
})
@@ -167,7 +167,7 @@ export const promise = async ({
167167
req,
168168
schemaPath: fieldSchemaPath,
169169
siblingData: siblingData?.[field.name]?.[i] || {},
170-
siblingDoc: ({ ...(row as JsonObject) } as JsonObject) || {},
170+
siblingDoc: row ? { ...row } : {},
171171
}),
172172
)
173173
}

packages/payload/src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { I18n, TFunction } from '@payloadcms/translations'
22
import type DataLoader from 'dataloader'
3+
import type { URL } from 'url'
34

45
import type { TypeWithID, TypeWithTimestamps } from '../collections/config/types.js'
56
import type payload from '../index.js'

packages/plugin-sentry/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@payloadcms/eslint-config": "workspace:*",
4949
"@types/express": "^4.17.9",
5050
"@types/jest": "29.5.12",
51-
"@types/node": "20.12.5",
51+
"@types/node": "22.5.4",
5252
"@types/react": "npm:types-react@19.0.0-rc.0",
5353
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0",
5454
"copyfiles": "^2.4.1",

packages/richtext-lexical/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"@payloadcms/eslint-config": "workspace:*",
8282
"@types/escape-html": "1.0.4",
8383
"@types/json-schema": "7.0.15",
84-
"@types/node": "20.12.5",
84+
"@types/node": "22.5.4",
8585
"@types/react": "npm:types-react@19.0.0-rc.0",
8686
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0",
8787
"babel-plugin-react-compiler": "0.0.0-experimental-48eb8f4-20240822",

0 commit comments

Comments
 (0)