From 801c52dde1ede3e5b7549d61f1f68c042117c23f Mon Sep 17 00:00:00 2001 From: Rafa Mel Date: Tue, 9 Jul 2024 19:12:10 +0200 Subject: [PATCH] feat: edit callback param file changed to location edit task callback has more descriptive location param instead of file BREAKING CHANGE: edit task callback params have changed: file has been replaced by location. --- src/tasks/filesystem/edit.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tasks/filesystem/edit.ts b/src/tasks/filesystem/edit.ts index e3021cc..6f51626 100644 --- a/src/tasks/filesystem/edit.ts +++ b/src/tasks/filesystem/edit.ts @@ -18,8 +18,8 @@ export interface EditOptions { } export interface EditParams { - file: string; buffer: Buffer; + location: string; } /** @@ -53,7 +53,7 @@ export function edit( await useSource(source, ctx, { strict: opts.strict }, async () => { const buffer = await fs.readFile(source); - const content = await callback({ buffer, file: source }); + const content = await callback({ buffer, location: source }); if (isCancelled(ctx)) return;