From ddc7b7b488b76f34de8847f2c28b14c6def32a62 Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Fri, 22 Jul 2022 00:18:26 +0800 Subject: [PATCH] chore --- Gulpfile.mjs | 2 +- lib/fs-readdir-recursive.d.ts | 7 ------- packages/babel-cli/package.json | 1 + scripts/generators/tsconfig.js | 1 - scripts/integration-tests/e2e-prettier.sh | 2 +- tsconfig.json | 3 --- yarn.lock | 8 ++++++++ 7 files changed, 11 insertions(+), 13 deletions(-) delete mode 100644 lib/fs-readdir-recursive.d.ts diff --git a/Gulpfile.mjs b/Gulpfile.mjs index 454967b9d829..598054002b71 100644 --- a/Gulpfile.mjs +++ b/Gulpfile.mjs @@ -493,7 +493,7 @@ const libBundles = [ })); const cjsBundles = [ - // This is used by Prettier, @babel/register and @babel/eslint-parser + // This is used by @babel/register and @babel/eslint-parser { src: "packages/babel-parser" }, ]; diff --git a/lib/fs-readdir-recursive.d.ts b/lib/fs-readdir-recursive.d.ts deleted file mode 100644 index f71f53c2d5d5..000000000000 --- a/lib/fs-readdir-recursive.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare module "fs-readdir-recursive" { - function read( - root: string, - filter?: (filename: string, index: number, dir: string) => boolean - ): string[]; - export = read; -} diff --git a/packages/babel-cli/package.json b/packages/babel-cli/package.json index bf860de27f51..c3366325db8d 100644 --- a/packages/babel-cli/package.json +++ b/packages/babel-cli/package.json @@ -42,6 +42,7 @@ "devDependencies": { "@babel/core": "workspace:^", "@babel/helper-fixtures": "workspace:^", + "@types/fs-readdir-recursive": "^1.1.0", "rimraf": "^3.0.0" }, "bin": { diff --git a/scripts/generators/tsconfig.js b/scripts/generators/tsconfig.js index 20324a450925..23f42124d812 100644 --- a/scripts/generators/tsconfig.js +++ b/scripts/generators/tsconfig.js @@ -130,7 +130,6 @@ fs.writeFileSync( ["./node_modules/to-fast-properties-BABEL_8_BREAKING-true"], ], ["slash", ["./node_modules/slash-BABEL_8_BREAKING-true"]], - ["fs-readdir-recursive", ["./lib/fs-readdir-recursive.d.ts"]], ["kexec", ["./lib/kexec.d.ts"]], ]), }, diff --git a/scripts/integration-tests/e2e-prettier.sh b/scripts/integration-tests/e2e-prettier.sh index 6d90b1fd86ab..d98031b163a5 100755 --- a/scripts/integration-tests/e2e-prettier.sh +++ b/scripts/integration-tests/e2e-prettier.sh @@ -40,6 +40,6 @@ yarn install # Only run js,jsx,misc format tests # Without --runInBand CircleCI hangs. -yarn test "tests/format/(jsx?|misc)/" --update-snapshot --runInBand +yarn test "tests/format/(jsx?|misc|typescript|flow|flow-repo)/" --update-snapshot cleanup diff --git a/tsconfig.json b/tsconfig.json index 90ad03b5a02e..c3a39642c5e5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -726,9 +726,6 @@ "slash": [ "./node_modules/slash-BABEL_8_BREAKING-true" ], - "fs-readdir-recursive": [ - "./lib/fs-readdir-recursive.d.ts" - ], "kexec": [ "./lib/kexec.d.ts" ] diff --git a/yarn.lock b/yarn.lock index 715da6f14bdd..8f122cc0b266 100644 --- a/yarn.lock +++ b/yarn.lock @@ -205,6 +205,7 @@ __metadata: "@babel/helper-fixtures": "workspace:^" "@jridgewell/trace-mapping": ^0.3.8 "@nicolo-ribaudo/chokidar-2": "condition:BABEL_8_BREAKING ? : 2.1.8-no-fsevents.3" + "@types/fs-readdir-recursive": ^1.1.0 chokidar: ^3.4.0 commander: ^4.0.1 convert-source-map: ^1.1.0 @@ -4398,6 +4399,13 @@ __metadata: languageName: node linkType: hard +"@types/fs-readdir-recursive@npm:^1.1.0": + version: 1.1.0 + resolution: "@types/fs-readdir-recursive@npm:1.1.0" + checksum: 9ce802ca81259fccf85e217b149e8ce05dae5f665c5bc2292280e9873d2d84f2c37fb5033ae0ca024f3c71b502fb71d5517bf4af030155523882c0c1bfc39f59 + languageName: node + linkType: hard + "@types/gensync@npm:^1.0.0": version: 1.0.0 resolution: "@types/gensync@npm:1.0.0"