Skip to content

Commit faff984

Browse files
committed
fix(hooks): move pkg to options
1 parent 41bad96 commit faff984

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/features/hooks.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import { createHooks as create, type Hookable } from 'hookable'
22
import type { ResolvedOptions } from '../options'
3-
import type { PackageJson } from 'pkg-types'
43
import type { BuildOptions } from 'rolldown'
54

65
export interface BuildContext {
76
options: ResolvedOptions
8-
pkg?: PackageJson
97
hooks: Hookable<TsdownHooks>
108
}
119

@@ -35,10 +33,7 @@ export interface TsdownHooks {
3533
'build:done': (ctx: BuildContext) => void | Promise<void>
3634
}
3735

38-
export async function createHooks(
39-
options: ResolvedOptions,
40-
pkg?: PackageJson,
41-
): Promise<{
36+
export async function createHooks(options: ResolvedOptions): Promise<{
4237
hooks: Hookable<TsdownHooks>
4338
context: BuildContext
4439
}> {
@@ -50,7 +45,6 @@ export async function createHooks(
5045
}
5146
const context: BuildContext = {
5247
options,
53-
pkg,
5448
hooks,
5549
}
5650
return { hooks, context }

0 commit comments

Comments
 (0)