Skip to content

Commit 2123df6

Browse files
feat: update zod to 3.25 and explicitly import zod/v3
1 parent 078b37c commit 2123df6

74 files changed

Lines changed: 134 additions & 141 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

core/cli/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
"@types/lodash": "^4.17.20",
2626
"@types/pluralize": "^0.0.33",
2727
"globby": "^10.0.2",
28-
"winston": "^3.17.0",
29-
"zod": "^3.24.4"
28+
"winston": "^3.17.0"
3029
},
3130
"dependencies": {
3231
"@dotcom-tool-kit/base": "^1.2.3",
@@ -46,7 +45,8 @@
4645
"pretty-format": "^29.7.0",
4746
"tslib": "^2.8.1",
4847
"yaml": "^2.8.0",
49-
"zod-validation-error": "^3.4.1"
48+
"zod": "^3.25.76",
49+
"zod-validation-error": "^3.5.2"
5050
},
5151
"engines": {
5252
"node": "18.x || 20.x || 22.x"

core/cli/src/messages.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import type {
77
OptionsForPlugin,
88
OptionsForTask
99
} from '@dotcom-tool-kit/plugin'
10-
import type { z } from 'zod'
11-
import { fromZodError } from 'zod-validation-error'
10+
import type { z } from 'zod/v3'
11+
import { fromZodError } from 'zod-validation-error/v3'
1212
import type { Conflict } from '@dotcom-tool-kit/conflict'
1313
import pluralize from 'pluralize'
1414
import { ToolKitError } from '@dotcom-tool-kit/error'

core/cli/src/plugin/entry-point.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { Base } from '@dotcom-tool-kit/base'
44
import type { EntryPoint } from '@dotcom-tool-kit/plugin'
55
import { Validated, invalid, valid } from '@dotcom-tool-kit/validated'
66
import { __importDefault } from 'tslib'
7-
import type * as z from 'zod'
7+
import type * as z from 'zod/v3'
88
import { indentReasons } from '../messages'
99

1010
function guessIsZodSchema(schema: unknown): schema is z.ZodSchema {

core/cli/src/plugin/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { type PluginOptions, PluginSchemas, legacyPluginOptions } from '@dotcom-
99
import { invalid, reduceValidated, valid, Validated } from '@dotcom-tool-kit/validated'
1010

1111
import type { Logger } from 'winston'
12-
import * as z from 'zod'
12+
import * as z from 'zod/v3'
1313
import { styles } from '@dotcom-tool-kit/logger'
1414

1515
import { toolKitIfDefinedIdent, toolKitOptionIdent } from '../rc-file'

core/cli/src/plugin/reduce-installations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { groupBy } from 'lodash'
22
import type { Logger } from 'winston'
3-
import * as z from 'zod'
3+
import * as z from 'zod/v3'
44

55
import type { HookClass, HookInstallation } from '@dotcom-tool-kit/base'
66
import type { ValidConfig } from '@dotcom-tool-kit/config'

core/create/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"simple-git": "^3.27.0",
3333
"tslib": "^2.8.1",
3434
"yaml": "^2.8.0",
35-
"zod": "^3.24.4"
35+
"zod": "^3.25.76"
3636
},
3737
"repository": {
3838
"type": "git",

core/create/src/prompts/oidc.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import path from 'path'
1313
import prompt from 'prompts'
1414
import { simpleGit } from 'simple-git'
1515
import YAML from 'yaml'
16-
import { z } from 'zod'
16+
import { z } from 'zod/v3'
1717

1818
// git mode indicating an object blob is a file
1919
const FILE_MODE = '100644' as const
@@ -254,7 +254,11 @@ export default async function oidcPrompt({ toolKitConfig }: OidcParams): Promise
254254
// store path using the same logic we used to use to infer the name
255255
// from Tool Kit vault plugin options. Pass in the options that were
256256
// selected during the options prompt.
257-
const dopplerProjectName = new DopplerEnvVars(winstonLogger, 'prod', toolKitConfig.options.plugins['@dotcom-tool-kit/doppler']).options.project
257+
const dopplerProjectName = new DopplerEnvVars(
258+
winstonLogger,
259+
'prod',
260+
toolKitConfig.options.plugins['@dotcom-tool-kit/doppler']
261+
).options.project
258262
const ssmAction = 'ssm:GetParameter'
259263
const ssmResource = `arn:aws:ssm:eu-west-1:\${AWS::AccountId}:parameter/${dopplerProjectName}/*`
260264
winstonLogger.info(

core/create/src/prompts/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import YAML from 'yaml'
77
import type Logger from 'komatsu'
88
import partition from 'lodash/partition'
99
import prompt from 'prompts'
10-
import { z } from 'zod'
10+
import { z } from 'zod/v3'
1111
import type { BizOpsSystem } from '../bizOps'
1212

1313
interface OptionSettings {

lib/base/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"@dotcom-tool-kit/plugin": "^1.1.0",
2222
"type-fest": "^4.41.0",
2323
"winston": "^3.17.0",
24-
"zod": "^3.24.4"
24+
"zod": "^3.25.76"
2525
},
2626
"peerDependencies": {
27-
"zod": "^3.24.4"
27+
"zod": "^3.25.76"
2828
}
2929
}

lib/base/src/hook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Logger } from 'winston'
22
import { Base } from './base'
33
import { hookSymbol, typeSymbol } from './symbols'
4-
import type { z } from 'zod'
4+
import type { z } from 'zod/v3'
55
import type { Plugin } from '@dotcom-tool-kit/plugin'
66
import { Conflict, isConflict } from '@dotcom-tool-kit/conflict'
77
import type { Default } from './type-utils'

0 commit comments

Comments
 (0)