From da521f6bcc7523d990ffb0ef61e364a7a22521ed Mon Sep 17 00:00:00 2001 From: Daniel Nalborczyk Date: Wed, 26 Jun 2024 22:19:01 -0400 Subject: [PATCH] Simplify imports --- acorn-loose/rollup.config.mjs | 4 ++-- acorn-walk/rollup.config.mjs | 4 ++-- acorn/rollup.config.mjs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/acorn-loose/rollup.config.mjs b/acorn-loose/rollup.config.mjs index d72ad54dc..bde47ddc1 100644 --- a/acorn-loose/rollup.config.mjs +++ b/acorn-loose/rollup.config.mjs @@ -1,8 +1,8 @@ +import {readFile, writeFile} from "node:fs/promises" import buble from "@rollup/plugin-buble" -import {promises as fs} from "node:fs" const copy = (from, to) => ({ - async writeBundle() { await fs.writeFile(to, await fs.readFile(from)) } + async writeBundle() { await writeFile(to, await readFile(from)) } }) export default { diff --git a/acorn-walk/rollup.config.mjs b/acorn-walk/rollup.config.mjs index 878bbbd32..8fb866641 100644 --- a/acorn-walk/rollup.config.mjs +++ b/acorn-walk/rollup.config.mjs @@ -1,8 +1,8 @@ +import {readFile, writeFile} from "node:fs/promises" import buble from "@rollup/plugin-buble" -import {promises as fs} from "node:fs" const copy = (from, to) => ({ - async writeBundle() { await fs.writeFile(to, await fs.readFile(from)) } + async writeBundle() { await writeFile(to, await readFile(from)) } }) export default { diff --git a/acorn/rollup.config.mjs b/acorn/rollup.config.mjs index 42402c4ad..4e4e9c960 100644 --- a/acorn/rollup.config.mjs +++ b/acorn/rollup.config.mjs @@ -1,8 +1,8 @@ +import {readFile, writeFile} from "node:fs/promises" import buble from "@rollup/plugin-buble" -import {promises as fs} from "node:fs" const copy = (from, to) => ({ - async writeBundle() { await fs.writeFile(to, await fs.readFile(from)) } + async writeBundle() { await writeFile(to, await readFile(from)) } }) export default [