Skip to content

Commit 76a41c8

Browse files
feat: update zod to 3.25 and explicitly import zod/v3
1 parent 97f2666 commit 76a41c8

74 files changed

Lines changed: 374 additions & 263 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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@types/pluralize": "^0.0.33",
2727
"globby": "^10.0.2",
2828
"winston": "^3.17.0",
29-
"zod": "^3.24.4"
29+
"zod": "^3.25.71"
3030
},
3131
"dependencies": {
3232
"@dotcom-tool-kit/base": "^1.2.3",
@@ -58,5 +58,8 @@
5858
],
5959
"volta": {
6060
"extends": "../../package.json"
61+
},
62+
"peerDependencies": {
63+
"zod": "^3.25.75"
6164
}
6265
}

core/cli/src/messages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type {
77
OptionsForPlugin,
88
OptionsForTask
99
} from '@dotcom-tool-kit/plugin'
10-
import type { z } from 'zod'
10+
import type { z } from 'zod/v3'
1111
import { fromZodError } from 'zod-validation-error'
1212
import type { Conflict } from '@dotcom-tool-kit/conflict'
1313
import pluralize from 'pluralize'

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: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
"prompts": "^2.4.1",
3232
"simple-git": "^3.27.0",
3333
"tslib": "^2.8.1",
34-
"yaml": "^2.8.0",
35-
"zod": "^3.24.4"
34+
"yaml": "^2.8.0"
3635
},
3736
"repository": {
3837
"type": "git",
@@ -53,12 +52,16 @@
5352
"@types/pacote": "^11.1.3",
5453
"@types/prompts": "^2.4.9",
5554
"dotcom-tool-kit": "^4.4.3",
56-
"type-fest": "^4.41.0"
55+
"type-fest": "^4.41.0",
56+
"zod": "^3.25.71"
5757
},
5858
"volta": {
5959
"extends": "../../package.json"
6060
},
6161
"engines": {
6262
"node": "18.x || 20.x || 22.x"
63+
},
64+
"peerDependencies": {
65+
"zod": "^3.25.75"
6366
}
6467
}

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.71"
2525
},
2626
"peerDependencies": {
27-
"zod": "^3.24.4"
27+
"zod": "^3.25.75"
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)