perf(v2): smaller bundlesize by embedding metadata to content (#2088)

* wip embed metadata to content

* embed metadata in blog as well

* refactor

* update test

* yarn lock

* avoid overwriting file everytime we run new nodejs process

* nits
This commit is contained in:
Endi 2019-12-06 12:34:21 +07:00 committed by GitHub
parent 32c9d07b90
commit 7f8aca2ddc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 236 additions and 200 deletions

View file

@ -10,7 +10,7 @@ import globby from 'globby';
import path from 'path';
import {Feed} from 'feed';
import {PluginOptions, BlogPost, DateLink} from './types';
import {parse, normalizeUrl} from '@docusaurus/utils';
import {parse, normalizeUrl, aliasedSitePath} from '@docusaurus/utils';
import {LoadContext} from '@docusaurus/types';
export function truncate(fileString: string, truncateMarker: RegExp | string) {
@ -100,10 +100,8 @@ export async function generateBlogPosts(
await Promise.all(
blogFiles.map(async (relativeSource: string) => {
// Cannot use path.join() as it resolves '../' and removes the '@site'.
// Let webpack loader resolve it.
const source = path.join(blogDir, relativeSource);
const aliasedSource = `@site/${path.relative(siteDir, source)}`;
const aliasedSource = aliasedSitePath(source, siteDir);
const blogFileName = path.basename(relativeSource);
const fileString = await fs.readFile(source, 'utf-8');

View file

@ -14,7 +14,7 @@ import {
PluginOptions,
BlogTags,
BlogContent,
BlogItemsToModules,
BlogItemsToMetadata,
TagsModule,
BlogPaginated,
FeedType,
@ -215,7 +215,7 @@ export default function pluginContentBlog(
} = options;
const aliasedSource = (source: string) =>
`@docusaurus-plugin-content-blog/${path.relative(dataDir, source)}`;
`~blog/${path.relative(dataDir, source)}`;
const {addRoute, createData} = actions;
const {
blogPosts,
@ -224,41 +224,31 @@ export default function pluginContentBlog(
blogTagsListPath,
} = blogContents;
const blogItemsToModules: BlogItemsToModules = {};
const blogItemsToMetadata: BlogItemsToMetadata = {};
// Create routes for blog entries.
const blogItems = await Promise.all(
await Promise.all(
blogPosts.map(async blogPost => {
const {id, metadata} = blogPost;
const {permalink} = metadata;
const metadataPath = await createData(
`${docuHash(permalink)}.json`,
await createData(
// Note that this created data path must be in sync with markdownLoader.ts metadataPath
`${docuHash(metadata.source)}.json`,
JSON.stringify(metadata, null, 2),
);
const temp = {
metadata,
metadataPath,
};
blogItemsToModules[id] = temp;
return temp;
addRoute({
path: metadata.permalink,
component: blogPostComponent,
exact: true,
modules: {
content: metadata.source,
},
});
blogItemsToMetadata[id] = metadata;
}),
);
blogItems.map(blogItem => {
const {metadata, metadataPath} = blogItem;
const {source, permalink} = metadata;
addRoute({
path: permalink,
component: blogPostComponent,
exact: true,
modules: {
content: source,
metadata: aliasedSource(metadataPath),
},
});
});
// Create routes for blog's paginated list entries.
await Promise.all(
blogListPaginated.map(async listPage => {
@ -275,20 +265,16 @@ export default function pluginContentBlog(
exact: true,
modules: {
items: items.map(postID => {
const {
metadata: postMetadata,
metadataPath,
} = blogItemsToModules[postID];
const metadata = blogItemsToMetadata[postID];
// To tell routes.js this is an import and not a nested object to recurse.
return {
content: {
__import: true,
path: postMetadata.source,
path: metadata.source,
query: {
truncated: true,
},
},
metadata: aliasedSource(metadataPath),
};
}),
metadata: aliasedSource(pageMetadataPath),
@ -327,19 +313,15 @@ export default function pluginContentBlog(
exact: true,
modules: {
items: items.map(postID => {
const {
metadata: postMetadata,
metadataPath,
} = blogItemsToModules[postID];
const metadata = blogItemsToMetadata[postID];
return {
content: {
__import: true,
path: postMetadata.source,
path: metadata.source,
query: {
truncated: true,
},
},
metadata: aliasedSource(metadataPath),
};
}),
metadata: aliasedSource(tagsMetadataPath),
@ -375,7 +357,7 @@ export default function pluginContentBlog(
return {
resolve: {
alias: {
'@docusaurus-plugin-content-blog': dataDir,
'~blog': dataDir,
},
},
module: {
@ -396,6 +378,8 @@ export default function pluginContentBlog(
{
loader: path.resolve(__dirname, './markdownLoader.js'),
options: {
dataDir,
siteDir: context.siteDir,
truncateMarker,
},
},

View file

@ -8,11 +8,14 @@
const {parseQuery, getOptions} = require('loader-utils');
import {loader} from 'webpack';
import {truncate} from './blogUtils';
import path from 'path';
import {readFile} from 'fs-extra';
import {aliasedSitePath, docuHash} from '@docusaurus/utils';
export = function(fileString: string) {
const callback = this.async();
const {truncateMarker}: {truncateMarker: RegExp | string} = getOptions(this);
const {truncateMarker, siteDir, dataDir} = getOptions(this);
let finalContent = fileString;
@ -21,5 +24,19 @@ export = function(fileString: string) {
if (truncated) {
finalContent = truncate(fileString, truncateMarker);
}
return callback && callback(null, finalContent);
// Read metadata & then embed it to this markdown content
// Note that metadataPath must be the same/ in-sync as the path from createData
const aliasedSource = aliasedSitePath(this.resourcePath, siteDir);
const metadataPath = path.join(dataDir, `${docuHash(aliasedSource)}.json`);
// Add metadataPath as dependency of this loader result so that we can recompile if metadata is changed
this.addDependency(metadataPath);
readFile(metadataPath, 'utf8', function(err, metadata) {
if (err) return callback && callback(err);
const metadataStr = `export const metadata = ${metadata};`;
callback && callback(null, finalContent + '\n' + metadataStr);
});
} as loader.Loader;

View file

@ -91,13 +91,8 @@ export interface Tag {
permalink: string;
}
export interface BlogItemsToModules {
[key: string]: MetaDataWithPath;
}
export interface MetaDataWithPath {
metadata: MetaData;
metadataPath: string;
export interface BlogItemsToMetadata {
[key: string]: MetaData;
}
export interface TagsModule {

View file

@ -55,7 +55,7 @@ Array [
Object {
"component": "@theme/DocPage",
"modules": Object {
"docsMetadata": "@docusaurus-plugin-content-docs/docs-route-ff2.json",
"docsMetadata": "~docs/docs-route-ff2.json",
},
"path": "/docs/:route",
"priority": undefined,
@ -65,7 +65,6 @@ Array [
"exact": true,
"modules": Object {
"content": "@site/docs/foo/bar.md",
"metadata": "@docusaurus-plugin-content-docs/docs-foo-bar-cef.json",
},
"path": "/docs/foo/bar",
},
@ -74,7 +73,6 @@ Array [
"exact": true,
"modules": Object {
"content": "@site/docs/foo/baz.md",
"metadata": "@docusaurus-plugin-content-docs/docs-foo-baz-dd9.json",
},
"path": "/docs/foo/baz",
},
@ -83,7 +81,6 @@ Array [
"exact": true,
"modules": Object {
"content": "@site/docs/hello.md",
"metadata": "@docusaurus-plugin-content-docs/docs-hello-da2.json",
},
"path": "/docs/hello",
},
@ -92,7 +89,6 @@ Array [
"exact": true,
"modules": Object {
"content": "@site/docs/lorem.md",
"metadata": "@docusaurus-plugin-content-docs/docs-lorem-17b.json",
},
"path": "/docs/lorem",
},
@ -106,7 +102,7 @@ Array [
Object {
"component": "@theme/DocPage",
"modules": Object {
"docsMetadata": "@docusaurus-plugin-content-docs/docs-1-0-0-route-660.json",
"docsMetadata": "~docs/docs-1-0-0-route-660.json",
},
"path": "/docs/1.0.0/:route",
"priority": undefined,
@ -116,7 +112,6 @@ Array [
"exact": true,
"modules": Object {
"content": "@site/versioned_docs/version-1.0.0/foo/bar.md",
"metadata": "@docusaurus-plugin-content-docs/docs-1-0-0-foo-bar-568.json",
},
"path": "/docs/1.0.0/foo/bar",
},
@ -125,7 +120,6 @@ Array [
"exact": true,
"modules": Object {
"content": "@site/versioned_docs/version-1.0.0/foo/baz.md",
"metadata": "@docusaurus-plugin-content-docs/docs-1-0-0-foo-baz-5e1.json",
},
"path": "/docs/1.0.0/foo/baz",
},
@ -134,7 +128,6 @@ Array [
"exact": true,
"modules": Object {
"content": "@site/versioned_docs/version-1.0.0/hello.md",
"metadata": "@docusaurus-plugin-content-docs/docs-1-0-0-hello-1d0.json",
},
"path": "/docs/1.0.0/hello",
},
@ -143,7 +136,7 @@ Array [
Object {
"component": "@theme/DocPage",
"modules": Object {
"docsMetadata": "@docusaurus-plugin-content-docs/docs-next-route-1c8.json",
"docsMetadata": "~docs/docs-next-route-1c8.json",
},
"path": "/docs/next/:route",
"priority": undefined,
@ -153,7 +146,6 @@ Array [
"exact": true,
"modules": Object {
"content": "@site/docs/foo/bar.md",
"metadata": "@docusaurus-plugin-content-docs/docs-next-foo-bar-09c.json",
},
"path": "/docs/next/foo/bar",
},
@ -162,7 +154,6 @@ Array [
"exact": true,
"modules": Object {
"content": "@site/docs/hello.md",
"metadata": "@docusaurus-plugin-content-docs/docs-next-hello-64c.json",
},
"path": "/docs/next/hello",
},
@ -171,7 +162,7 @@ Array [
Object {
"component": "@theme/DocPage",
"modules": Object {
"docsMetadata": "@docusaurus-plugin-content-docs/docs-route-ff2.json",
"docsMetadata": "~docs/docs-route-ff2.json",
},
"path": "/docs/:route",
"priority": -1,
@ -181,7 +172,6 @@ Array [
"exact": true,
"modules": Object {
"content": "@site/versioned_docs/version-1.0.1/foo/bar.md",
"metadata": "@docusaurus-plugin-content-docs/docs-foo-bar-cef.json",
},
"path": "/docs/foo/bar",
},
@ -190,7 +180,6 @@ Array [
"exact": true,
"modules": Object {
"content": "@site/versioned_docs/version-1.0.1/hello.md",
"metadata": "@docusaurus-plugin-content-docs/docs-hello-da2.json",
},
"path": "/docs/hello",
},

View file

@ -277,15 +277,16 @@ export default function pluginContentDocs(
const {docLayoutComponent, docItemComponent, routeBasePath} = options;
const {addRoute, createData} = actions;
const aliasedSource = (source: string) =>
`@docusaurus-plugin-content-docs/${path.relative(dataDir, source)}`;
`~docs/${path.relative(dataDir, source)}`;
const genRoutes = async (
metadataItems: Metadata[],
): Promise<RouteConfig[]> => {
const routes = await Promise.all(
metadataItems.map(async metadataItem => {
const metadataPath = await createData(
`${docuHash(metadataItem.permalink)}.json`,
await createData(
// Note that this created data path must be in sync with markdown/index.ts metadataPath
`${docuHash(metadataItem.source)}.json`,
JSON.stringify(metadataItem, null, 2),
);
return {
@ -294,7 +295,6 @@ export default function pluginContentDocs(
exact: true,
modules: {
content: metadataItem.source,
metadata: aliasedSource(metadataPath),
},
};
}),
@ -388,7 +388,7 @@ export default function pluginContentDocs(
return {
resolve: {
alias: {
'@docusaurus-plugin-content-docs': dataDir,
'~docs': dataDir,
},
},
module: {
@ -410,6 +410,7 @@ export default function pluginContentDocs(
loader: path.resolve(__dirname, './markdown/index.js'),
options: {
siteDir,
dataDir,
docsDir,
sourceToPermalink: sourceToPermalink,
versionedDir,

View file

@ -5,25 +5,45 @@
* LICENSE file in the root directory of this source tree.
*/
import path from 'path';
import {readFile} from 'fs-extra';
import {getOptions} from 'loader-utils';
import {loader} from 'webpack';
import linkify from './linkify';
import {docuHash, aliasedSitePath} from '@docusaurus/utils';
export = function(fileString: string) {
const callback = this.async();
const {docsDir, siteDir, versionedDir, sourceToPermalink} = getOptions(this);
return (
callback &&
callback(
null,
linkify(
fileString,
this.resourcePath,
docsDir,
siteDir,
sourceToPermalink,
versionedDir,
),
)
const {
dataDir,
docsDir,
siteDir,
versionedDir,
sourceToPermalink,
} = getOptions(this);
// Replace all markdown linking to correct url
const linkifiedStr = linkify(
fileString,
this.resourcePath,
docsDir,
siteDir,
sourceToPermalink,
versionedDir,
);
// Read metadata & then embed it to this markdown content
// Note that metadataPath must be the same/ in-sync as the path from createData
const aliasedSource = aliasedSitePath(this.resourcePath, siteDir);
const metadataPath = path.join(dataDir, `${docuHash(aliasedSource)}.json`);
// Add metadataPath as dependency of this loader result so that we can recompile if metadata is changed
this.addDependency(metadataPath);
readFile(metadataPath, 'utf8', function(err, metadata) {
if (err) return callback && callback(err);
const metadataStr = `export const metadata = ${metadata}`;
callback && callback(null, linkifiedStr + '\n' + metadataStr);
});
} as loader.Loader;

View file

@ -7,7 +7,12 @@
import fs from 'fs-extra';
import path from 'path';
import {parse, normalizeUrl, posixPath} from '@docusaurus/utils';
import {
parse,
aliasedSitePath,
normalizeUrl,
posixPath,
} from '@docusaurus/utils';
import {LoadContext} from '@docusaurus/types';
import lastUpdate from './lastUpdate';
@ -84,9 +89,6 @@ export default async function processMetadata({
const relativePath = path.relative(siteDir, filePath);
// Cannot use path.join() as it resolves '../' and removes the '@site'. Let webpack loader resolve it.
const aliasedPath = `@site/${relativePath}`;
const docsEditUrl = editUrl
? normalizeUrl([editUrl, posixPath(relativePath)])
: undefined;
@ -130,7 +132,7 @@ export default async function processMetadata({
id,
title,
description,
source: aliasedPath,
source: aliasedSitePath(filePath, siteDir),
permalink,
editUrl: custom_edit_url || docsEditUrl,
version,

View file

@ -8,7 +8,7 @@
import globby from 'globby';
import fs from 'fs';
import path from 'path';
import {encodePath, fileToPath} from '@docusaurus/utils';
import {encodePath, fileToPath, aliasedSitePath} from '@docusaurus/utils';
import {LoadContext, Plugin} from '@docusaurus/types';
import {PluginOptions, LoadedContent} from './types';
@ -51,8 +51,7 @@ export default function pluginContentPages(
return pagesFiles.map(relativeSource => {
const source = path.join(pagesDir, relativeSource);
// Cannot use path.join() as it resolves '../' and removes the '@site'. Let webpack loader resolve it.
const aliasedSource = `@site/${path.relative(siteDir, source)}`;
const aliasedSource = aliasedSitePath(source, siteDir);
const pathName = encodePath(fileToPath(relativeSource));
// Default Language.
return {

View file

@ -19,17 +19,15 @@ function BlogListPage(props) {
<div className="container margin-vert--xl">
<div className="row">
<div className="col col--8 col--offset-2">
{items.map(
({content: BlogPostContent, metadata: blogPostMetadata}) => (
<BlogPostItem
key={blogPostMetadata.permalink}
frontMatter={BlogPostContent.frontMatter}
metadata={blogPostMetadata}
truncated>
<BlogPostContent />
</BlogPostItem>
),
)}
{items.map(({content: BlogPostContent}) => (
<BlogPostItem
key={BlogPostContent.metadata.permalink}
frontMatter={BlogPostContent.frontMatter}
metadata={BlogPostContent.metadata}
truncated>
<BlogPostContent />
</BlogPostItem>
))}
<BlogListPaginator metadata={metadata} />
</div>
</div>

View file

@ -12,8 +12,8 @@ import BlogPostItem from '@theme/BlogPostItem';
import BlogPostPaginator from '@theme/BlogPostPaginator';
function BlogPostPage(props) {
const {content: BlogPostContents, metadata} = props;
const {frontMatter} = BlogPostContents;
const {content: BlogPostContents} = props;
const {frontMatter, metadata} = BlogPostContents;
return (
<Layout title={metadata.title} description={metadata.description}>
{BlogPostContents && (

View file

@ -27,17 +27,15 @@ function BlogTagsPostPage(props) {
</h1>
<Link href={allTagsPath}>View All Tags</Link>
<div className="margin-vert--xl">
{items.map(
({content: BlogPostContent, metadata: blogPostMetadata}) => (
<BlogPostItem
key={blogPostMetadata.permalink}
frontMatter={BlogPostContent.frontMatter}
metadata={blogPostMetadata}
truncated>
<BlogPostContent />
</BlogPostItem>
),
)}
{items.map(({content: BlogPostContent}) => (
<BlogPostItem
key={BlogPostContent.metadata.permalink}
frontMatter={BlogPostContent.frontMatter}
metadata={BlogPostContent.metadata}
truncated>
<BlogPostContent />
</BlogPostItem>
))}
</div>
</div>
</div>

View file

@ -52,7 +52,8 @@ function Headings({headings, isChild}) {
function DocItem(props) {
const {siteConfig = {}} = useDocusaurusContext();
const {url: siteUrl} = siteConfig;
const {metadata, content: DocContent} = props;
const {content: DocContent} = props;
const {metadata} = DocContent;
const {
description,
title,
@ -106,7 +107,7 @@ function DocItem(props) {
)}
{!hideTitle && (
<header>
<h1 className={styles.docTitle}>{metadata.title}</h1>
<h1 className={styles.docTitle}>{title}</h1>
</header>
)}

View file

@ -16,9 +16,22 @@ import {
normalizeUrl,
posixPath,
objectWithKeySorted,
aliasedSitePath,
} from '../index';
describe('load utils', () => {
test('aliasedSitePath', () => {
const asserts = {
'user/website/docs/asd.md': '@site/docs/asd.md',
'user/website/versioned_docs/foo/bar.md':
'@site/versioned_docs/foo/bar.md',
'user/docs/test.md': '@site/../docs/test.md',
};
Object.keys(asserts).forEach(file => {
expect(aliasedSitePath(file, 'user/website')).toBe(asserts[file]);
});
});
test('posixPath', () => {
const asserts = {
'c:/aaaa\\bbbb': 'c:/aaaa/bbbb',

View file

@ -252,3 +252,13 @@ export function normalizeUrl(rawUrls: string[]): string {
return str;
}
/**
* Alias filepath relative to site directory, very useful so that we don't expose user's site structure.
* Example: some/path/to/website/docs/foo.md -> @site/docs/foo.md
*/
export function aliasedSitePath(filePath: string, siteDir: string) {
const relativePath = path.relative(siteDir, filePath);
// Cannot use path.join() as it resolves '../' and removes the '@site'. Let webpack loader resolve it.
return `@site/${relativePath}`;
}

167
yarn.lock
View file

@ -820,6 +820,14 @@
pirates "^4.0.0"
source-map-support "^0.5.16"
"@babel/runtime-corejs3@^7.7.4":
version "7.7.4"
resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.7.4.tgz#f861adc1cecb9903dfd66ea97917f02ff8d79888"
integrity sha512-BBIEhzk8McXDcB3IbOi8zQPzzINUp4zcLesVlBSOcyGhzPUU8Xezk5GAG7Sy5GVhGmAO0zGd2qRSeY2g4Obqxw==
dependencies:
core-js-pure "^3.0.0"
regenerator-runtime "^0.13.2"
"@babel/runtime@^7.1.2", "@babel/runtime@^7.4.0", "@babel/runtime@^7.4.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.4":
version "7.7.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.7.4.tgz#b23a856751e4bf099262f867767889c0e3fe175b"
@ -2135,9 +2143,9 @@
"@types/node" "*"
"@types/cheerio@^0.22.8":
version "0.22.14"
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.14.tgz#d150889891e7db892c6a0b16bd5583cc70b3fc44"
integrity sha512-SVtcP2fvPYrebTwpyqxjxb7K5v3ZOAdH409yAEWFPpZThCSGa1K2IFfx6Rg6ttvThCBQXP4fU9WF94sqLoiQGg==
version "0.22.15"
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.15.tgz#69040ffa92c309beeeeb7e92db66ac3f80700c0b"
integrity sha512-UGiiVtJK5niCqMKYmLEFz1Wl/3L5zF/u78lu8CwoUywWXRr9LDimeYuOzXVLXBMO758fcTdFtgjvqlztMH90MA==
dependencies:
"@types/node" "*"
@ -2365,9 +2373,9 @@
"@types/webpack-dev-server" "*"
"@types/react@^16.9.13":
version "16.9.13"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.13.tgz#b3ea5dd443f4a680599e2abba8cc66f5e1ce0059"
integrity sha512-LikzRslbiufJYHyzbHSW0GrAiff8QYLMBFeZmSxzCYGXKxi8m/1PHX+rsVOwhr7mJNq+VIu2Dhf7U6mjFERK6w==
version "16.9.15"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.15.tgz#aeabb7a50f96c9e31a16079ada20ede9ed602977"
integrity sha512-WsmM1b6xQn1tG3X2Hx4F3bZwc2E82pJXt5OPs2YJgg71IzvUoKOSSSYOvLXYCg1ttipM+UuA4Lj3sfvqjVxyZw==
dependencies:
"@types/prop-types" "*"
csstype "^2.2.0"
@ -3196,11 +3204,12 @@ aws4@^1.8.0:
integrity sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A==
axobject-query@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.0.2.tgz#ea187abe5b9002b377f925d8bf7d1c561adf38f9"
integrity sha512-MCeek8ZH7hKyO1rWUbKNQBbl4l2eY0ntk7OGi+q0RlafrCnfPxC06WZA+uebCfmYp4mNU9jRBP1AhGyf8+W3ww==
version "2.1.1"
resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.1.1.tgz#2a3b1271ec722d48a4cd4b3fcc20c853326a49a7"
integrity sha512-lF98xa/yvy6j3fBHAgQXIYl+J4eZadOSqsPojemUqClzNbBV38wWGpUbQbVEyf4eUF5yF7eHmGgGA2JiHyjeqw==
dependencies:
ast-types-flow "0.0.7"
"@babel/runtime" "^7.7.4"
"@babel/runtime-corejs3" "^7.7.4"
babel-code-frame@^6.22.0:
version "6.26.0"
@ -3610,14 +3619,14 @@ browserslist@4.7.0:
electron-to-chromium "^1.3.247"
node-releases "^1.1.29"
browserslist@^4.0.0, browserslist@^4.6.0, browserslist@^4.6.4, browserslist@^4.7.3, browserslist@^4.8.0:
version "4.8.0"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.0.tgz#6f06b0f974a7cc3a84babc2ccc56493668e3c789"
integrity sha512-HYnxc/oLRWvJ3TsGegR0SRL/UDnknGq2s/a8dYYEO+kOQ9m9apKoS5oiathLKZdh/e9uE+/J3j92qPlGD/vTqA==
browserslist@^4.0.0, browserslist@^4.6.0, browserslist@^4.6.4, browserslist@^4.8.0:
version "4.8.2"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.8.2.tgz#b45720ad5fbc8713b7253c20766f701c9a694289"
integrity sha512-+M4oeaTplPm/f1pXDw84YohEv7B1i/2Aisei8s4s6k3QsoSHa7i5sz8u/cGQkkatCPxMASKxPualR4wwYgVboA==
dependencies:
caniuse-lite "^1.0.30001012"
electron-to-chromium "^1.3.317"
node-releases "^1.1.41"
caniuse-lite "^1.0.30001015"
electron-to-chromium "^1.3.322"
node-releases "^1.1.42"
bser@^2.0.0:
version "2.1.1"
@ -3912,10 +3921,10 @@ caniuse-api@^3.0.0:
lodash.memoize "^4.1.2"
lodash.uniq "^4.5.0"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001012:
version "1.0.30001012"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001012.tgz#653ec635e815b9e0fb801890923b0c2079eb34ec"
integrity sha512-7RR4Uh04t9K1uYRWzOJmzplgEOAXbfK72oVNokCdMzA67trrhPzy93ahKk1AWHiA0c58tD2P+NHqxrA8FZ+Trg==
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30000989, caniuse-lite@^1.0.30001012, caniuse-lite@^1.0.30001015:
version "1.0.30001015"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001015.tgz#15a7ddf66aba786a71d99626bc8f2b91c6f0f5f0"
integrity sha512-/xL2AbW/XWHNu1gnIrO8UitBGoFthcsDgU9VLK1/dpsoxbaD5LscHozKze05R6WLsBvLhqv78dAPozMFQBYLbQ==
capture-exit@^2.0.0:
version "2.0.0"
@ -4613,13 +4622,18 @@ copy-webpack-plugin@^5.0.5:
webpack-log "^2.0.0"
core-js-compat@^3.1.1:
version "3.4.5"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.4.5.tgz#f072059c0b98ad490eacac082296cfe241af1b58"
integrity sha512-rYVvzvKJDKoefdAC+q6VP63vp5hMmeVONCi9pVUbU1qRrtVrmAk/nPhnRg+i+XFd775m1hpG2Yd5RY3X45ccuw==
version "3.4.7"
resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.4.7.tgz#39f8080b1d92a524d6d90505c42b9c5c1eb90611"
integrity sha512-57+mgz/P/xsGdjwQYkwtBZR3LuISaxD1dEwVDtbk8xJMqAmwqaxLOvnNT7kdJ7jYE/NjNptyzXi+IQFMi/2fCw==
dependencies:
browserslist "^4.7.3"
browserslist "^4.8.0"
semver "^6.3.0"
core-js-pure@^3.0.0:
version "3.4.7"
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.4.7.tgz#c998e1892da9949200c7452cbd33c0df95be9f54"
integrity sha512-Am3uRS8WCdTFA3lP7LtKR0PxgqYzjAMGKXaZKSNSC/8sqU0Wfq8R/YzoRs2rqtOVEunfgH+0q3O0BKOg0AvjPw==
core-js@^1.0.0:
version "1.2.7"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
@ -4631,9 +4645,9 @@ core-js@^2.4.1, core-js@^2.6.5:
integrity sha512-I39t74+4t+zau64EN1fE5v2W31Adtc/REhzWN+gWRRXg6WH5qAsZm62DHpQ1+Yhe4047T55jvzz7MUqF/dBBlA==
core-js@^3.4.1:
version "3.4.5"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.4.5.tgz#3dda65611d95699b5eb7742ea451ea052d37aa65"
integrity sha512-OuvejWH6vIaUo59Ndlh89purNm4DCIy/v3QoYlcGnn+PkYI8BhNHfCuAESrWX+ZPfq9JccVJ+XXgOMy77PJexg==
version "3.4.7"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.4.7.tgz#57c35937da80fe494fbc3adcf9cf3dc00eb86b34"
integrity sha512-qaPVGw30J1wQ0GR3GvoPqlGf9GZfKKF4kFC7kiHlcsPTqH3txrs9crCp3ZiMAXuSenhz89Jnl4GZs/67S5VOSg==
core-util-is@1.0.2, core-util-is@~1.0.0:
version "1.0.2"
@ -4773,22 +4787,22 @@ css-has-pseudo@^0.10.0:
postcss-selector-parser "^5.0.0-rc.4"
css-loader@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.2.0.tgz#bb570d89c194f763627fcf1f80059c6832d009b2"
integrity sha512-QTF3Ud5H7DaZotgdcJjGMvyDj5F3Pn1j/sC6VBEOVp94cbwqyIBdcs/quzj4MC1BKQSrTpQznegH/5giYbhnCQ==
version "3.2.1"
resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-3.2.1.tgz#62849b45a414b7bde0bfba17325a026471040eae"
integrity sha512-q40kYdcBNzMvkIImCL2O+wk8dh+RGwPPV9Dfz3n7XtOYPXqe2Z6VgtvoxjkLHz02gmhepG9sOAJOUlx+3hHsBg==
dependencies:
camelcase "^5.3.1"
cssesc "^3.0.0"
icss-utils "^4.1.1"
loader-utils "^1.2.3"
normalize-path "^3.0.0"
postcss "^7.0.17"
postcss "^7.0.23"
postcss-modules-extract-imports "^2.0.0"
postcss-modules-local-by-default "^3.0.2"
postcss-modules-scope "^2.1.0"
postcss-modules-scope "^2.1.1"
postcss-modules-values "^3.0.0"
postcss-value-parser "^4.0.0"
schema-utils "^2.0.0"
postcss-value-parser "^4.0.2"
schema-utils "^2.6.0"
css-prefers-color-scheme@^3.1.1:
version "3.1.1"
@ -5580,10 +5594,10 @@ ejs@^3.0.1:
resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.0.1.tgz#30c8f6ee9948502cc32e85c37a3f8b39b5a614a5"
integrity sha512-cuIMtJwxvzumSAkqaaoGY/L6Fc/t6YvoP9/VIaK0V/CyqKLEQ8sqODmYfy/cjXEdZ9+OOL8TecbJu+1RsofGDw==
electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.317:
version "1.3.318"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.318.tgz#267ce297062fe25c229698827f3229b0ac11c0cf"
integrity sha512-1RHv5OZGuVKvWYMVR6g1QVQVrsJRaujry04R/6t/7JVs68Ra4V8ewv63fiwcq0uiT302lyTocc1rbNcRuj/HLA==
electron-to-chromium@^1.3.247, electron-to-chromium@^1.3.322:
version "1.3.322"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.322.tgz#a6f7e1c79025c2b05838e8e344f6e89eb83213a8"
integrity sha512-Tc8JQEfGQ1MzfSzI/bTlSr7btJv/FFO7Yh6tanqVmIWOuNCu6/D1MilIEgLtmWqIrsv+o4IjpLAhgMBr/ncNAA==
elegant-spinner@^1.0.1:
version "1.0.1"
@ -5763,9 +5777,9 @@ error@^7.0.0:
string-template "~0.2.1"
es-abstract@^1.12.0, es-abstract@^1.13.0, es-abstract@^1.15.0, es-abstract@^1.5.1, es-abstract@^1.7.0:
version "1.16.2"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.16.2.tgz#4e874331645e9925edef141e74fc4bd144669d34"
integrity sha512-jYo/J8XU2emLXl3OLwfwtuFfuF2w6DYPs+xy9ZfVyPkDcrauu6LYrw/q2TyCtrbc/KUdCiC5e9UajRhgNkVopA==
version "1.16.3"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.16.3.tgz#52490d978f96ff9f89ec15b5cf244304a5bca161"
integrity sha512-WtY7Fx5LiOnSYgF5eg/1T+GONaGmpvpPdCpSnYij+U2gDTL0UPfWrhDw7b2IYb+9NQJsYpCA0wOQvZfsd6YwRw==
dependencies:
es-to-primitive "^1.2.1"
function-bind "^1.1.1"
@ -6340,9 +6354,9 @@ fast-glob@^2.0.2, fast-glob@^2.2.6:
micromatch "^3.1.10"
fast-glob@^3.0.3:
version "3.1.0"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.0.tgz#77375a7e3e6f6fc9b18f061cddd28b8d1eec75ae"
integrity sha512-TrUz3THiq2Vy3bjfQUB2wNyPdGBeGmdjbzzBLhfHN4YFurYptCKwGq/TfiRavbGywFRzY6U2CdmQ1zmsY5yYaw==
version "3.1.1"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.1.tgz#87ee30e9e9f3eb40d6f254a7997655da753d7c82"
integrity sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g==
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
@ -10512,10 +10526,10 @@ node-pre-gyp@^0.12.0:
semver "^5.3.0"
tar "^4"
node-releases@^1.1.29, node-releases@^1.1.41:
version "1.1.41"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.41.tgz#57674a82a37f812d18e3b26118aefaf53a00afed"
integrity sha512-+IctMa7wIs8Cfsa8iYzeaLTFwv5Y4r5jZud+4AnfymzeEXKBCavFX0KBgzVaPVqf0ywa6PrO8/b+bPqdwjGBSg==
node-releases@^1.1.29, node-releases@^1.1.42:
version "1.1.42"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.42.tgz#a999f6a62f8746981f6da90627a8d2fc090bbad7"
integrity sha512-OQ/ESmUqGawI2PRX+XIRao44qWYBBfN54ImQYdWVTQqUckuejOg76ysSqDBK8NG3zwySRVnX36JwDQ6x+9GxzA==
dependencies:
semver "^6.3.0"
@ -11864,7 +11878,7 @@ postcss-modules-local-by-default@^3.0.2:
postcss-selector-parser "^6.0.2"
postcss-value-parser "^4.0.0"
postcss-modules-scope@^2.1.0:
postcss-modules-scope@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-2.1.1.tgz#33d4fc946602eb5e9355c4165d68a10727689dba"
integrity sha512-OXRUPecnHCg8b9xWvldG/jUpRIGPNRka0r4D4j0ESUU2/5IOnpsjfPPmDprM3Ih8CgZ8FXjWqaniK5v4rWt3oQ==
@ -12231,12 +12245,7 @@ pretty-time@^1.1.0:
resolved "https://registry.yarnpkg.com/pretty-time/-/pretty-time-1.1.0.tgz#ffb7429afabb8535c346a34e41873adf3d74dd0e"
integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA==
prism-react-renderer@^0.1.0:
version "0.1.7"
resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-0.1.7.tgz#dc273d0cb6e4a498ba0775094e9a8b01a3ad2eaa"
integrity sha512-EhnM0sYfLK103ASK0ViSv0rta//ZGB0dBA9TiFyOvA+zOj5peLmGEG01sLEDwl9sMe+gSqncInafBe1VFTCMvA==
prism-react-renderer@^1.0.2:
prism-react-renderer@^1.0.1, prism-react-renderer@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/prism-react-renderer/-/prism-react-renderer-1.0.2.tgz#3bb9a6a42f76fc049b03266298c7068fdd4b7ea9"
integrity sha512-0++pJyRfu4v2OxI/Us/5RLui9ESDkTiLkVCtKuPZYdpB8UQWJpnJQhPrWab053XtsKW3oM0sD69uJ6N9exm1Ag==
@ -12601,9 +12610,9 @@ react-dom@^16.8.4:
scheduler "^0.18.0"
react-error-overlay@^6.0.3:
version "6.0.3"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.3.tgz#c378c4b0a21e88b2e159a3e62b2f531fd63bf60d"
integrity sha512-bOUvMWFQVk5oz8Ded9Xb7WVdEi3QGLC8tH7HmYP0Fdp4Bn3qw0tRFmr5TW6mvahzvmrK4a6bqWGfCevBflP+Xw==
version "6.0.4"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.4.tgz#0d165d6d27488e660bc08e57bdabaad741366f7a"
integrity sha512-ueZzLmHltszTshDMwyfELDq8zOA803wQ1ZuzCccXa1m57k1PxSHfflPD5W9YIiTXLs0JTLzoj6o1LuM5N6zzNA==
react-fast-compare@^2.0.2:
version "2.0.4"
@ -12626,18 +12635,18 @@ react-is@^16.10.2, react-is@^16.6.0, react-is@^16.6.3, react-is@^16.7.0, react-i
integrity sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q==
react-live@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/react-live/-/react-live-2.2.1.tgz#32a7732ba28bc1e252da28c312a47e27711bd98b"
integrity sha512-J97Fk0it6DFgEneGX2DbxugVy3++nb1fGUy3TcehQZcvfRI6ssnbrXyDE94xCUT0zJMC48tX1wT6GEaK+lDYsA==
version "2.2.2"
resolved "https://registry.yarnpkg.com/react-live/-/react-live-2.2.2.tgz#834edf1c11204e49fa7468166316b2e70da1a6b0"
integrity sha512-kJYAzKnPsR4oXleAX9lLsJA330BhTmSWHhr3ienZA2E/0eFDRodGl3I7sge8pp1vjc2K5Aaz73KpFUnV7Lq/DQ==
dependencies:
buble "0.19.6"
core-js "^2.4.1"
create-react-context "0.2.2"
dom-iterator "^1.0.0"
prism-react-renderer "^0.1.0"
prism-react-renderer "^1.0.1"
prop-types "^15.5.8"
react-simple-code-editor "^0.10.0"
unescape "^0.2.0"
unescape "^1.0.1"
react-loadable-ssr-addon@^0.2.0:
version "0.2.0"
@ -13472,7 +13481,7 @@ schema-utils@^1.0.0:
ajv-errors "^1.0.0"
ajv-keywords "^3.1.0"
schema-utils@^2.0.0, schema-utils@^2.0.1, schema-utils@^2.5.0:
schema-utils@^2.0.0, schema-utils@^2.0.1, schema-utils@^2.5.0, schema-utils@^2.6.0:
version "2.6.1"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-2.6.1.tgz#eb78f0b945c7bcfa2082b3565e8db3548011dc4f"
integrity sha512-0WXHDs1VDJyo+Zqs9TKLKyD/h7yDpHUhEFsM2CzkICFdoX1av+GBq/J2xRTFfsQO5kBfhZzANf2VcIm84jqDbg==
@ -13569,9 +13578,9 @@ serialize-javascript@^1.7.0:
integrity sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==
serialize-javascript@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.0.tgz#9310276819efd0eb128258bb341957f6eb2fc570"
integrity sha512-a/mxFfU00QT88umAJQsNWOnUKckhNCqOl028N48e7wFmo2/EHpTo9Wso+iJJCMrQnmFvcjto5RJdAHEvVhcyUQ==
version "2.1.1"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-2.1.1.tgz#952907a04a3e3a75af7f73d92d15e233862048b2"
integrity sha512-MPLPRpD4FNqWq9tTIjYG5LesFouDhdyH0EPY3gVK4DRD5+g4aDqdNSzLIwceulo3Yj+PL1bPh6laE5+H6LTcrQ==
serve-index@^1.9.1:
version "1.9.1"
@ -14545,9 +14554,9 @@ terser-webpack-plugin@^2.2.1:
webpack-sources "^1.4.3"
terser@^4.1.2, terser@^4.3.9:
version "4.4.0"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.4.0.tgz#22c46b4817cf4c9565434bfe6ad47336af259ac3"
integrity sha512-oDG16n2WKm27JO8h4y/w3iqBGAOSCtq7k8dRmrn4Wf9NouL0b2WpMHGChFGZq4nFAQy1FsNJrVQHfurXOSTmOA==
version "4.4.2"
resolved "https://registry.yarnpkg.com/terser/-/terser-4.4.2.tgz#448fffad0245f4c8a277ce89788b458bfd7706e8"
integrity sha512-Uufrsvhj9O1ikwgITGsZ5EZS6qPokUOkCegS7fYOdGTv+OA90vndUbU6PEjr5ePqHfNUbGyMO7xyIZv2MhsALQ==
dependencies:
commander "^2.20.0"
source-map "~0.6.1"
@ -14896,9 +14905,9 @@ typedarray@^0.0.6:
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
typescript@^3.7.2:
version "3.7.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.2.tgz#27e489b95fa5909445e9fef5ee48d81697ad18fb"
integrity sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ==
version "3.7.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.3.tgz#b36840668a16458a7025b9eabfad11b66ab85c69"
integrity sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==
ua-parser-js@^0.7.18:
version "0.7.20"
@ -14931,10 +14940,12 @@ unbzip2-stream@^1.0.9:
buffer "^5.2.1"
through "^2.3.8"
unescape@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/unescape/-/unescape-0.2.0.tgz#b78b9b60c86f1629df181bf53eee3bc8d6367ddf"
integrity sha1-t4ubYMhvFinfGBv1Pu47yNY2fd8=
unescape@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/unescape/-/unescape-1.0.1.tgz#956e430f61cad8a4d57d82c518f5e6cc5d0dda96"
integrity sha512-O0+af1Gs50lyH1nUu3ZyYS1cRh01Q/kUKatTOkSs7jukXE6/NebucDVxyiDsA9AQ4JC1V1jUH9EO8JX2nMDgGQ==
dependencies:
extend-shallow "^2.0.1"
unherit@^1.0.4:
version "1.1.2"