mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-11 08:07:26 +02:00
chore: upgrade dependencies (#6660)
* chore: upgrade dependencies * fix types
This commit is contained in:
parent
472840dbd8
commit
0c7e592d34
30 changed files with 1881 additions and 1535 deletions
|
@ -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')),
|
||||
})),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue