From 693ea5a17b4a59b771e58c263da1876b5377322e Mon Sep 17 00:00:00 2001 From: eps1lon Date: Tue, 26 Jan 2021 17:27:12 +0100 Subject: [PATCH 1/6] [core] Fix `next` using stale pages --- docs/src/modules/utils/findPages.js | 7 - docs/src/pages.ts | 4 +- docs/src/pagesApi.js | 432 ++++++++++++++++++++++++++++ 3 files changed, 434 insertions(+), 9 deletions(-) delete mode 100644 docs/src/modules/utils/findPages.js create mode 100644 docs/src/pagesApi.js diff --git a/docs/src/modules/utils/findPages.js b/docs/src/modules/utils/findPages.js deleted file mode 100644 index d46b100f25e353..00000000000000 --- a/docs/src/modules/utils/findPages.js +++ /dev/null @@ -1,7 +0,0 @@ -import { findPages } from 'docs/src/modules/utils/find'; - -const pages = findPages({ - front: true, -}); - -export default pages; diff --git a/docs/src/pages.ts b/docs/src/pages.ts index f1a367d314d309..b3f7f9beb0f3ee 100644 --- a/docs/src/pages.ts +++ b/docs/src/pages.ts @@ -1,4 +1,4 @@ -import findPages from /* preval */ 'docs/src/modules/utils/findPages'; +import pagesApi from './pagesApi'; export interface MuiPage { pathname: string; @@ -183,7 +183,7 @@ const pages: MuiPage[] = [ title: 'Component API', pathname: '/api-docs', children: [ - ...findPages[0].children!, + ...pagesApi, ...[{ pathname: '/api-docs/data-grid' }, { pathname: '/api-docs/x-grid' }], ] .sort((a, b) => diff --git a/docs/src/pagesApi.js b/docs/src/pagesApi.js new file mode 100644 index 00000000000000..9a0079abc5336a --- /dev/null +++ b/docs/src/pagesApi.js @@ -0,0 +1,432 @@ +module.exports = [ + { pathname: '/api-docs/accordion' }, + { + pathname: '/api-docs/accordion-actions', + }, + { + pathname: '/api-docs/accordion-details', + }, + { + pathname: '/api-docs/accordion-summary', + }, + { + pathname: '/api-docs/alert', + }, + { + pathname: '/api-docs/alert-title', + }, + { + pathname: '/api-docs/app-bar', + }, + { + pathname: '/api-docs/autocomplete', + }, + { + pathname: '/api-docs/avatar', + }, + { + pathname: '/api-docs/avatar-group', + }, + { + pathname: '/api-docs/backdrop', + }, + { + pathname: '/api-docs/badge', + }, + { + pathname: '/api-docs/badge-unstyled', + }, + { + pathname: '/api-docs/bottom-navigation', + }, + { + pathname: '/api-docs/bottom-navigation-action', + }, + { + pathname: '/api-docs/breadcrumbs', + }, + { + pathname: '/api-docs/button', + }, + { + pathname: '/api-docs/button-base', + }, + { + pathname: '/api-docs/button-group', + }, + { + pathname: '/api-docs/card', + }, + { + pathname: '/api-docs/card-action-area', + }, + { + pathname: '/api-docs/card-actions', + }, + { + pathname: '/api-docs/card-content', + }, + { + pathname: '/api-docs/card-header', + }, + { + pathname: '/api-docs/card-media', + }, + { + pathname: '/api-docs/checkbox', + }, + { + pathname: '/api-docs/chip', + }, + { + pathname: '/api-docs/circular-progress', + }, + { + pathname: '/api-docs/click-away-listener', + }, + { + pathname: '/api-docs/collapse', + }, + { + pathname: '/api-docs/container', + }, + { + pathname: '/api-docs/css-baseline', + }, + { + pathname: '/api-docs/desktop-time-picker', + }, + { + pathname: '/api-docs/dialog', + }, + { + pathname: '/api-docs/dialog-actions', + }, + { + pathname: '/api-docs/dialog-content', + }, + { + pathname: '/api-docs/dialog-content-text', + }, + { + pathname: '/api-docs/dialog-title', + }, + { + pathname: '/api-docs/divider', + }, + { + pathname: '/api-docs/drawer', + }, + { + pathname: '/api-docs/fab', + }, + { + pathname: '/api-docs/fade', + }, + { + pathname: '/api-docs/filled-input', + }, + { + pathname: '/api-docs/form-control', + }, + { + pathname: '/api-docs/form-control-label', + }, + { + pathname: '/api-docs/form-group', + }, + { + pathname: '/api-docs/form-helper-text', + }, + { + pathname: '/api-docs/form-label', + }, + { + pathname: '/api-docs/grid', + }, + { + pathname: '/api-docs/grow', + }, + { + pathname: '/api-docs/hidden', + }, + { + pathname: '/api-docs/icon', + }, + { + pathname: '/api-docs/icon-button', + }, + { + pathname: '/api-docs/image-list', + }, + { + pathname: '/api-docs/image-list-item', + }, + { + pathname: '/api-docs/image-list-item-bar', + }, + { + pathname: '/api-docs/input', + }, + { + pathname: '/api-docs/input-adornment', + }, + { + pathname: '/api-docs/input-base', + }, + { + pathname: '/api-docs/input-label', + }, + { + pathname: '/api-docs/linear-progress', + }, + { + pathname: '/api-docs/link', + }, + { + pathname: '/api-docs/list', + }, + { + pathname: '/api-docs/list-item', + }, + { + pathname: '/api-docs/list-item-avatar', + }, + { + pathname: '/api-docs/list-item-icon', + }, + { + pathname: '/api-docs/list-item-secondary-action', + }, + { + pathname: '/api-docs/list-item-text', + }, + { + pathname: '/api-docs/list-subheader', + }, + { + pathname: '/api-docs/loading-button', + }, + { + pathname: '/api-docs/menu', + }, + { + pathname: '/api-docs/menu-item', + }, + { + pathname: '/api-docs/menu-list', + }, + { + pathname: '/api-docs/mobile-stepper', + }, + { + pathname: '/api-docs/mobile-time-picker', + }, + { + pathname: '/api-docs/modal', + }, + { + pathname: '/api-docs/native-select', + }, + { + pathname: '/api-docs/no-ssr', + }, + { + pathname: '/api-docs/outlined-input', + }, + { + pathname: '/api-docs/pagination', + }, + { + pathname: '/api-docs/pagination-item', + }, + { + pathname: '/api-docs/paper', + }, + { + pathname: '/api-docs/popover', + }, + { + pathname: '/api-docs/popper', + }, + { + pathname: '/api-docs/portal', + }, + { + pathname: '/api-docs/radio', + }, + { + pathname: '/api-docs/radio-group', + }, + { + pathname: '/api-docs/rating', + }, + { + pathname: '/api-docs/scoped-css-baseline', + }, + { + pathname: '/api-docs/select', + }, + { + pathname: '/api-docs/skeleton', + }, + { + pathname: '/api-docs/slide', + }, + { + pathname: '/api-docs/slider', + }, + { + pathname: '/api-docs/slider-unstyled', + }, + { + pathname: '/api-docs/snackbar', + }, + { + pathname: '/api-docs/snackbar-content', + }, + { + pathname: '/api-docs/speed-dial', + }, + { + pathname: '/api-docs/speed-dial-action', + }, + { + pathname: '/api-docs/speed-dial-icon', + }, + { + pathname: '/api-docs/static-time-picker', + }, + { + pathname: '/api-docs/step', + }, + { + pathname: '/api-docs/step-button', + }, + { + pathname: '/api-docs/step-connector', + }, + { + pathname: '/api-docs/step-content', + }, + { + pathname: '/api-docs/step-icon', + }, + { + pathname: '/api-docs/step-label', + }, + { + pathname: '/api-docs/stepper', + }, + { + pathname: '/api-docs/svg-icon', + }, + { + pathname: '/api-docs/swipeable-drawer', + }, + { + pathname: '/api-docs/switch', + }, + { + pathname: '/api-docs/tab', + }, + { + pathname: '/api-docs/tab-context', + }, + { + pathname: '/api-docs/table', + }, + { + pathname: '/api-docs/table-body', + }, + { + pathname: '/api-docs/table-cell', + }, + { + pathname: '/api-docs/table-container', + }, + { + pathname: '/api-docs/table-footer', + }, + { + pathname: '/api-docs/table-head', + }, + { + pathname: '/api-docs/table-pagination', + }, + { + pathname: '/api-docs/table-row', + }, + { + pathname: '/api-docs/table-sort-label', + }, + { + pathname: '/api-docs/tab-list', + }, + { + pathname: '/api-docs/tab-panel', + }, + { + pathname: '/api-docs/tabs', + }, + { + pathname: '/api-docs/tab-scroll-button', + }, + { + pathname: '/api-docs/textarea-autosize', + }, + { + pathname: '/api-docs/text-field', + }, + { + pathname: '/api-docs/timeline', + }, + { + pathname: '/api-docs/timeline-connector', + }, + { + pathname: '/api-docs/timeline-content', + }, + { + pathname: '/api-docs/timeline-dot', + }, + { + pathname: '/api-docs/timeline-item', + }, + { + pathname: '/api-docs/timeline-opposite-content', + }, + { + pathname: '/api-docs/timeline-separator', + }, + { + pathname: '/api-docs/time-picker', + }, + { + pathname: '/api-docs/toggle-button', + }, + { + pathname: '/api-docs/toggle-button-group', + }, + { + pathname: '/api-docs/toolbar', + }, + { + pathname: '/api-docs/tooltip', + }, + { + pathname: '/api-docs/tree-item', + }, + { + pathname: '/api-docs/tree-view', + }, + { + pathname: '/api-docs/typography', + }, + { + pathname: '/api-docs/unstable-trap-focus', + }, + { + pathname: '/api-docs/zoom', + }, +]; From 6fe38842e1b5b3d22f9a67d14ead683adc4aaaa3 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Tue, 26 Jan 2021 17:27:24 +0100 Subject: [PATCH 2/6] @eps1lon REVERT LATER deploy all locales --- docs/next.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/next.config.js b/docs/next.config.js index bb4c78b04e3892..a4698f4dfb756f 100644 --- a/docs/next.config.js +++ b/docs/next.config.js @@ -177,7 +177,8 @@ module.exports = { // We want to speed-up the build of pull requests. // For crowdin PRs we want to build all locales for testing. - if (process.env.PULL_REQUEST === 'true' && !l10nPRInNetlify && !vercelDeploy) { + // FIXME REVERT LATER building all locales for testing + if (process.env.PULL_REQUEST === 'NONSESE' && !l10nPRInNetlify && !vercelDeploy) { // eslint-disable-next-line no-console console.log('Considering only English for SSR'); traverse(pages, 'en'); From ebe807d6d3463272d821d51583ebad1e06fb2fef Mon Sep 17 00:00:00 2001 From: eps1lon Date: Tue, 26 Jan 2021 17:42:01 +0100 Subject: [PATCH 3/6] Remove babel-plugin-preval --- .dependabot/config.yml | 4 ---- .eslintrc.js | 3 --- docs/babel.config.js | 1 - docs/package.json | 1 - yarn.lock | 10 +--------- 5 files changed, 1 insertion(+), 18 deletions(-) diff --git a/.dependabot/config.yml b/.dependabot/config.yml index 6638d0ebf33050..47aa9320148bfc 100644 --- a/.dependabot/config.yml +++ b/.dependabot/config.yml @@ -22,10 +22,6 @@ update_configs: # They sometimes are mergable independently but create a different dependency when merged leading to a changed yarn.lock # TODO: Revisit once https://github.com/dependabot/dependabot-core/issues/1190 is resolved. dependency_name: '@typescript-eslint/parser' - - match: - # as of 3.x prevaled code is no longer transpiled - dependency_name: 'babel-plugin-preval' - version_requirement: '>= 3.0' - match: # https://github.com/mui-org/material-ui/pull/17604#issuecomment-536262291 dependency_name: 'core-js' diff --git a/.eslintrc.js b/.eslintrc.js index 5f58b4a2e7770a..6f429ee8c0e2ea 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,9 +13,6 @@ const forbidCreateStylesMessage = module.exports = { root: true, // So parent files don't get applied - globals: { - preval: false, // Used in the documentation - }, env: { es6: true, browser: true, diff --git a/docs/babel.config.js b/docs/babel.config.js index 4a80d57e5156f0..0ea562b4895c50 100644 --- a/docs/babel.config.js +++ b/docs/babel.config.js @@ -52,7 +52,6 @@ module.exports = { 'babel-plugin-optimize-clsx', // for IE11 support '@babel/plugin-transform-object-assign', - 'babel-plugin-preval', [ 'babel-plugin-module-resolver', { diff --git a/docs/package.json b/docs/package.json index 6f3484f4af5e82..a74dcec980d951 100644 --- a/docs/package.json +++ b/docs/package.json @@ -59,7 +59,6 @@ "autosuggest-highlight": "^3.1.1", "babel-plugin-module-resolver": "^4.0.0", "babel-plugin-optimize-clsx": "^2.4.1", - "babel-plugin-preval": "^2.0.0", "babel-plugin-react-remove-properties": "^0.3.0", "babel-plugin-transform-react-remove-prop-types": "^0.4.24", "clean-css": "^4.1.11", diff --git a/yarn.lock b/yarn.lock index e8b3bbf23a2078..602eaf186defdb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4423,7 +4423,7 @@ babel-plugin-istanbul@^6.0.0: istanbul-lib-instrument "^4.0.0" test-exclude "^6.0.0" -babel-plugin-macros@^2.0.0, babel-plugin-macros@^2.2.2, babel-plugin-macros@^2.6.1: +babel-plugin-macros@^2.0.0, babel-plugin-macros@^2.6.1: version "2.8.0" resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== @@ -4464,14 +4464,6 @@ babel-plugin-optimize-clsx@^2.3.0, babel-plugin-optimize-clsx@^2.4.1: lodash "^4.17.15" object-hash "^2.0.3" -babel-plugin-preval@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/babel-plugin-preval/-/babel-plugin-preval-2.0.1.tgz#76a552a1670bb21307f80b927b89fbeb37cf205c" - integrity sha512-7rTkwsuiATlwB7aE9X78LpvfOhocO8K82mAacju6K1dR2uyg83jhSwKvV5PXZnB8Rh92uzMuKIxu2IZoSAVHbQ== - dependencies: - babel-plugin-macros "^2.2.2" - require-from-string "^2.0.2" - babel-plugin-react-remove-properties@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/babel-plugin-react-remove-properties/-/babel-plugin-react-remove-properties-0.3.0.tgz#7b623fb3c424b6efb4edc9b1ae4cc50e7154b87f" From a0f43366e43a9bbce86e1b0625b84f18737ddee7 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Tue, 26 Jan 2021 17:45:16 +0100 Subject: [PATCH 4/6] docs:api: more async-await --- docs/scripts/buildApi.ts | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/scripts/buildApi.ts b/docs/scripts/buildApi.ts index fee6dc982812cb..09b59096d62fb5 100644 --- a/docs/scripts/buildApi.ts +++ b/docs/scripts/buildApi.ts @@ -1295,7 +1295,11 @@ Page.getInitialProps = () => { } } -function run(argv: { componentDirectories?: string[]; grep?: string; outputDirectory?: string }) { +async function run(argv: { + componentDirectories?: string[]; + grep?: string; + outputDirectory?: string; +}) { const workspaceRoot = path.resolve(__dirname, '../../'); /** * @type {string[]} @@ -1374,18 +1378,18 @@ function run(argv: { componentDirectories?: string[]; grep?: string; outputDirec }); }); - Promise.all(componentBuilds).then((builds) => { - const fails = builds.filter( - (promise): promise is { status: 'rejected'; reason: string } => promise.status === 'rejected', - ); + const builds = await Promise.all(componentBuilds); - fails.forEach((build) => { - console.error(build.reason); - }); - if (fails.length > 0) { - process.exit(1); - } + const fails = builds.filter( + (promise): promise is { status: 'rejected'; reason: string } => promise.status === 'rejected', + ); + + fails.forEach((build) => { + console.error(build.reason); }); + if (fails.length > 0) { + process.exit(1); + } } yargs From 6751b394dc0650e8211b937ca63fef14d08b7efe Mon Sep 17 00:00:00 2001 From: eps1lon Date: Tue, 26 Jan 2021 18:07:34 +0100 Subject: [PATCH 5/6] Generate pagesApi in docs:api --- docs/scripts/buildApi.ts | 24 +- docs/src/pagesApi.js | 572 ++++++++++----------------------------- package.json | 2 +- 3 files changed, 167 insertions(+), 431 deletions(-) diff --git a/docs/scripts/buildApi.ts b/docs/scripts/buildApi.ts index 09b59096d62fb5..306ebe46399abe 100644 --- a/docs/scripts/buildApi.ts +++ b/docs/scripts/buildApi.ts @@ -23,7 +23,7 @@ import muiDefaultPropsHandler from 'docs/src/modules/utils/defaultPropsHandler'; import muiFindAnnotatedComponentsResolver from 'docs/src/modules/utils/findAnnotatedComponentsResolver'; import { LANGUAGES, LANGUAGES_IN_PROGRESS } from 'docs/src/modules/constants'; import parseTest from 'docs/src/modules/utils/parseTest'; -import { findPagesMarkdown, findComponents } from 'docs/src/modules/utils/find'; +import { findPages, findPagesMarkdown, findComponents } from 'docs/src/modules/utils/find'; import { getHeaders, renderInline as renderMarkdownInline, @@ -1295,7 +1295,21 @@ Page.getInitialProps = () => { } } +/** + * Creates .js file containing all /api nextjs pages + */ +function generateApiPagesManifest(outputPath: string, prettierConfigPath: string): void { + const [{ children: apiPages }] = findPages({ front: true }); + if (apiPages === undefined) { + throw new TypeError('Unable to find pages under /api'); + } + + const source = `module.exports = ${JSON.stringify(apiPages)}`; + writePrettifiedFile(outputPath, source, prettierConfigPath); +} + async function run(argv: { + apiPagesManifestPath?: string; componentDirectories?: string[]; grep?: string; outputDirectory?: string; @@ -1307,6 +1321,7 @@ async function run(argv: { const componentDirectories = argv.componentDirectories!.map((componentDirectory) => { return path.resolve(componentDirectory); }); + const apiPagesManifestPath = path.resolve(argv.apiPagesManifestPath!); const outputDirectory = path.resolve(argv.outputDirectory!); const grep = argv.grep == null ? null : new RegExp(argv.grep); @@ -1390,6 +1405,8 @@ async function run(argv: { if (fails.length > 0) { process.exit(1); } + + generateApiPagesManifest(apiPagesManifestPath, prettierConfigPath); } yargs @@ -1411,6 +1428,11 @@ yargs description: 'Only generate files for component filenames matching the pattern. The string is treated as a RegExp.', type: 'string', + }) + .option('apiPagesManifestPath', { + description: 'The path to the file where pages available under /api are written to.', + requiresArg: true, + type: 'string', }); }, handler: run, diff --git a/docs/src/pagesApi.js b/docs/src/pagesApi.js index 9a0079abc5336a..048c227e7f6996 100644 --- a/docs/src/pagesApi.js +++ b/docs/src/pagesApi.js @@ -1,432 +1,146 @@ module.exports = [ { pathname: '/api-docs/accordion' }, - { - pathname: '/api-docs/accordion-actions', - }, - { - pathname: '/api-docs/accordion-details', - }, - { - pathname: '/api-docs/accordion-summary', - }, - { - pathname: '/api-docs/alert', - }, - { - pathname: '/api-docs/alert-title', - }, - { - pathname: '/api-docs/app-bar', - }, - { - pathname: '/api-docs/autocomplete', - }, - { - pathname: '/api-docs/avatar', - }, - { - pathname: '/api-docs/avatar-group', - }, - { - pathname: '/api-docs/backdrop', - }, - { - pathname: '/api-docs/badge', - }, - { - pathname: '/api-docs/badge-unstyled', - }, - { - pathname: '/api-docs/bottom-navigation', - }, - { - pathname: '/api-docs/bottom-navigation-action', - }, - { - pathname: '/api-docs/breadcrumbs', - }, - { - pathname: '/api-docs/button', - }, - { - pathname: '/api-docs/button-base', - }, - { - pathname: '/api-docs/button-group', - }, - { - pathname: '/api-docs/card', - }, - { - pathname: '/api-docs/card-action-area', - }, - { - pathname: '/api-docs/card-actions', - }, - { - pathname: '/api-docs/card-content', - }, - { - pathname: '/api-docs/card-header', - }, - { - pathname: '/api-docs/card-media', - }, - { - pathname: '/api-docs/checkbox', - }, - { - pathname: '/api-docs/chip', - }, - { - pathname: '/api-docs/circular-progress', - }, - { - pathname: '/api-docs/click-away-listener', - }, - { - pathname: '/api-docs/collapse', - }, - { - pathname: '/api-docs/container', - }, - { - pathname: '/api-docs/css-baseline', - }, - { - pathname: '/api-docs/desktop-time-picker', - }, - { - pathname: '/api-docs/dialog', - }, - { - pathname: '/api-docs/dialog-actions', - }, - { - pathname: '/api-docs/dialog-content', - }, - { - pathname: '/api-docs/dialog-content-text', - }, - { - pathname: '/api-docs/dialog-title', - }, - { - pathname: '/api-docs/divider', - }, - { - pathname: '/api-docs/drawer', - }, - { - pathname: '/api-docs/fab', - }, - { - pathname: '/api-docs/fade', - }, - { - pathname: '/api-docs/filled-input', - }, - { - pathname: '/api-docs/form-control', - }, - { - pathname: '/api-docs/form-control-label', - }, - { - pathname: '/api-docs/form-group', - }, - { - pathname: '/api-docs/form-helper-text', - }, - { - pathname: '/api-docs/form-label', - }, - { - pathname: '/api-docs/grid', - }, - { - pathname: '/api-docs/grow', - }, - { - pathname: '/api-docs/hidden', - }, - { - pathname: '/api-docs/icon', - }, - { - pathname: '/api-docs/icon-button', - }, - { - pathname: '/api-docs/image-list', - }, - { - pathname: '/api-docs/image-list-item', - }, - { - pathname: '/api-docs/image-list-item-bar', - }, - { - pathname: '/api-docs/input', - }, - { - pathname: '/api-docs/input-adornment', - }, - { - pathname: '/api-docs/input-base', - }, - { - pathname: '/api-docs/input-label', - }, - { - pathname: '/api-docs/linear-progress', - }, - { - pathname: '/api-docs/link', - }, - { - pathname: '/api-docs/list', - }, - { - pathname: '/api-docs/list-item', - }, - { - pathname: '/api-docs/list-item-avatar', - }, - { - pathname: '/api-docs/list-item-icon', - }, - { - pathname: '/api-docs/list-item-secondary-action', - }, - { - pathname: '/api-docs/list-item-text', - }, - { - pathname: '/api-docs/list-subheader', - }, - { - pathname: '/api-docs/loading-button', - }, - { - pathname: '/api-docs/menu', - }, - { - pathname: '/api-docs/menu-item', - }, - { - pathname: '/api-docs/menu-list', - }, - { - pathname: '/api-docs/mobile-stepper', - }, - { - pathname: '/api-docs/mobile-time-picker', - }, - { - pathname: '/api-docs/modal', - }, - { - pathname: '/api-docs/native-select', - }, - { - pathname: '/api-docs/no-ssr', - }, - { - pathname: '/api-docs/outlined-input', - }, - { - pathname: '/api-docs/pagination', - }, - { - pathname: '/api-docs/pagination-item', - }, - { - pathname: '/api-docs/paper', - }, - { - pathname: '/api-docs/popover', - }, - { - pathname: '/api-docs/popper', - }, - { - pathname: '/api-docs/portal', - }, - { - pathname: '/api-docs/radio', - }, - { - pathname: '/api-docs/radio-group', - }, - { - pathname: '/api-docs/rating', - }, - { - pathname: '/api-docs/scoped-css-baseline', - }, - { - pathname: '/api-docs/select', - }, - { - pathname: '/api-docs/skeleton', - }, - { - pathname: '/api-docs/slide', - }, - { - pathname: '/api-docs/slider', - }, - { - pathname: '/api-docs/slider-unstyled', - }, - { - pathname: '/api-docs/snackbar', - }, - { - pathname: '/api-docs/snackbar-content', - }, - { - pathname: '/api-docs/speed-dial', - }, - { - pathname: '/api-docs/speed-dial-action', - }, - { - pathname: '/api-docs/speed-dial-icon', - }, - { - pathname: '/api-docs/static-time-picker', - }, - { - pathname: '/api-docs/step', - }, - { - pathname: '/api-docs/step-button', - }, - { - pathname: '/api-docs/step-connector', - }, - { - pathname: '/api-docs/step-content', - }, - { - pathname: '/api-docs/step-icon', - }, - { - pathname: '/api-docs/step-label', - }, - { - pathname: '/api-docs/stepper', - }, - { - pathname: '/api-docs/svg-icon', - }, - { - pathname: '/api-docs/swipeable-drawer', - }, - { - pathname: '/api-docs/switch', - }, - { - pathname: '/api-docs/tab', - }, - { - pathname: '/api-docs/tab-context', - }, - { - pathname: '/api-docs/table', - }, - { - pathname: '/api-docs/table-body', - }, - { - pathname: '/api-docs/table-cell', - }, - { - pathname: '/api-docs/table-container', - }, - { - pathname: '/api-docs/table-footer', - }, - { - pathname: '/api-docs/table-head', - }, - { - pathname: '/api-docs/table-pagination', - }, - { - pathname: '/api-docs/table-row', - }, - { - pathname: '/api-docs/table-sort-label', - }, - { - pathname: '/api-docs/tab-list', - }, - { - pathname: '/api-docs/tab-panel', - }, - { - pathname: '/api-docs/tabs', - }, - { - pathname: '/api-docs/tab-scroll-button', - }, - { - pathname: '/api-docs/textarea-autosize', - }, - { - pathname: '/api-docs/text-field', - }, - { - pathname: '/api-docs/timeline', - }, - { - pathname: '/api-docs/timeline-connector', - }, - { - pathname: '/api-docs/timeline-content', - }, - { - pathname: '/api-docs/timeline-dot', - }, - { - pathname: '/api-docs/timeline-item', - }, - { - pathname: '/api-docs/timeline-opposite-content', - }, - { - pathname: '/api-docs/timeline-separator', - }, - { - pathname: '/api-docs/time-picker', - }, - { - pathname: '/api-docs/toggle-button', - }, - { - pathname: '/api-docs/toggle-button-group', - }, - { - pathname: '/api-docs/toolbar', - }, - { - pathname: '/api-docs/tooltip', - }, - { - pathname: '/api-docs/tree-item', - }, - { - pathname: '/api-docs/tree-view', - }, - { - pathname: '/api-docs/typography', - }, - { - pathname: '/api-docs/unstable-trap-focus', - }, - { - pathname: '/api-docs/zoom', - }, + { pathname: '/api-docs/accordion-actions' }, + { pathname: '/api-docs/accordion-details' }, + { pathname: '/api-docs/accordion-summary' }, + { pathname: '/api-docs/alert' }, + { pathname: '/api-docs/alert-title' }, + { pathname: '/api-docs/app-bar' }, + { pathname: '/api-docs/autocomplete' }, + { pathname: '/api-docs/avatar' }, + { pathname: '/api-docs/avatar-group' }, + { pathname: '/api-docs/backdrop' }, + { pathname: '/api-docs/badge' }, + { pathname: '/api-docs/badge-unstyled' }, + { pathname: '/api-docs/bottom-navigation' }, + { pathname: '/api-docs/bottom-navigation-action' }, + { pathname: '/api-docs/breadcrumbs' }, + { pathname: '/api-docs/button' }, + { pathname: '/api-docs/button-base' }, + { pathname: '/api-docs/button-group' }, + { pathname: '/api-docs/card' }, + { pathname: '/api-docs/card-action-area' }, + { pathname: '/api-docs/card-actions' }, + { pathname: '/api-docs/card-content' }, + { pathname: '/api-docs/card-header' }, + { pathname: '/api-docs/card-media' }, + { pathname: '/api-docs/checkbox' }, + { pathname: '/api-docs/chip' }, + { pathname: '/api-docs/circular-progress' }, + { pathname: '/api-docs/click-away-listener' }, + { pathname: '/api-docs/collapse' }, + { pathname: '/api-docs/container' }, + { pathname: '/api-docs/css-baseline' }, + { pathname: '/api-docs/desktop-time-picker' }, + { pathname: '/api-docs/dialog' }, + { pathname: '/api-docs/dialog-actions' }, + { pathname: '/api-docs/dialog-content' }, + { pathname: '/api-docs/dialog-content-text' }, + { pathname: '/api-docs/dialog-title' }, + { pathname: '/api-docs/divider' }, + { pathname: '/api-docs/drawer' }, + { pathname: '/api-docs/fab' }, + { pathname: '/api-docs/fade' }, + { pathname: '/api-docs/filled-input' }, + { pathname: '/api-docs/form-control' }, + { pathname: '/api-docs/form-control-label' }, + { pathname: '/api-docs/form-group' }, + { pathname: '/api-docs/form-helper-text' }, + { pathname: '/api-docs/form-label' }, + { pathname: '/api-docs/grid' }, + { pathname: '/api-docs/grow' }, + { pathname: '/api-docs/hidden' }, + { pathname: '/api-docs/icon' }, + { pathname: '/api-docs/icon-button' }, + { pathname: '/api-docs/image-list' }, + { pathname: '/api-docs/image-list-item' }, + { pathname: '/api-docs/image-list-item-bar' }, + { pathname: '/api-docs/input' }, + { pathname: '/api-docs/input-adornment' }, + { pathname: '/api-docs/input-base' }, + { pathname: '/api-docs/input-label' }, + { pathname: '/api-docs/linear-progress' }, + { pathname: '/api-docs/link' }, + { pathname: '/api-docs/list' }, + { pathname: '/api-docs/list-item' }, + { pathname: '/api-docs/list-item-avatar' }, + { pathname: '/api-docs/list-item-icon' }, + { pathname: '/api-docs/list-item-secondary-action' }, + { pathname: '/api-docs/list-item-text' }, + { pathname: '/api-docs/list-subheader' }, + { pathname: '/api-docs/loading-button' }, + { pathname: '/api-docs/menu' }, + { pathname: '/api-docs/menu-item' }, + { pathname: '/api-docs/menu-list' }, + { pathname: '/api-docs/mobile-stepper' }, + { pathname: '/api-docs/mobile-time-picker' }, + { pathname: '/api-docs/modal' }, + { pathname: '/api-docs/native-select' }, + { pathname: '/api-docs/no-ssr' }, + { pathname: '/api-docs/outlined-input' }, + { pathname: '/api-docs/pagination' }, + { pathname: '/api-docs/pagination-item' }, + { pathname: '/api-docs/paper' }, + { pathname: '/api-docs/popover' }, + { pathname: '/api-docs/popper' }, + { pathname: '/api-docs/portal' }, + { pathname: '/api-docs/radio' }, + { pathname: '/api-docs/radio-group' }, + { pathname: '/api-docs/rating' }, + { pathname: '/api-docs/scoped-css-baseline' }, + { pathname: '/api-docs/select' }, + { pathname: '/api-docs/skeleton' }, + { pathname: '/api-docs/slide' }, + { pathname: '/api-docs/slider' }, + { pathname: '/api-docs/slider-unstyled' }, + { pathname: '/api-docs/snackbar' }, + { pathname: '/api-docs/snackbar-content' }, + { pathname: '/api-docs/speed-dial' }, + { pathname: '/api-docs/speed-dial-action' }, + { pathname: '/api-docs/speed-dial-icon' }, + { pathname: '/api-docs/static-time-picker' }, + { pathname: '/api-docs/step' }, + { pathname: '/api-docs/step-button' }, + { pathname: '/api-docs/step-connector' }, + { pathname: '/api-docs/step-content' }, + { pathname: '/api-docs/step-icon' }, + { pathname: '/api-docs/step-label' }, + { pathname: '/api-docs/stepper' }, + { pathname: '/api-docs/svg-icon' }, + { pathname: '/api-docs/swipeable-drawer' }, + { pathname: '/api-docs/switch' }, + { pathname: '/api-docs/tab' }, + { pathname: '/api-docs/tab-context' }, + { pathname: '/api-docs/table' }, + { pathname: '/api-docs/table-body' }, + { pathname: '/api-docs/table-cell' }, + { pathname: '/api-docs/table-container' }, + { pathname: '/api-docs/table-footer' }, + { pathname: '/api-docs/table-head' }, + { pathname: '/api-docs/table-pagination' }, + { pathname: '/api-docs/table-row' }, + { pathname: '/api-docs/table-sort-label' }, + { pathname: '/api-docs/tab-list' }, + { pathname: '/api-docs/tab-panel' }, + { pathname: '/api-docs/tabs' }, + { pathname: '/api-docs/tab-scroll-button' }, + { pathname: '/api-docs/textarea-autosize' }, + { pathname: '/api-docs/text-field' }, + { pathname: '/api-docs/timeline' }, + { pathname: '/api-docs/timeline-connector' }, + { pathname: '/api-docs/timeline-content' }, + { pathname: '/api-docs/timeline-dot' }, + { pathname: '/api-docs/timeline-item' }, + { pathname: '/api-docs/timeline-opposite-content' }, + { pathname: '/api-docs/timeline-separator' }, + { pathname: '/api-docs/time-picker' }, + { pathname: '/api-docs/toggle-button' }, + { pathname: '/api-docs/toggle-button-group' }, + { pathname: '/api-docs/toolbar' }, + { pathname: '/api-docs/tooltip' }, + { pathname: '/api-docs/tree-item' }, + { pathname: '/api-docs/tree-view' }, + { pathname: '/api-docs/typography' }, + { pathname: '/api-docs/unstable-trap-focus' }, + { pathname: '/api-docs/zoom' }, ]; diff --git a/package.json b/package.json index 7dc9d523825fec..d4f1f6c840bb85 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "release:publish:dry-run": "lerna publish from-package --dist-tag next --contents build --registry=\"http://localhost:4873/\"", "release:tag": "node scripts/releaseTag", "docs:api": "rimraf ./docs/pages/api-docs && yarn docs:api:build", - "docs:api:build": "cross-env BABEL_ENV=test __NEXT_EXPORT_TRAILING_SLASH=true babel-node --extensions \".tsx,.ts,.js\" ./docs/scripts/buildApi.ts ./docs/pages/api-docs ./packages/material-ui-unstyled/src ./packages/material-ui/src ./packages/material-ui-lab/src", + "docs:api:build": "cross-env BABEL_ENV=test __NEXT_EXPORT_TRAILING_SLASH=true babel-node --extensions \".tsx,.ts,.js\" ./docs/scripts/buildApi.ts ./docs/pages/api-docs ./packages/material-ui-unstyled/src ./packages/material-ui/src ./packages/material-ui-lab/src --apiPagesManifestPath ./docs/src/pagesApi.js", "docs:build": "yarn workspace docs build", "docs:build-sw": "yarn workspace docs build-sw", "docs:build-color-preview": "babel-node scripts/buildColorTypes", From c9c37e55c3bfac7ea68fb0034eeaa367829622e7 Mon Sep 17 00:00:00 2001 From: eps1lon Date: Wed, 27 Jan 2021 11:58:22 +0100 Subject: [PATCH 6/6] Revert "@eps1lon" This reverts commit 6fe38842e1b5b3d22f9a67d14ead683adc4aaaa3. --- docs/next.config.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/next.config.js b/docs/next.config.js index a4698f4dfb756f..bb4c78b04e3892 100644 --- a/docs/next.config.js +++ b/docs/next.config.js @@ -177,8 +177,7 @@ module.exports = { // We want to speed-up the build of pull requests. // For crowdin PRs we want to build all locales for testing. - // FIXME REVERT LATER building all locales for testing - if (process.env.PULL_REQUEST === 'NONSESE' && !l10nPRInNetlify && !vercelDeploy) { + if (process.env.PULL_REQUEST === 'true' && !l10nPRInNetlify && !vercelDeploy) { // eslint-disable-next-line no-console console.log('Considering only English for SSR'); traverse(pages, 'en');