Skip to content

Commit

Permalink
fix(deps): bump @sanity/pkg-utils to v6.10.7 (#7277)
Browse files Browse the repository at this point in the history
  • Loading branch information
stipsan authored Jul 30, 2024
1 parent 6fc602c commit 56d9e16
Show file tree
Hide file tree
Showing 19 changed files with 386 additions and 372 deletions.
2 changes: 1 addition & 1 deletion dev/embedded-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"typescript": "5.5.3",
"typescript": "5.5.4",
"vite": "^4.5.3"
}
}
2 changes: 1 addition & 1 deletion dev/test-next-studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"sanity": "workspace:*",
"sanity-test-studio": "workspace:*",
"styled-components": "^6.1.11",
"typescript": "5.5.3"
"typescript": "5.5.4"
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"@sanity/client": "^6.21.1",
"@sanity/eslint-config-i18n": "1.0.0",
"@sanity/eslint-config-studio": "^4.0.0",
"@sanity/pkg-utils": "6.9.3",
"@sanity/pkg-utils": "6.10.7",
"@sanity/prettier-config": "^1.0.2",
"@sanity/test": "0.0.1-alpha.1",
"@sanity/tsdoc": "1.0.83",
Expand Down Expand Up @@ -165,7 +165,7 @@
"sanity": "workspace:*",
"semver": "^7.3.5",
"turbo": "^2.0.7",
"typescript": "5.4.5",
"typescript": "5.5.4",
"vite": "^4.5.3",
"vite-tsconfig-paths": "^4.3.2",
"yargs": "^17.3.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/@sanity/block-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@
"watch": "pkg-utils watch"
},
"dependencies": {
"@sanity/types": "3.52.3",
"@types/react": "^18.3.3",
"get-random-values-esm": "1.0.2",
"lodash": "^4.17.21"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@repo/package.config": "workspace:*",
"@sanity/schema": "3.52.3",
"@sanity/types": "3.52.3",
"@types/jsdom": "^20.0.0",
"@types/lodash": "^4.17.7",
"@types/react": "^18.3.3",
"@vercel/stega": "0.1.2",
"jsdom": "^23.0.1"
},
Expand Down
10 changes: 10 additions & 0 deletions packages/@sanity/cli/package.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ export default defineConfig({
],
},

extract: {
...baseConfig.extract,
// By default pkg-utils will add deps in devDependencies that are not in peerDependencies to the list over bundledPackages
// but we don't want certain deps like `ora` to be a peer dep, or attempt bundling its typings, so we exclude it here
bundledPackages: (prev) => {
const denyList = new Set(['ora', '@types/inquirer', 'vite'])
return prev.filter((pkg) => !denyList.has(pkg))
},
},

