From 5d3e6bac97669762c1e44a3cdead447176fa97dc Mon Sep 17 00:00:00 2001 From: Allo Date: Sat, 11 Nov 2023 09:07:02 +0800 Subject: [PATCH] chore(deps): replace "fs-extra" with "fs/promise" As all the file system methods we used in this repo are available in "fs/promise", it would be ok to replace "fs-extra" and remove the dependency. --- package.json | 1 - scripts/check-document-locale.js | 2 +- scripts/check-url-locale.js | 2 +- scripts/get-sourceCommit.js | 3 +-- yarn.lock | 28 ---------------------------- 5 files changed, 3 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index 6ed955e993d1f3..ea720057540139 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "cld": "^2.9.1", "fdir": "^6.1.1", "front-matter": "^4.0.2", - "fs-extra": "^11.1.1", "husky": "8.0.3", "lint-staged": "15.0.2", "markdown-it": "^13.0.2", diff --git a/scripts/check-document-locale.js b/scripts/check-document-locale.js index c541974b62dce6..1fa1134e903ff2 100644 --- a/scripts/check-document-locale.js +++ b/scripts/check-document-locale.js @@ -6,7 +6,7 @@ // // Written by Queen Vinyl Da.i'gyu-Kazotetsu (@queengooborg, https://www.queengoob.org) -import fs from "fs-extra"; +import fs from "node:fs/promises"; import cld from "cld"; import { fdir } from "fdir"; import MarkdownIt from "markdown-it"; diff --git a/scripts/check-url-locale.js b/scripts/check-url-locale.js index 7fbc3b80174183..956afd5fa9469d 100644 --- a/scripts/check-url-locale.js +++ b/scripts/check-url-locale.js @@ -9,7 +9,7 @@ "use strict"; -import fs from "fs-extra"; +import fs from "node:fs/promises"; import * as path from "node:path"; import { fdir } from "fdir"; import ora from "ora"; diff --git a/scripts/get-sourceCommit.js b/scripts/get-sourceCommit.js index 2c77968cbdf9a5..ed5e1c688eaf4f 100644 --- a/scripts/get-sourceCommit.js +++ b/scripts/get-sourceCommit.js @@ -6,8 +6,7 @@ // // Written by Queen Vinyl Da.i'gyu-Kazotetsu (@queengooborg, https://www.queengoob.org) -import fs from "fs-extra"; -import cld from "cld"; +import fs from "node:fs/promises"; import { fdir } from "fdir"; import fm from "front-matter"; import ora from "ora"; diff --git a/yarn.lock b/yarn.lock index f1be003b77bcc2..7e49dd1913ed20 100644 --- a/yarn.lock +++ b/yarn.lock @@ -339,15 +339,6 @@ front-matter@^4.0.2: dependencies: js-yaml "^3.13.1" -fs-extra@^11.1.1: - version "11.1.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" - integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" @@ -393,11 +384,6 @@ globby@13.2.2: merge2 "^1.4.1" slash "^4.0.0" -graceful-fs@^4.1.6, graceful-fs@^4.2.0: - version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" - integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== - human-signals@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-5.0.0.tgz#42665a284f9ae0dade3ba41ebc37eb4b852f3a28" @@ -486,15 +472,6 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - lilconfig@2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.1.0.tgz#78e23ac89ebb7e1bfbf25b18043de756548e7f52" @@ -1184,11 +1161,6 @@ unist-util-visit@^5.0.0: unist-util-is "^6.0.0" unist-util-visit-parents "^6.0.0" -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"