chore: upgrade dependencies (#6660)

* chore: upgrade dependencies

* fix types
This commit is contained in:
Joshua Chen 2022-02-12 15:29:40 +08:00 committed by GitHub
parent 472840dbd8
commit 0c7e592d34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 1881 additions and 1535 deletions

View file

@ -4,13 +4,10 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable import/no-extraneous-dependencies */
import util from 'util';
import globCb from 'glob';
import fsCb from 'fs';
const glob = util.promisify(globCb);
const readFile = util.promisify(fsCb.readFile);
import {Globby} from '@docusaurus/utils';
import fs from 'fs-extra';
type PackageJsonFile = {
file: string;
@ -19,12 +16,12 @@ type PackageJsonFile = {
};
async function getPackagesJsonFiles(): Promise<PackageJsonFile[]> {
const files = await glob('packages/*/package.json');
const files = await Globby('packages/*/package.json');
return Promise.all(
files.map(async (file) => ({
file,
content: JSON.parse(await readFile(file, 'utf8')),
content: JSON.parse(await fs.readFile(file, 'utf8')),
})),
);
}