Skip to content

Commit 6392087

Browse files
authored
chore(deps): remove unused direct rollup dependency (#251)
1 parent 9956fb5 commit 6392087

File tree

3 files changed

+12
-19
lines changed

3 files changed

+12
-19
lines changed

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
"picocolors": "^1.0.0",
4848
"playwright-chromium": "^1.39.0",
4949
"prettier": "^3.0.3",
50-
"rollup": "^3.29.4",
5150
"simple-git-hooks": "^2.9.0",
5251
"tsx": "^3.14.0",
5352
"typescript": "^5.2.2",

playground/vitestSetup.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import type {
88
Logger,
99
PluginOption,
1010
ResolvedConfig,
11+
Rollup,
1112
UserConfig,
1213
ViteDevServer,
1314
} from 'vite'
@@ -19,7 +20,6 @@ import {
1920
preview,
2021
} from 'vite'
2122
import type { Browser, Page } from 'playwright-chromium'
22-
import type { RollupError, RollupWatcher, RollupWatcherEvent } from 'rollup'
2323
import type { File } from 'vitest'
2424
import { beforeAll } from 'vitest'
2525

@@ -72,7 +72,7 @@ export let resolvedConfig: ResolvedConfig = undefined!
7272
export let page: Page = undefined!
7373
export let browser: Browser = undefined!
7474
export let viteTestUrl: string = ''
75-
export let watcher: RollupWatcher | undefined = undefined
75+
export let watcher: Rollup.RollupWatcher | undefined = undefined
7676

7777
declare module 'vite' {
7878
interface InlineConfig {
@@ -269,7 +269,7 @@ export async function startDefaultServe(): Promise<void> {
269269
const isWatch = !!resolvedConfig!.build.watch
270270
// in build watch,call startStaticServer after the build is complete
271271
if (isWatch) {
272-
watcher = rollupOutput as RollupWatcher
272+
watcher = rollupOutput as Rollup.RollupWatcher
273273
await notifyRebuildComplete(watcher)
274274
}
275275
// @ts-ignore
@@ -290,10 +290,10 @@ export async function startDefaultServe(): Promise<void> {
290290
* Send the rebuild complete message in build watch
291291
*/
292292
export async function notifyRebuildComplete(
293-
watcher: RollupWatcher,
294-
): Promise<RollupWatcher> {
293+
watcher: Rollup.RollupWatcher,
294+
): Promise<Rollup.RollupWatcher> {
295295
let resolveFn: undefined | (() => void)
296-
const callback = (event: RollupWatcherEvent): void => {
296+
const callback = (event: Rollup.RollupWatcherEvent): void => {
297297
if (event.code === 'END') {
298298
resolveFn?.()
299299
}
@@ -306,7 +306,7 @@ export async function notifyRebuildComplete(
306306
}
307307

308308
function createInMemoryLogger(logs: string[]): Logger {
309-
const loggedErrors = new WeakSet<Error | RollupError>()
309+
const loggedErrors = new WeakSet<Error | Rollup.RollupError>()
310310
const warnedMessages = new Set<string>()
311311

312312
const logger: Logger = {

pnpm-lock.yaml

Lines changed: 5 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)