Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Bump next to latest #19995

Merged
merged 5 commits into from
Mar 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ update_configs:
- match:
# These should be grouped once a PR for `jss` is opened
dependency_name: 'jss-*'
- match:
# breaks /api routes
# can be upgraded once https://github.com/zeit/next.js/issues/8123 is resolved
dependency_name: 'next'
version_requirement: '9.x'
- match:
# 1.18 started adding trailing commas only compatible with typescript ^3.4
dependency_name: 'prettier'
Expand Down
12 changes: 9 additions & 3 deletions dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,15 @@ async function run() {
});
const pageDetailsTable = createComparisonTable(pageResults, {
computeBundleLabel: bundleId => {
const host = `https://deploy-preview-${danger.github.pr.number}--material-ui.netlify.com`;
const page = bundleId.replace(/^docs:/, '');
return `[${page}](${host}${page})`;
// a page
if (bundleId.startsWith('docs:/')) {
const host = `https://deploy-preview-${danger.github.pr.number}--material-ui.netlify.com`;
const page = bundleId.replace(/^docs:/, '');
return `[${page}](${host}${page})`;
}

// shared
return bundleId;
},
});

Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"marked": "^0.8.0",
"material-table": "^1.50.0",
"material-ui-popup-state": "^1.4.1",
"next": "9.1.4",
"next": "^9.3.0",
"notistack": "^0.9.3",
"nprogress": "^0.2.0",
"postcss": "^7.0.18",
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"deduplicate": "node scripts/deduplicate.js",
"argos": "argos upload test/regressions/screenshots/chrome --token $ARGOS_TOKEN",
"build:codesandbox": "lerna run --parallel --scope \"@material-ui/*\" build",
"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",
"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",
"docs:build": "yarn workspace docs build",
"docs:build-sw": "yarn workspace docs build-sw",
"docs:deploy": "yarn workspace docs deploy",
Expand Down Expand Up @@ -150,8 +150,11 @@
"**/@babel/core": "^7.8.6",
"**/@babel/plugin-proposal-class-properties": "^7.8.3",
"**/@babel/plugin-proposal-object-rest-spread": "^7.8.3",
"**/@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
"**/@babel/plugin-proposal-optional-chaining": "^7.8.3",
"**/@babel/plugin-transform-destructuring": "npm:@minh.nguyen/plugin-transform-destructuring@^7.5.2",
"**/@babel/plugin-transform-runtime": "^7.8.3",
"**/@babel/types": "^7.8.6",
"**/@babel/preset-env": "^7.8.6",
"**/@babel/preset-react": "^7.8.3",
"**/@babel/runtime-corejs2": "^7.8.4",
Expand Down
6 changes: 3 additions & 3 deletions scripts/sizeSnapshot/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ async function getNextPagesSize() {
const consoleOutput = await fse.readFile(path.join(__dirname, 'build/docs.next'), {
encoding: 'utf8',
});
const pageRegex = /^(?<treeViewPresentation>┌|├|└)\s+(?<fileType>σ|⚡|)\s+(?<pageUrl>[^\s]+)\s+(?<sizeFormatted>[0-9.]+)\s+(?<sizeUnit>\w+)/gm;
const pageRegex = /(?<treeViewPresentation>┌|├|└)\s+((?<fileType>λ|○|●)\s+)?(?<pageUrl>[^\s]+)\s+(?<sizeFormatted>[0-9.]+)\s+(?<sizeUnit>\w+)/gm;

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

let snapshotId = `docs:${pageUrl}`;
// used to be tracked with custom logic hence the different ids
if (pageUrl === '/') {
snapshotId = 'docs.main';
} else if (pageUrl === '/_app') {
snapshotId = 'docs.landing';
} else if (pageUrl === 'static/pages/_app.js') {
snapshotId = 'docs.main';
}
return [
Expand Down
Loading