diff --git a/.changeset/little-impalas-look.md b/.changeset/little-impalas-look.md new file mode 100644 index 000000000..a845151cc --- /dev/null +++ b/.changeset/little-impalas-look.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/scripts/src/index.js b/scripts/src/index.js index facfdf105..79a203c9d 100755 --- a/scripts/src/index.js +++ b/scripts/src/index.js @@ -16,8 +16,7 @@ import { updateApiReadme } from "./commands/updateApiReadme.js"; */ function init(commands) { const parser = yargs(process.argv.slice(2)); - Object.keys(commands).forEach((name) => { - const { description, command } = commands[name]; + Object.entries(commands).forEach(([name, { description, command }]) => { parser.command(name, description, {}, async (args) => { try { await command(args, process.argv.slice(3)); diff --git a/scripts/src/process.js b/scripts/src/process.js index 45f483ca8..3b2d4290b 100644 --- a/scripts/src/process.js +++ b/scripts/src/process.js @@ -28,7 +28,7 @@ function workspaceRoot() { * @param {SpawnOptions=} options * @returns {Promise} */ -export function spawn(command, args, options) { +function spawn(command, args, options) { return new Promise((resolve, reject) => { /** @type {SpawnOptions} */ const opts = { @@ -70,14 +70,3 @@ export function runScript(command, ...args) { const yarn = os.platform() === "win32" ? "yarn.cmd" : "yarn"; return execute(yarn, command, ...args); } - -/** - * @param {...(() => Promise)} scripts - * @returns {Promise} - */ -export function sequence(...scripts) { - return scripts.reduce( - (result, script) => result.then(() => script()), - Promise.resolve() - ); -} diff --git a/scripts/src/require.js b/scripts/src/require.js deleted file mode 100644 index 139f5af5e..000000000 --- a/scripts/src/require.js +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-check -import { createRequire } from "node:module"; -export const require = createRequire(import.meta.url);