Skip to content

Commit 0f109d7

Browse files
authored
[docs] Bump next to latest (mui#19995)
1 parent 066fbcd commit 0f109d7

File tree

6 files changed

+542
-201
lines changed

6 files changed

+542
-201
lines changed

.dependabot/config.yml

-5
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ update_configs:
3030
- match:
3131
# These should be grouped once a PR for `jss` is opened
3232
dependency_name: 'jss-*'
33-
- match:
34-
# breaks /api routes
35-
# can be upgraded once https://github.com/zeit/next.js/issues/8123 is resolved
36-
dependency_name: 'next'
37-
version_requirement: '9.x'
3833
- match:
3934
# 1.18 started adding trailing commas only compatible with typescript ^3.4
4035
dependency_name: 'prettier'

dangerfile.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,15 @@ async function run() {
239239
});
240240
const pageDetailsTable = createComparisonTable(pageResults, {
241241
computeBundleLabel: bundleId => {
242-
const host = `https://deploy-preview-${danger.github.pr.number}--material-ui.netlify.com`;
243-
const page = bundleId.replace(/^docs:/, '');
244-
return `[${page}](${host}${page})`;
242+
// a page
243+
if (bundleId.startsWith('docs:/')) {
244+
const host = `https://deploy-preview-${danger.github.pr.number}--material-ui.netlify.com`;
245+
const page = bundleId.replace(/^docs:/, '');
246+
return `[${page}](${host}${page})`;
247+
}
248+
249+
// shared
250+
return bundleId;
245251
},
246252
});
247253

docs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"marked": "^0.8.0",
8383
"material-table": "^1.50.0",
8484
"material-ui-popup-state": "^1.4.1",
85-
"next": "9.1.4",
85+
"next": "^9.3.0",
8686
"notistack": "^0.9.3",
8787
"nprogress": "^0.2.0",
8888
"postcss": "^7.0.18",

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"deduplicate": "node scripts/deduplicate.js",
77
"argos": "argos upload test/regressions/screenshots/chrome --token $ARGOS_TOKEN",
88
"build:codesandbox": "lerna run --parallel --scope \"@material-ui/*\" build",
9-
"docs:api": "rimraf ./docs/pages/api && cross-env BABEL_ENV=test babel-node ./docs/scripts/buildApi.js ./packages/material-ui/src ./docs/pages/api-docs && cross-env BABEL_ENV=test babel-node ./docs/scripts/buildApi.js ./packages/material-ui-lab/src ./docs/pages/api-docs",
9+
"docs:api": "rimraf ./docs/pages/api && cross-env BABEL_ENV=test __NEXT_EXPORT_TRAILING_SLASH=true babel-node ./docs/scripts/buildApi.js ./packages/material-ui/src ./docs/pages/api-docs && cross-env BABEL_ENV=test __NEXT_EXPORT_TRAILING_SLASH=true babel-node ./docs/scripts/buildApi.js ./packages/material-ui-lab/src ./docs/pages/api-docs",
1010
"docs:build": "yarn workspace docs build",
1111
"docs:build-sw": "yarn workspace docs build-sw",
1212
"docs:deploy": "yarn workspace docs deploy",
@@ -150,8 +150,11 @@
150150
"**/@babel/core": "^7.8.6",
151151
"**/@babel/plugin-proposal-class-properties": "^7.8.3",
152152
"**/@babel/plugin-proposal-object-rest-spread": "^7.8.3",
153+
"**/@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
154+
"**/@babel/plugin-proposal-optional-chaining": "^7.8.3",
153155
"**/@babel/plugin-transform-destructuring": "npm:@minh.nguyen/plugin-transform-destructuring@^7.5.2",
154156
"**/@babel/plugin-transform-runtime": "^7.8.3",
157+
"**/@babel/types": "^7.8.6",
155158
"**/@babel/preset-env": "^7.8.6",
156159
"**/@babel/preset-react": "^7.8.3",
157160
"**/@babel/runtime-corejs2": "^7.8.4",

scripts/sizeSnapshot/create.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,16 @@ async function getNextPagesSize() {
9393
const consoleOutput = await fse.readFile(path.join(__dirname, 'build/docs.next'), {
9494
encoding: 'utf8',
9595
});
96-
const pageRegex = /^(?<treeViewPresentation>||)\s+(?<fileType>σ||)\s+(?<pageUrl>[^\s]+)\s+(?<sizeFormatted>[0-9.]+)\s+(?<sizeUnit>\w+)/gm;
96+
const pageRegex = /(?<treeViewPresentation>||)\s+((?<fileType>λ||)\s+)?(?<pageUrl>[^\s]+)\s+(?<sizeFormatted>[0-9.]+)\s+(?<sizeUnit>\w+)/gm;
9797

9898
return Array.from(matchAll(consoleOutput, pageRegex), match => {
9999
const { pageUrl, sizeFormatted, sizeUnit } = match.groups;
100100

101101
let snapshotId = `docs:${pageUrl}`;
102102
// used to be tracked with custom logic hence the different ids
103103
if (pageUrl === '/') {
104-
snapshotId = 'docs.main';
105-
} else if (pageUrl === '/_app') {
104+
snapshotId = 'docs.landing';
105+
} else if (pageUrl === 'static/pages/_app.js') {
106106
snapshotId = 'docs.main';
107107
}
108108
return [

0 commit comments

Comments
 (0)