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

[pull] master from facebook:master #115

Merged
merged 34 commits into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
32d8148
docs(v2): added Apache APISIX (#4225)
juzhiyuan Feb 16, 2021
2ff5d34
docs(v2): Removing wrong parenthesis on image variable (#4226)
juancarlosjr97 Feb 16, 2021
ae988d0
feat(v2): editUrl functions should receive md doc permalink (#4232)
slorber Feb 17, 2021
bb63e09
docs(v2): Fix link to slash introduction svg (#4229)
SamChou19815 Feb 17, 2021
cf080c7
docs(v2): fix npm/yarn command example for swizzling TypeScript theme…
YashTotale Feb 17, 2021
7c2b81f
fix(v2): website editUrl should target upstream docs (#4233)
slorber Feb 17, 2021
4ccd9a3
fix(v2): fix website versions page (#4234)
slorber Feb 17, 2021
b533847
docs(v2): v2 migration should mention RSS feed url change (#4236)
slorber Feb 17, 2021
5f91f41
docs(v2): Replace mbt-bundle by sicope-model (#4237)
tienvx Feb 17, 2021
75228c4
refactor(v2): clean-ups and fixes (#4244)
lex111 Feb 18, 2021
08fa318
refactor(v2): add more translatable strings (#4219)
lex111 Feb 18, 2021
936d662
fix(v2): avoid horizontal scrolling when long lines of code (#4241)
lex111 Feb 18, 2021
2df5a3b
refactor(v2): use Link component for external links (#4242)
lex111 Feb 18, 2021
9bd65dd
refactor(v2): add Russian translation for classic theme (#4246)
lex111 Feb 18, 2021
02f7722
fix(v2): make doc container full width when hidden sidebar (#4247)
lex111 Feb 18, 2021
f13448d
chore(v2): upgrade dependencies + require Node 12 (#4223)
lex111 Feb 18, 2021
1ec2f04
feat(v2): introduce Seo component for internal usage (#4243)
lex111 Feb 18, 2021
094b513
fix(v2): remove PostCSS plugin for combine duplicated selectors (#4240)
lex111 Feb 18, 2021
db7a348
chore(v2): Fix build size bot (#4248)
slorber Feb 19, 2021
af2e3cb
docs(v2): Add Axioms to showcase (#4251)
limkinZero Feb 19, 2021
a9b459b
docs(v2): Added mailgo to showcase (#4252)
manzinello Feb 19, 2021
a58baac
fix(v2): fix LTR PostCSS bug on Netlify/monorepo symlinks (#4254)
slorber Feb 19, 2021
67ff0a3
chore(v2): remove docs for alpha v68 (#4253)
lex111 Feb 19, 2021
ffb9ad0
docs(v2): Add docusaurus2-graphql-doc-generator to community resource…
edno Feb 22, 2021
9c02bf7
docs(v2): Added kotest to showcase (#4262)
sksamuel Feb 22, 2021
be871b2
feat(v2): add icon to generic sidebar link (#4261)
lex111 Feb 22, 2021
967386f
docs(v2): remove npx and use github action to configure ssh key (#4263)
MatanBobi Feb 22, 2021
babdd95
docs(v2): update agilets banner (#4266)
bennobuilder Feb 22, 2021
a859523
chore(v2): PostCSS peer dep fix (#4265)
RDIL Feb 22, 2021
333545a
fix(v2): Allow null as valid for title of item in footer links (#4267)
ben-qnimble Feb 22, 2021
bd3e66d
chore(v2): bump/align deps in monorepo: commander, semver, fs-extra (…
Simek Feb 22, 2021
f750660
feat(v2): add Farsi default translations (#4271)
slorber Feb 22, 2021
704df68
docs(v2): improve cli docs (#4259)
massoudmaboudi Feb 22, 2021
9f5f393
chore(v2): upgrade react-dev-utils (#4270)
yangshun Feb 22, 2021
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ aliases:
defaults: &defaults
working_directory: ~/docusaurus
docker:
- image: circleci/node:10
- image: circleci/node:12
resource_class: large

version: 2
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# Workaround for https://github.com/preactjs/compressed-size-action/issues/54
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: preactjs/compressed-size-action@v2
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
build-script: 'build:v2:en'
pattern: '{website/build/assets/js/main*js,website/build/assets/css/styles*css,website/build/index.html,website/build/blog/**/introducing-docusaurus/*,website/build/docs/introduction/index.html}'
strip-hash: '\.([^;]\w{7})\.'
minimum-change-threshold: 100
minimum-change-threshold: 30
compression: 'none'
2 changes: 1 addition & 1 deletion .github/workflows/canary-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
node-version: [12.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['10']
node: ['12']
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/migration-cli-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['10']
node: ['12']
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
node: ['10']
node: ['12']
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged --allow-empty
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.15.1
12.13.0
43 changes: 21 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
"canary:bumpVersion": "yarn lerna version 2.0.0-alpha.`git rev-parse --short HEAD` --exact --no-push --yes",
"canary:publish": "yarn lerna publish from-package --dist-tag canary --yes --no-verify-access",
"changelog": "lerna-changelog",
"postinstall": "yarn lock:update && yarn build:packages",
"postinstall": "run-p postinstall:**",
"postinstall:main": "yarn lock:update && yarn build:packages",
"postinstall:dev": "is-ci || husky install",
"prettier": "prettier --config .prettierrc --write \"**/*.{js,jsx,ts,tsx}\"",
"prettier:diff": "prettier --config .prettierrc --list-different \"**/*.{js,jsx,ts,tsx}\"",
"prettier-docs": "prettier --config .prettierrc --write \"**/*.md\"",
Expand All @@ -62,16 +64,16 @@
"lock:update": "npx yarn-deduplicate"
},
"devDependencies": {
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
"@babel/plugin-proposal-optional-chaining": "^7.12.1",
"@babel/plugin-transform-modules-commonjs": "^7.12.1",
"@babel/preset-typescript": "^7.12.1",
"@crowdin/cli": "^3.5.2",
"@babel/cli": "^7.12.16",
"@babel/core": "^7.12.16",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.13",
"@babel/plugin-proposal-optional-chaining": "^7.12.16",
"@babel/plugin-transform-modules-commonjs": "^7.12.13",
"@babel/preset-typescript": "^7.12.16",
"@crowdin/cli": "^3.5.3",
"@types/express": "^4.17.2",
"@types/fs-extra": "^9.0.6",
"@types/jest": "^25.2.1",
"@types/jest": "^26.0.20",
"@types/loader-utils": "^1.1.3",
"@types/lodash.camelcase": "^4.3.6",
"@types/lodash.flatmap": "^4.5.6",
Expand All @@ -86,7 +88,7 @@
"@types/node": "^14.14.22",
"@types/prismjs": "^1.16.2",
"@types/prompts": "^2.0.9",
"@types/react": "^16.9.52",
"@types/react": "^17.0.2",
"@types/react-dev-utils": "^9.0.1",
"@types/react-helmet": "^6.0.0",
"@types/react-loadable": "^5.5.3",
Expand All @@ -102,7 +104,7 @@
"babel-eslint": "^10.0.3",
"concurrently": "^5.3.0",
"cross-env": "^7.0.3",
"eslint": "^7.13.0",
"eslint": "^7.20.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^6.15.0",
"eslint-plugin-header": "^3.0.0",
Expand All @@ -111,19 +113,21 @@
"eslint-plugin-react": "^7.21.5",
"eslint-plugin-react-hooks": "^4.2.0",
"glob": "^7.1.6",
"husky": "^4.2.3",
"jest": "^25.2.7",
"husky": "^5.0.9",
"is-ci": "^2.0.0",
"jest": "^26.6.3",
"lerna": "^3.22.1",
"lerna-changelog": "^1.0.1",
"lint-staged": "^10.1.2",
"lint-staged": "^10.5.4",
"netlify-cli": "^2.58.0",
"nodemon": "^2.0.7",
"prettier": "^2.0.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"rimraf": "^3.0.2",
"serve": "^11.3.2",
"stylelint": "^13.2.1",
"stylelint": "^13.10.0",
"typescript": "^3.9.5"
},
"lint-staged": {
Expand All @@ -135,12 +139,7 @@
"prettier --write"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"engines": {
"node": ">=10.15.1"
"node": ">=12.13.0"
}
}
1 change: 1 addition & 0 deletions packages/docusaurus-1.x/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ module.exports = {
'react/forbid-prop-types': OFF, // 1
'react/require-default-props': OFF, // 1
'jsx-a11y/control-has-associated-label': OFF, // 1
'react/jsx-no-target-blank': OFF, // 1
'react/jsx-props-no-spreading': OFF, // 2
'max-classes-per-file': OFF, // 2
'prefer-object-spread': OFF, // 5
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus-1.x/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"postcss": "^7.0.23",
"prismjs": "^1.22.0",
"react": "^16.8.4",
"react-dev-utils": "^9.1.0",
"react-dev-utils": "^11.0.1",
"react-dom": "^16.8.4",
"remarkable": "^2.0.0",
"request": "^2.88.0",
Expand Down
2 changes: 0 additions & 2 deletions packages/docusaurus-cssnano-preset/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
*/

const advancedBasePreset = require('cssnano-preset-advanced');
const postCssCombineDuplicatedSelectors = require('postcss-combine-duplicated-selectors');
const postCssSortMediaQueries = require('postcss-sort-media-queries');
const postCssRemoveOverriddenCustomProperties = require('./src/remove-overridden-custom-properties');

const preset = advancedBasePreset({autoprefixer: {add: true}});

preset.plugins.unshift(
[postCssCombineDuplicatedSelectors, {removeDuplicatedValues: true}],
[postCssSortMediaQueries],
[postCssRemoveOverriddenCustomProperties],
);
Expand Down
1 change: 0 additions & 1 deletion packages/docusaurus-cssnano-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"dependencies": {
"cssnano-preset-advanced": "^4.0.7",
"postcss": "^7.0.2",
"postcss-combine-duplicated-selectors": "^9.1.0",
"postcss-sort-media-queries": "^1.7.26"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/docusaurus-init/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
"license": "MIT",
"dependencies": {
"chalk": "^4.1.0",
"commander": "^4.0.1",
"commander": "^5.1.0",
"fs-extra": "^9.1.0",
"lodash.kebabcase": "^4.1.1",
"prompts": "^2.4.0",
"semver": "^6.3.0",
"semver": "^7.3.4",
"shelljs": "^0.8.4"
},
"engines": {
"node": ">=10.15.1"
"node": ">=12.13.0"
}
}
8 changes: 4 additions & 4 deletions packages/docusaurus-mdx-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
},
"license": "MIT",
"dependencies": {
"@babel/parser": "^7.12.5",
"@babel/traverse": "^7.12.5",
"@babel/parser": "^7.12.16",
"@babel/traverse": "^7.12.13",
"@docusaurus/core": "2.0.0-alpha.70",
"@docusaurus/utils": "2.0.0-alpha.70",
"@mdx-js/mdx": "^1.6.21",
Expand All @@ -41,13 +41,13 @@
"remark-mdx": "^1.6.21",
"to-vfile": "^6.0.0",
"unist-builder": "^2.0.3",
"unist-util-remove-position": "^2.0.1"
"unist-util-remove-position": "^3.0.0"
},
"peerDependencies": {
"react": "^16.8.4 || ^17.0.0",
"react-dom": "^16.8.4 || ^17.0.0"
},
"engines": {
"node": ">=10.15.1"
"node": ">=12.13.0"
}
}
4 changes: 2 additions & 2 deletions packages/docusaurus-migrate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"docusaurus-migrate": "bin/index.js"
},
"dependencies": {
"@babel/preset-env": "^7.1.6",
"@babel/preset-env": "^7.12.16",
"@mapbox/hast-util-to-jsx": "^1.0.0",
"chalk": "^4.1.0",
"color": "^3.1.3",
Expand All @@ -38,7 +38,7 @@
"rehype-parse": "^7.0.1",
"remark-parse": "^8.0.2",
"remark-stringify": "^8.1.0",
"semver": "^7.3.2",
"semver": "^7.3.4",
"unified": "^9.2.0",
"unist-util-visit": "^2.0.2"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/docusaurus-migrate/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -592,9 +592,9 @@ function migrateVersionedSidebar(
acc: {[key: string]: Array<Record<string, unknown> | string>},
val,
) => {
acc[val[0].replace(versionRegex, '')] = (val[1] as Array<
any
>).map((item) => {
acc[
val[0].replace(versionRegex, '')
] = (val[1] as Array<any>).map((item) => {
if (typeof item === 'string') {
return item.replace(versionRegex, '');
}
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-plugin-client-redirects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"@docusaurus/utils-validation": "2.0.0-alpha.70",
"chalk": "^3.0.0",
"eta": "^1.11.0",
"fs-extra": "^9.0.1",
"fs-extra": "^9.1.0",
"globby": "^11.0.2",
"joi": "^17.2.1",
"joi": "^17.4.0",
"lodash": "^4.17.20"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-plugin-content-blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"feed": "^4.2.2",
"fs-extra": "^9.1.0",
"globby": "^11.0.2",
"joi": "^17.2.1",
"joi": "^17.4.0",
"loader-utils": "^1.2.3",
"lodash": "^4.17.20",
"reading-time": "^1.3.0",
Expand All @@ -39,6 +39,6 @@
"react-dom": "^16.8.4 || ^17.0.0"
},
"engines": {
"node": ">=10.15.1"
"node": ">=12.13.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -184,26 +184,31 @@ describe('loadBlog', () => {
expect(editUrlFunction).toHaveBeenCalledWith({
blogDirPath: 'blog',
blogPath: 'date-matter.md',
permalink: '/blog/date-matter',
locale: 'en',
});
expect(editUrlFunction).toHaveBeenCalledWith({
blogDirPath: 'blog',
blogPath: 'draft.md',
permalink: '/blog/draft',
locale: 'en',
});
expect(editUrlFunction).toHaveBeenCalledWith({
blogDirPath: 'blog',
blogPath: 'complex-slug.md',
permalink: '/blog/hey/my super path/héllô',
locale: 'en',
});
expect(editUrlFunction).toHaveBeenCalledWith({
blogDirPath: 'blog',
blogPath: 'simple-slug.md',
permalink: '/blog/simple/slug',
locale: 'en',
});
expect(editUrlFunction).toHaveBeenCalledWith({
blogDirPath: 'i18n/en/docusaurus-plugin-content-blog',
blogPath: '2018-12-14-Happy-First-Birthday-Slash.md',
permalink: '/blog/2018/12/14/Happy-First-Birthday-Slash',
locale: 'en',
});
});
Expand Down
Loading