Removed fs-extra dependency (#481)

* Removed `fs-extra` dependency

* use `fs/promises` consistently
This commit is contained in:
Mateusz Burzyński
2025-05-15 21:41:09 +02:00
committed by GitHub
parent 9f7e23e7ee
commit 0564b8428f
6 changed files with 23 additions and 28 deletions
+7 -7
View File
@@ -1,8 +1,8 @@
import { Changeset } from "@changesets/types";
import writeChangeset from "@changesets/write";
import fixturez from "fixturez";
import fs from "fs-extra";
import path from "path";
import fs from "node:fs/promises";
import path from "node:path";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { Git } from "./git";
import { setupOctokit } from "./octokit";
@@ -53,7 +53,7 @@ beforeEach(() => {
describe("version", () => {
it("creates simple PR", async () => {
let cwd = f.copy("simple-project");
linkNodeModules(cwd);
await linkNodeModules(cwd);
mockedGithubMethods.pulls.list.mockImplementationOnce(() => ({ data: [] }));
@@ -91,7 +91,7 @@ describe("version", () => {
it("only includes bumped packages in the PR body", async () => {
let cwd = f.copy("simple-project");
linkNodeModules(cwd);
await linkNodeModules(cwd);
mockedGithubMethods.pulls.list.mockImplementationOnce(() => ({ data: [] }));
@@ -125,7 +125,7 @@ describe("version", () => {
it("doesn't include ignored package that got a dependency update in the PR body", async () => {
let cwd = f.copy("ignored-package");
linkNodeModules(cwd);
await linkNodeModules(cwd);
mockedGithubMethods.pulls.list.mockImplementationOnce(() => ({ data: [] }));
@@ -159,7 +159,7 @@ describe("version", () => {
it("does not include changelog entries if full message exceeds size limit", async () => {
let cwd = f.copy("simple-project");
linkNodeModules(cwd);
await linkNodeModules(cwd);
mockedGithubMethods.pulls.list.mockImplementationOnce(() => ({ data: [] }));
@@ -217,7 +217,7 @@ fluminis divesque vulnere aquis parce lapsis rabie si visa fulmineis.
it("does not include any release information if a message with simplified release info exceeds size limit", async () => {
let cwd = f.copy("simple-project");
linkNodeModules(cwd);
await linkNodeModules(cwd);
mockedGithubMethods.pulls.list.mockImplementationOnce(() => ({ data: [] }));