Skip to content

Commit

Permalink
Merge branch 'main' into JohnnyMcWeed/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed Apr 28, 2022
2 parents 1d36d29 + b747143 commit e8e2c10
Show file tree
Hide file tree
Showing 260 changed files with 2,969 additions and 5,693 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ module.exports = {
'no-await-in-loop': OFF,
'no-case-declarations': WARNING,
'no-console': OFF,
'no-constant-binary-expression': ERROR,
'no-continue': OFF,
'no-control-regex': WARNING,
'no-else-return': [WARNING, {allowElseIf: true}],
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/build-blog-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
paths:
- packages/docusaurus/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -16,8 +20,10 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Set up Node
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3
with:
node-version: '16'
cache: yarn
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/build-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
paths-ignore:
- website/docs/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -26,12 +30,15 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Set up Node
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3
with:
node-version: '16'
cache: yarn
- uses: preactjs/compressed-size-action@8119d3d31b6e57b167e09c81dfa877eada3bcb35 # v2
- name: Track build size changes
uses: preactjs/compressed-size-action@8119d3d31b6e57b167e09c81dfa877eada3bcb35 # v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
build-script: build:website:en
Expand All @@ -45,8 +52,8 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3
with:
cache: yarn
- name: Installation
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/canary-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ jobs:
name: Publish Canary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
with:
fetch-depth: 0 # Needed to get the commit number with "git rev-list --count HEAD"
- name: Set up Node
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3
with:
node-version: '16'
cache: yarn
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
schedule:
- cron: 25 22 * * 3

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
Expand All @@ -26,13 +30,13 @@ jobs:
- javascript

steps:
- name: Checkout repository
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3

- name: Initialize CodeQL
uses: github/codeql-action/init@883476649888a9e8e219d5b2e6b789dc024f690c # v1
uses: github/codeql-action/init@1ed1437484560351c5be56cf73a48a279d116b78 # v2
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@883476649888a9e8e219d5b2e6b789dc024f690c # v1
uses: github/codeql-action/analyze@1ed1437484560351c5be56cf73a48a279d116b78 # v2
11 changes: 8 additions & 3 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: 'Dependency Review'
name: Dependency Review
on: [pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 #v3
- name: 'Dependency Review'
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3
- name: Dependency Review
uses: actions/dependency-review-action@3f943b86c9a289f4e632c632695e2e0898d9d67d # v1
9 changes: 7 additions & 2 deletions .github/workflows/lighthouse-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lighthouse-report:
name: Lighthouse Report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Wait for the Netlify Preview
uses: jakepartusch/wait-for-netlify-action@7dcdeb40c6bc3710a8099702a1fa1ce2c5e322a6 # v1
uses: jakepartusch/wait-for-netlify-action@7ccf91c9ba3d64aa4389c0d3adcba0a6e77e5421 # v1
id: netlify
with:
site_name: docusaurus-2
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -14,8 +18,10 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Set up Node
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3
with:
node-version: '16'
cache: yarn
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/showcase-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
paths:
- website/src/data/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -16,9 +20,10 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Set up Node
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3
with:
node-version: '16'
cache: yarn
Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
paths-ignore:
- website/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -22,11 +26,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['14', '16', '17']
node: ['14', '16', '18']
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3
with:
node-version: ${{ matrix.node }}
cache: yarn
Expand Down Expand Up @@ -62,9 +67,10 @@ jobs:
- variant: -st
nodeLinker: pnp
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Use Node.js 16
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3
with:
node-version: '16'
cache: yarn
Expand Down Expand Up @@ -107,9 +113,10 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 #v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3
- name: Use Node.js 16
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3
with:
node-version: '16'
cache: yarn
Expand All @@ -136,9 +143,10 @@ jobs:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 #v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3
- name: Use Node.js 16
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3
with:
node-version: '16'
cache: yarn
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/tests-swizzle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
paths:
- packages/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -20,11 +24,12 @@ jobs:
action: ['eject', 'wrap']
variant: ['js', 'ts']
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Use Node.js
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Set up Node
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3
with:
node-version: 14
node-version: '16'
cache: yarn
- name: Installation
run: yarn
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
paths-ignore:
- website/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -17,13 +21,14 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
node: ['14', '16', '17']
node: ['14', '16', '18']
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3
with:
node-version: ${{ matrix.node }}
- name: Installation
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
paths-ignore:
- website/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -17,11 +21,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['14', '16', '17']
node: ['14', '16', '18']
steps:
- uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # v3
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a # v3
uses: actions/setup-node@56337c425554a6be30cdef71bf441f15be286854 # v3
with:
node-version: ${{ matrix.node }}
cache: yarn
Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,13 @@ Short on time? Check out our [5-minute tutorial ⏱️](https://tutorial.docusau
## Installation

Use the initialization cli to create your site:
Use the initialization CLI to create your site:

```bash
npm init docusaurus@latest [name] [template]
npm init docusaurus@latest
```

Example:

```bash
npm init docusaurus@latest my-website classic
```
[Read the docs](https://docusaurus.io/docs/installation) for any further information.

## Contributing

Expand Down
6 changes: 1 addition & 5 deletions __tests__/validate-package-json.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@ type PackageJsonFile = {

async function getPackagesJsonFiles(): Promise<PackageJsonFile[]> {
const files = await Globby('packages/*/package.json');

return Promise.all(
files.map(async (file) => ({
file,
content: JSON.parse(await fs.readFile(file, 'utf8')),
})),
files.map((file) => fs.readJSON(file).then((content) => ({file, content}))),
);
}

Expand Down
Loading

0 comments on commit e8e2c10

Please sign in to comment.