Skip to content

Commit 431373e

Browse files
Copilotstipsan
andcommitted
fix: replace object spread with Object.assign in map calls
Co-authored-by: stipsan <[email protected]>
1 parent c4f838c commit 431373e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/@sanity/pkg-utils/src/node/resolveBuildTasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function resolveBuildTasks(ctx: BuildContext): BuildTask[] {
1414
const tasks: BuildTask[] = []
1515

1616
const exports = Object.entries(ctx.exports || {}).map(
17-
([_path, exp]) => ({_path, ...exp}) as PkgExport & {_path: string},
17+
([_path, exp]) => Object.assign({_path}, exp) as PkgExport & {_path: string},
1818
)
1919

2020
const dtsTask: DtsTask = {

packages/@sanity/pkg-utils/src/node/resolveWatchTasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export function resolveWatchTasks(ctx: BuildContext): WatchTask[] {
1111
const tasks: WatchTask[] = []
1212

1313
const exports = Object.entries(ctx.exports || {}).map(
14-
([_path, exp]) => ({_path, ...exp}) as PkgExport & {_path: string},
14+
([_path, exp]) => Object.assign({_path}, exp) as PkgExport & {_path: string},
1515
)
1616

1717
const dtsTask: DtsWatchTask = {

0 commit comments

Comments
 (0)