Skip to content

Commit

Permalink
Merge branch 'main' into merceyz/fix/templates-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
merceyz authored Jun 17, 2022
2 parents d052f7e + 1b9bec1 commit d10a3d9
Show file tree
Hide file tree
Showing 362 changed files with 5,143 additions and 3,056 deletions.
7 changes: 5 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ module.exports = {
'no-template-curly-in-string': WARNING,
'no-unused-expressions': [WARNING, {allowTaggedTemplates: true}],
'no-useless-escape': WARNING,
'no-void': [ERROR, {allowAsStatement: true}],
'prefer-destructuring': WARNING,
'prefer-named-capture-group': WARNING,
'prefer-template': WARNING,
Expand All @@ -210,10 +211,12 @@ module.exports = {
],

'import/extensions': OFF,
// Ignore certain webpack aliases because they can't be resolved
// This rule doesn't yet support resolving .js imports when the actual file
// is .ts. Plus it's not all that useful when our code is fully TS-covered.
'import/no-unresolved': [
ERROR,
OFF,
{
// Ignore certain webpack aliases because they can't be resolved
ignore: [
'^@theme',
'^@docusaurus',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-blog-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Set up Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: '16'
cache: yarn
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/build-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
branches:
- main
paths:
- package.json
- yarn.lock
- packages/**
- website/**
- '!website/docs/**'
Expand All @@ -35,7 +37,7 @@ jobs:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Set up Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: '16'
cache: yarn
Expand All @@ -55,7 +57,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3
- uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
cache: yarn
- name: Installation
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/canary-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
fetch-depth: 0 # Needed to get the commit number with "git rev-list --count HEAD"
- name: Set up Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: '16'
cache: yarn
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ jobs:
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3

- name: Initialize CodeQL
uses: github/codeql-action/init@a3a6c128d771b6b9bdebb1c9d0583ebd2728a108 # v2
uses: github/codeql-action/init@27ea8f8fe5977c00f5b37e076ab846c5bd783b96 # v2
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@a3a6c128d771b6b9bdebb1c9d0583ebd2728a108 # v2
uses: github/codeql-action/analyze@27ea8f8fe5977c00f5b37e076ab846c5bd783b96 # v2
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Set up Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: '16'
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/showcase-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Set up Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: '16'
cache: yarn
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ on:
branches:
- main
paths:
- package.json
- yarn.lock
- jest.config.mjs
- packages/**
- tsconfig.json
pull_request:
branches:
- main
paths:
- package.json
- yarn.lock
- jest.config.mjs
- packages/**
- tsconfig.json
- .github/workflows/tests-e2e.yml
Expand All @@ -34,7 +40,7 @@ jobs:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: ${{ matrix.node }}
cache: yarn
Expand Down Expand Up @@ -68,7 +74,7 @@ jobs:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Use Node.js 16
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: '16'
cache: yarn
Expand Down Expand Up @@ -118,7 +124,7 @@ jobs:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Use Node.js 16
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: '16'
cache: yarn
Expand Down Expand Up @@ -148,7 +154,7 @@ jobs:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Use Node.js 16
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: '16'
cache: yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-swizzle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Set up Node
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: '16'
cache: yarn
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- main
paths:
- package.json
- yarn.lock
- jest.config.mjs
- packages/**
- tsconfig.json

Expand All @@ -29,7 +32,7 @@ jobs:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: ${{ matrix.node }}
- name: Installation
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- main
paths:
- package.json
- yarn.lock
- jest.config.mjs
- packages/**
- tsconfig.json

Expand All @@ -27,7 +30,7 @@ jobs:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048 # v3
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # v3
with:
node-version: ${{ matrix.node }}
cache: yarn
Expand Down
2 changes: 0 additions & 2 deletions __tests__/validate-tsconfig.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,12 @@ const tsconfigSchema = Joi.object({
incremental: Joi.forbidden(),
tsBuildInfoFile: Joi.forbidden(),
outDir: Joi.forbidden(),
module: Joi.valid('commonjs', 'es2020', 'esnext').required(),
}).unknown(),
otherwise: Joi.object({
noEmit: Joi.valid(false).required(),
incremental: Joi.valid(true).required(),
rootDir: Joi.valid('src').required(),
outDir: Joi.valid('lib').required(),
module: Joi.valid('commonjs', 'es2020', 'esnext').required(),
}).unknown(),
},
),
Expand Down
2 changes: 1 addition & 1 deletion admin/publish.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Test running the website with the new version locally.

To keep versions number small, delete the oldest version and add a link to it in `archivedVersions.json`.

Check [Netlify site deployments](https://app.netlify.com/sites/docusaurus-2/deploys) to pick a recent immutable deployment url.
Check [Netlify site deployments](https://app.netlify.com/sites/docusaurus-2/deploys) to pick a recent immutable deployment URL.

### 5. Create a Pull Request

Expand Down
4 changes: 4 additions & 0 deletions jest/deps.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ declare module 'remark-mdx' {
export = mdx;
}

declare module 'remark-rehype';

declare module 'rehype-stringify';

declare module '@testing-utils/git' {
const createTempRepo: typeof import('./utils/git').createTempRepo;
export {createTempRepo};
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,48 +56,48 @@
"watch": "yarn lerna run --parallel watch",
"clear": "(yarn workspace website clear || echo 'Failure while running docusaurus clear') && yarn lerna exec --ignore docusaurus yarn rimraf lib",
"test:baseUrl": "yarn build:website:baseUrl && yarn serve:website:baseUrl",
"lock:update": "npx yarn-deduplicate"
"lock:update": "npx --yes yarn-deduplicate"
},
"dependencies": {
"unified": "^9.2.2"
},
"devDependencies": {
"@crowdin/cli": "^3.7.8",
"@swc/core": "^1.2.194",
"@swc/core": "^1.2.197",
"@swc/jest": "^0.2.21",
"@testing-library/react-hooks": "^8.0.0",
"@types/fs-extra": "^9.0.13",
"@types/jest": "^27.5.1",
"@types/jest": "^28.1.1",
"@types/lodash": "^4.14.182",
"@types/node": "^17.0.35",
"@types/node": "^17.0.42",
"@types/prompts": "^2.0.14",
"@types/react": "^18.0.9",
"@types/react": "^18.0.12",
"@types/react-dev-utils": "^9.0.11",
"@types/react-test-renderer": "^18.0.0",
"@types/semver": "^7.3.9",
"@types/shelljs": "^0.8.11",
"@typescript-eslint/eslint-plugin": "^5.26.0",
"@typescript-eslint/parser": "^5.26.0",
"@typescript-eslint/eslint-plugin": "^5.27.1",
"@typescript-eslint/parser": "^5.27.1",
"cross-env": "^7.0.3",
"cspell": "^6.0.0",
"eslint": "^8.16.0",
"cspell": "^6.1.2",
"eslint": "^8.17.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-header": "^3.1.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^26.2.2",
"eslint-plugin-jest": "^26.5.3",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.5.0",
"eslint-plugin-regexp": "^1.7.0",
"husky": "^8.0.1",
"image-size": "^1.0.1",
"jest": "^28.1.0",
"jest-environment-jsdom": "^28.1.0",
"jest": "^28.1.1",
"jest-environment-jsdom": "^28.1.1",
"jest-serializer-react-helmet-async": "^1.0.21",
"lerna": "^5.0.0",
"lerna": "^5.1.1",
"lerna-changelog": "^2.2.0",
"lint-staged": "^12.4.2",
"lint-staged": "^13.0.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.6.2",
"react": "^17.0.2",
Expand All @@ -106,11 +106,11 @@
"react-test-renderer": "^17.0.2",
"remark-parse": "^8.0.2",
"rimraf": "^3.0.2",
"sharp": "^0.30.5",
"sharp": "^0.30.6",
"strip-ansi": "^6.0.1",
"stylelint": "^14.8.3",
"stylelint": "^14.9.1",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard": "^25.0.0",
"typescript": "~4.6.4"
"stylelint-config-standard": "^26.0.0",
"typescript": "~4.7.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"@tsconfig/docusaurus": "^1.0.5",
"@types/node": "^16",
"@types/react": "^17",
"typescript": "^4.6.4"
"typescript": "^4.7.3"
},
"resolutions": {
"@types/react": "^17"
Expand All @@ -46,5 +46,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": ">=16.14"
}
}
3 changes: 3 additions & 0 deletions packages/create-docusaurus/templates/classic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,8 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"engines": {
"node": ">=16.14"
}
}
4 changes: 2 additions & 2 deletions packages/create-docusaurus/templates/facebook/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -38,7 +38,7 @@ module.exports = {

[
'*',
' * Copyright (c) Facebook, Inc. and its affiliates.',
' * Copyright (c) Meta Platforms, Inc. and affiliates.',
' *',
' * This source code is licensed under the MIT license found in the',
' * LICENSE file in the root directory of this source tree.',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
Expand Down
Loading

0 comments on commit d10a3d9

Please sign in to comment.