bundles: [
{
source: './src/cli.ts',
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/mutator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
},
"dependencies": {
"@sanity/diff-match-patch": "^3.1.1",
"@sanity/types": "3.52.3",
"@sanity/uuid": "^3.0.1",
"debug": "^4.3.4",
"lodash": "^4.17.21"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@repo/package.config": "workspace:*",
"@sanity/types": "3.52.3",
"@types/debug": "^4.1.5",
"@types/lodash": "^4.17.7",
"rimraf": "^3.0.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
},
"dependencies": {
"@sanity/client": "^6.21.1",
"@types/react": "^18.0.25"
"@types/react": "^18.3.3"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/@sanity/types/src/schema/definition/type/array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import {
} from '../schemaDefinition'
import {type BaseSchemaDefinition, type SearchConfiguration, type TitledListValue} from './common'

export type {InsertMenuOptions}

/** @public */
export interface ArrayOptions<V = unknown> extends SearchConfiguration {
list?: TitledListValue<V>[] | V[]
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/types/test/date.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe('date types', () => {
validation: (Rule) => [
Rule.required()
.required()
.custom((value) => (value?.indexOf('2021-01-01') ?? -1 >= 0 ? 'Error' : true))
.custom((value) => ((value?.indexOf('2021-01-01') ?? -1 >= 0) ? 'Error' : true))
.warning(),
// @ts-expect-error greaterThan does not exist on dateRule
Rule.greaterThan(5).error(),
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/types/test/datetime.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('datetime types', () => {
.min('2021-01-01')
.max('2021-01-01')
.required()
.custom((value) => (value?.indexOf('2021-01-01') ?? -1 >= 0 ? 'Error' : true))
.custom((value) => ((value?.indexOf('2021-01-01') ?? -1 >= 0) ? 'Error' : true))
.warning(),
// @ts-expect-error greaterThan does not exist on DatetimeRule
Rule.greaterThan(5).error(),
Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/types/test/image.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe('image types', () => {
validation: (Rule) => [
Rule.required()
.required()
.custom((value) => (value?.hotspot?.height ?? 0 > 2 ? 'Error' : true))
.custom((value) => ((value?.hotspot?.height ?? 0 > 2) ? 'Error' : true))
.warning(),
// @ts-expect-error greaterThan does not exist on imageRule
Rule.greaterThan(5).error(),
Expand Down
2 changes: 1 addition & 1 deletion packages/sanity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@
"@repo/package.config": "workspace:*",
"@sanity/codegen": "3.52.3",
"@sanity/generate-help-url": "^3.0.0",
"@sanity/pkg-utils": "6.9.3",
"@sanity/pkg-utils": "6.10.7",
"@sanity/tsdoc": "1.0.83",
"@sanity/ui-workshop": "^1.2.11",
"@sentry/types": "^8.12.0",
Expand Down
1 change: 0 additions & 1 deletion packages/sanity/src/core/i18n/hooks/useTranslation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export function useTranslation<
options?: UseTranslationOptions<KPrefix>,
): UseTranslationResponse<FallbackNs<Ns>, KPrefix> {
const {t} = useOriginalTranslation(
// @ts-expect-error type check is failing after using `module: preserve` in tsconfig, which uses `moduleResolution: bundler` internally
ns,
options
? {keyPrefix: options.keyPrefix, lng: options.lng, ...translationOptionOverrides}
Expand Down
2 changes: 1 addition & 1 deletion packages/sanity/src/core/studio/StudioThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function getThemeValues(theme: StudioTheme): RootTheme {
return {
...defaultTheme,
v2: theme.v2,
fonts: isThemerTheme(theme) ? defaultTheme.fonts : theme.fonts ?? defaultTheme.fonts,
fonts: isThemerTheme(theme) ? defaultTheme.fonts : (theme.fonts ?? defaultTheme.fonts),
color: theme.color ?? defaultTheme.color,
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const TasksActivityCreatedAt = memo(
<Flex align="center" paddingTop={1}>
<Text size={1} muted>
<strong style={{fontWeight: 600}}>
{loading ? <UserSkeleton /> : user?.displayName ?? t('panel.activity.unknown-user')}{' '}
{loading ? <UserSkeleton /> : (user?.displayName ?? t('panel.activity.unknown-user'))}{' '}
</strong>
{t('panel.activity.created-fragment')}{' '}
<Tooltip content={formattedDate} placement="top-end">
Expand Down
4 changes: 2 additions & 2 deletions packages/sanity/src/core/validation/Rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ export const Rule: RuleClass = class Rule implements IRule {
a?: string | {name?: string; invert?: boolean},
b?: {name?: string; invert?: boolean},
): Rule {
const name = typeof a === 'string' ? a : a?.name ?? b?.name
const invert = typeof a === 'string' ? false : a?.invert ?? b?.invert
const name = typeof a === 'string' ? a : (a?.name ?? b?.name)
const invert = typeof a === 'string' ? false : (a?.invert ?? b?.invert)

const constraint: RuleSpecConstraint<'regex'> = {
pattern,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function DocumentHeaderTabs() {
key={view.id}
label={view.title}
tabPanelId={tabPanelId}
viewId={index === 0 ? null : view.id ?? null}
viewId={index === 0 ? null : (view.id ?? null)}
/>
))}
</TabList>
Expand Down
2 changes: 1 addition & 1 deletion perf/tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
"@types/node": "^18.15.3",
"esbuild": "0.21.5",
"ts-node": "^10.9.2",
"typescript": "5.4.5"
"typescript": "5.5.4"
}
}
Loading

0 comments on commit 56d9e16

Please sign in to comment.