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

chore(v2): upgrade dependencies + require Node 12 #4223

Merged
merged 14 commits into from
Feb 18, 2021
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
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
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",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrade Husky (see https://dev.to/typicode/what-s-new-in-husky-5-32g5 for more details)

"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-init/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@
"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"
}
}
2 changes: 1 addition & 1 deletion 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 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
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-client-redirects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"eta": "^1.11.0",
"fs-extra": "^9.0.1",
"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"
}
}
6 changes: 3 additions & 3 deletions packages/docusaurus-plugin-content-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
"@docusaurus/utils": "2.0.0-alpha.70",
"@docusaurus/utils-validation": "2.0.0-alpha.70",
"chalk": "^4.1.0",
"execa": "^3.4.0",
"execa": "^5.0.0",
"fs-extra": "^9.1.0",
"globby": "^11.0.2",
"import-fresh": "^3.2.2",
"joi": "^17.2.1",
"joi": "^17.4.0",
"loader-utils": "^1.2.3",
"lodash": "^4.17.19",
"lodash.flatmap": "^4.5.0",
Expand All @@ -52,6 +52,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 @@ -38,10 +38,8 @@ describe('lastUpdate', () => {
);
expect(await getFileLastUpdate(nonExistingFilePath)).toBeNull();
expect(consoleMock).toHaveBeenCalledTimes(1);
expect(consoleMock).toHaveBeenCalledWith(
new Error(
`Command failed with exit code 128: git log -1 --format=%ct, %an ${nonExistingFilePath}`,
),
expect(consoleMock.mock.calls[0][0].message).toContain(
`Command failed with exit code 128: git log -1 --format=%ct, %an ${nonExistingFilePath}`,
);
expect(await getFileLastUpdate(null)).toBeNull();
expect(await getFileLastUpdate(undefined)).toBeNull();
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus-plugin-content-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@docusaurus/utils": "2.0.0-alpha.70",
"@docusaurus/utils-validation": "2.0.0-alpha.70",
"globby": "^11.0.2",
"joi": "^17.2.1",
"joi": "^17.4.0",
"loader-utils": "^1.2.3",
"lodash": "^4.17.19",
"minimatch": "^3.0.4",
Expand All @@ -37,6 +37,6 @@
"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-plugin-debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"@docusaurus/core": "2.0.0-alpha.70",
"@docusaurus/types": "2.0.0-alpha.70",
"@docusaurus/utils": "2.0.0-alpha.70",
"react-json-view": "^1.20.4"
"react-json-view": "^1.21.1"
},
"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"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-google-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"react-dom": "^16.8.4 || ^17.0.0"
},
"engines": {
"node": ">=10.15.1"
"node": ">=12.13.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-google-gtag/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"react-dom": "^16.8.4 || ^17.0.0"
},
"engines": {
"node": ">=10.15.1"
"node": ">=12.13.0"
}
}
2 changes: 1 addition & 1 deletion packages/docusaurus-plugin-ideal-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"react-dom": "^16.8.4 || ^17.0.0"
},
"engines": {
"node": ">=10.15.1"
"node": ">=12.13.0"
}
}
16 changes: 8 additions & 8 deletions packages/docusaurus-plugin-pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
},
"license": "MIT",
"dependencies": {
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
"@babel/plugin-proposal-optional-chaining": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.13",
"@babel/plugin-proposal-optional-chaining": "^7.12.16",
"@babel/preset-env": "^7.12.16",
"@docusaurus/core": "2.0.0-alpha.70",
"babel-loader": "^8.2.1",
"babel-loader": "^8.2.2",
"clsx": "^1.1.1",
"core-js": "^2.6.5",
"joi": "^17.2.1",
"joi": "^17.4.0",
"terser-webpack-plugin": "^4.1.0",
"webpack": "^4.44.1",
"webpack-merge": "^4.2.2",
"workbox-build": "^6.0.2",
"workbox-precaching": "^6.0.2",
"workbox-window": "^6.0.2"
"workbox-build": "^6.1.0",
"workbox-precaching": "^6.1.0",
"workbox-window": "^6.1.0"
},
"peerDependencies": {
"react": "^16.8.4 || ^17.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/docusaurus-plugin-sitemap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
"@docusaurus/types": "2.0.0-alpha.70",
"@docusaurus/utils": "2.0.0-alpha.70",
"fs-extra": "^9.1.0",
"joi": "^17.2.1",
"sitemap": "^3.2.2"
"joi": "^17.4.0",
"sitemap": "^6.3.6"
},
"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"
}
}
Loading