Skip to content

Commit

Permalink
Merge branch 'main' into code-wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Jun 2, 2022
2 parents e2864bc + 1efcfc4 commit 062348e
Show file tree
Hide file tree
Showing 491 changed files with 4,975 additions and 3,409 deletions.
56 changes: 42 additions & 14 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ module.exports = {
},
parser: '@typescript-eslint/parser',
parserOptions: {
allowImportExportEverywhere: true,
// tsconfigRootDir: __dirname,
// project: ['./tsconfig.json', './website/tsconfig.json'],
},
globals: {
JSX: true,
Expand All @@ -30,6 +31,8 @@ module.exports = {
'plugin:jest/recommended',
'airbnb',
'plugin:@typescript-eslint/recommended',
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
// 'plugin:@typescript-eslint/strict',
'plugin:regexp/recommended',
'prettier',
'plugin:@docusaurus/all',
Expand Down Expand Up @@ -83,7 +86,7 @@ module.exports = {
'no-restricted-exports': OFF,
'no-restricted-properties': [
ERROR,
...[
.../** @type {[string, string][]} */ ([
// TODO: TS doesn't make Boolean a narrowing function yet,
// so filter(Boolean) is problematic type-wise
// ['compact', 'Array#filter(Boolean)'],
Expand Down Expand Up @@ -114,7 +117,7 @@ module.exports = {
['take', 'Array#slice(0, n)'],
['takeRight', 'Array#slice(-n)'],
['tail', 'Array#slice(1)'],
].map(([property, alternative]) => ({
]).map(([property, alternative]) => ({
object: '_',
property,
message: `Use ${alternative} instead.`,
Expand Down Expand Up @@ -302,6 +305,9 @@ module.exports = {
'react/prop-types': OFF,
'react/require-default-props': [ERROR, {ignoreFunctionalComponents: true}],

'@typescript-eslint/consistent-type-definitions': OFF,
'@typescript-eslint/require-await': OFF,

'@typescript-eslint/ban-ts-comment': [
ERROR,
{'ts-expect-error': 'allow-with-description'},
Expand Down Expand Up @@ -363,20 +369,39 @@ module.exports = {
overrides: [
{
files: [
'packages/docusaurus-*/src/theme/**/*.js',
'packages/docusaurus-*/src/theme/**/*.ts',
'packages/docusaurus-*/src/theme/**/*.tsx',
'packages/docusaurus-*/src/theme/**/*.{js,ts,tsx}',
'packages/docusaurus/src/client/**/*.{js,ts,tsx}',
],
rules: {
'import/no-named-export': ERROR,
'no-restricted-imports': [
'error',
{
patterns: [
// Prevent importing lodash in client bundle for bundle size
'lodash',
'lodash.**',
'lodash/**',
// Prevent importing server code in client bundle
'**/../babel/**',
'**/../server/**',
'**/../commands/**',
'**/../webpack/**',
],
},
],
},
},
{
files: [
'packages/create-docusaurus/templates/**/*.js',
'packages/create-docusaurus/templates/**/*.ts',
'packages/create-docusaurus/templates/**/*.tsx',
'packages/docusaurus-*/src/theme/**/*.{js,ts,tsx}',
'packages/docusaurus/src/client/theme-fallback/**/*.{js,ts,tsx}',
],
rules: {
'import/no-named-export': ERROR,
},
},
{
files: ['packages/create-docusaurus/templates/**/*.{js,ts,tsx}'],
rules: {
'header/header': OFF,
'global-require': OFF,
Expand All @@ -391,14 +416,14 @@ module.exports = {
},
},
{
files: ['*.ts', '*.tsx'],
files: ['*.{ts,tsx}'],
rules: {
'no-undef': OFF,
'import/no-import-module-exports': OFF,
},
},
{
files: ['*.js', '*.mjs', '.cjs'],
files: ['*.{js,mjs,cjs}'],
rules: {
// Make JS code directly runnable in Node.
'@typescript-eslint/no-var-requires': OFF,
Expand All @@ -419,8 +444,7 @@ module.exports = {
// Internal files where extraneous deps don't matter much at long as
// they run
files: [
'*.test.ts',
'*.test.tsx',
'*.test.{js,ts,tsx}',
'admin/**',
'jest/**',
'website/**',
Expand All @@ -431,5 +455,9 @@ module.exports = {
'import/no-extraneous-dependencies': OFF,
},
},
{
files: ['packages/eslint-plugin/**/*.{js,ts}'],
extends: ['plugin:eslint-plugin/recommended'],
},
],
};
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@2f58583a1b24a7d3c7034f6bf9fa506d23b1183b # v2
uses: github/codeql-action/init@a3a6c128d771b6b9bdebb1c9d0583ebd2728a108 # v2
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@2f58583a1b24a7d3c7034f6bf9fa506d23b1183b # v2
uses: github/codeql-action/analyze@a3a6c128d771b6b9bdebb1c9d0583ebd2728a108 # v2
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b #v3
- name: Dependency Review
uses: actions/dependency-review-action@39e692fa323107ef86d8fdac0067ce647f239bd7 # v1
uses: actions/dependency-review-action@a9c83d3af6b9031e20feba03b904645bb23d1dab # v1
17 changes: 10 additions & 7 deletions .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['14', '16', '18']
node: ['16.14', '16', '18']
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
Expand Down Expand Up @@ -64,11 +64,6 @@ jobs:
matrix:
nodeLinker: [pnp, node-modules]
variant: [-s, -st]
exclude:
# Running tsc on PnP requires additional installations, which is not
# worthwhile for a simple E2E test
- variant: -st
nodeLinker: pnp
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
Expand Down Expand Up @@ -98,13 +93,21 @@ jobs:
working-directory: ../test-website
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false # Yarn berry should create the lockfile, despite CI env
- name: Install missing dependencies
if: matrix.variant == '-st' && matrix.nodeLinker == 'pnp'
run: |
# These dependencies are referenced in the init project, not by our packages
yarn add @docusaurus/theme-classic @docusaurus/types @types/node
yarn config set packageExtensions --json '{ "unified@^9.2.2": { "dependencies": { "@types/unist": "^2.0.6" } } }'
working-directory: ../test-website
- name: Start test-website project
run: yarn start --no-open
working-directory: ../test-website
env:
E2E_TEST: true
- name: Type check
if: matrix.variant == '-st'
# TODO: there're some lingering issues with PnP + tsc. Enable tsc in PnP later.
if: matrix.variant == '-st' && matrix.nodeLinker != 'pnp'
run: yarn typecheck
working-directory: ../test-website
- name: Build test-website project
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
node: ['14', '16', '18']
node: ['16.14', '16', '18']
steps:
- name: Support longpaths
run: git config --system core.longpaths true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['14', '16', '18']
node: ['16.14', '16', '18']
steps:
- name: Checkout
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # v3
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.14.0
18
110 changes: 110 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,115 @@
# Docusaurus 2 Changelog

## 2.0.0-beta.21 (2022-05-27)

#### :boom: Breaking Change

- `docusaurus-plugin-pwa`
- [#7422](https://github.com/facebook/docusaurus/pull/7422) refactor(pwa): remove reloadPopup option in favor of swizzling ([@Josh-Cena](https://github.com/Josh-Cena))
- `create-docusaurus`, `docusaurus-cssnano-preset`, `docusaurus-logger`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-debug`, `docusaurus-plugin-google-analytics`, `docusaurus-plugin-google-gtag`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-plugin-sitemap`, `docusaurus-preset-classic`, `docusaurus-remark-plugin-npm2yarn`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-live-codeblock`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`, `docusaurus-utils-common`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus`, `eslint-plugin`, `lqip-loader`
- [#7501](https://github.com/facebook/docusaurus/pull/7501) chore: require Node 16.14 ([@Josh-Cena](https://github.com/Josh-Cena))

#### :rocket: New Feature

- `docusaurus-plugin-sitemap`
- [#7469](https://github.com/facebook/docusaurus/pull/7469) feat(sitemap): allow customizing the output name ([@Josh-Cena](https://github.com/Josh-Cena))
- `docusaurus-utils`, `docusaurus`
- [#7371](https://github.com/facebook/docusaurus/pull/7371) feat(core): support docusaurus.config.cjs as default file name ([@Josh-Cena](https://github.com/Josh-Cena))
- `docusaurus`
- [#7500](https://github.com/facebook/docusaurus/pull/7500) feat: make docusaurus serve automatically open in browser ([@Zamiell](https://github.com/Zamiell))
- [#7452](https://github.com/facebook/docusaurus/pull/7452) feat: add --no-minify flag to docusaurus start ([@lanegoolsby](https://github.com/lanegoolsby))
- `docusaurus-theme-classic`
- [#7357](https://github.com/facebook/docusaurus/pull/7357) feat(theme-classic): allow className as option for type: "search" ([@JPeer264](https://github.com/JPeer264))

#### :bug: Bug Fix

- `docusaurus`
- [#7362](https://github.com/facebook/docusaurus/pull/7362) fix: always emit SEO title + og:title meta ([@charleskorn](https://github.com/charleskorn))
- [#7453](https://github.com/facebook/docusaurus/pull/7453) fix(core): avoid using logger and fs.readJSON in SSR ([@Josh-Cena](https://github.com/Josh-Cena))
- [#7369](https://github.com/facebook/docusaurus/pull/7369) fix(cli): output correct path when swizzling bare-file component in subfolder ([@Josh-Cena](https://github.com/Josh-Cena))
- [#7360](https://github.com/facebook/docusaurus/pull/7360) fix(core): allow githubPort in config validation ([@mhughes2k](https://github.com/mhughes2k))
- `docusaurus-plugin-google-gtag`
- [#7424](https://github.com/facebook/docusaurus/pull/7424) fix(gtag): send the newly rendered page's title instead of the old one's ([@ori-shalom](https://github.com/ori-shalom))
- `create-docusaurus`, `docusaurus-utils`
- [#7507](https://github.com/facebook/docusaurus/pull/7507) fix(create-docusaurus): potential security issue with command injection ([@slorber](https://github.com/slorber))
- `docusaurus-module-type-aliases`, `docusaurus-theme-classic`, `docusaurus`
- [#7492](https://github.com/facebook/docusaurus/pull/7492) fix(core): always treat error boundary fallback as a callback ([@Josh-Cena](https://github.com/Josh-Cena))
- `docusaurus-theme-classic`
- [#7438](https://github.com/facebook/docusaurus/pull/7438) fix(theme-classic): allow nested task lists to preserve the indent ([@Josh-Cena](https://github.com/Josh-Cena))
- [#7430](https://github.com/facebook/docusaurus/pull/7430) fix(theme-classic): consistently apply the right active class name for all navbar items ([@Josh-Cena](https://github.com/Josh-Cena))
- [#7411](https://github.com/facebook/docusaurus/pull/7411) fix(theme-classic): autocollapse sidebar categories when navigating with paginator ([@pranabdas](https://github.com/pranabdas))
- [#7363](https://github.com/facebook/docusaurus/pull/7363) fix(theme-classic): resolve customCss from site dir ([@Josh-Cena](https://github.com/Josh-Cena))
- `docusaurus-utils`
- [#7464](https://github.com/facebook/docusaurus/pull/7464) fix(utils): fix Markdown link replacement when link text is same as href ([@Josh-Cena](https://github.com/Josh-Cena))
- [#7458](https://github.com/facebook/docusaurus/pull/7458) fix(utils): avoid replacing Markdown links missing the directly next link ([@Josh-Cena](https://github.com/Josh-Cena))
- `docusaurus-mdx-loader`
- [#7392](https://github.com/facebook/docusaurus/pull/7392) fix(mdx-loader): use React.Fragment as fragment factory ([@Josh-Cena](https://github.com/Josh-Cena))
- `docusaurus-plugin-content-docs`
- [#7385](https://github.com/facebook/docusaurus/pull/7385) fix(content-docs): restore functionality when a category only has index page ([@Josh-Cena](https://github.com/Josh-Cena))

#### :nail_care: Polish

- `docusaurus-theme-translations`
- [#7493](https://github.com/facebook/docusaurus/pull/7493) chore(theme-translations): complete French translations ([@forresst](https://github.com/forresst))
- [#7474](https://github.com/facebook/docusaurus/pull/7474) chore(theme-translations): complete zh translations ([@Josh-Cena](https://github.com/Josh-Cena))
- [#7400](https://github.com/facebook/docusaurus/pull/7400) chore(theme-translations): complete Farsi translations ([@massoudmaboudi](https://github.com/massoudmaboudi))
- `docusaurus`
- [#7499](https://github.com/facebook/docusaurus/pull/7499) fix: avoid printing period after localhost URL ([@Zamiell](https://github.com/Zamiell))
- `create-docusaurus`
- [#7374](https://github.com/facebook/docusaurus/pull/7374) refactor(create): clean up logic when prompting for unspecified arguments ([@Josh-Cena](https://github.com/Josh-Cena))

#### :memo: Documentation

- [#7503](https://github.com/facebook/docusaurus/pull/7503) docs: document MDXComponents scope ([@Josh-Cena](https://github.com/Josh-Cena))
- [#7497](https://github.com/facebook/docusaurus/pull/7497) docs: link every reference of types in API table to the type definition ([@Zamiell](https://github.com/Zamiell))
- [#7407](https://github.com/facebook/docusaurus/pull/7407) docs: add Azure SWA as deployment option ([@nitya](https://github.com/nitya))
- [#7390](https://github.com/facebook/docusaurus/pull/7390) fix(website): use react-lite-youtube-embed for lazy YouTube video ([@matkoch](https://github.com/matkoch))

#### :wrench: Maintenance

- `create-docusaurus`, `docusaurus-logger`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-module-type-aliases`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-debug`, `docusaurus-plugin-google-gtag`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-plugin-sitemap`, `docusaurus-remark-plugin-npm2yarn`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-live-codeblock`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus`, `lqip-loader`, `stylelint-copyright`
- [#7477](https://github.com/facebook/docusaurus/pull/7477) refactor: fix a lot of errors in type-aware linting ([@Josh-Cena](https://github.com/Josh-Cena))
- `docusaurus-theme-classic`, `docusaurus-theme-translations`
- [#7447](https://github.com/facebook/docusaurus/pull/7447) refactor(theme-classic): migrate to tsc for build ([@Josh-Cena](https://github.com/Josh-Cena))
- `stylelint-copyright`
- [#7441](https://github.com/facebook/docusaurus/pull/7441) refactor(stylelint-copyright): migrate to TS ([@Josh-Cena](https://github.com/Josh-Cena))
- `docusaurus-cssnano-preset`
- [#7440](https://github.com/facebook/docusaurus/pull/7440) refactor(cssnano-preset): migrate to TS ([@Josh-Cena](https://github.com/Josh-Cena))
- `create-docusaurus`, `docusaurus-logger`, `docusaurus-mdx-loader`, `docusaurus-migrate`, `docusaurus-plugin-client-redirects`, `docusaurus-plugin-content-blog`, `docusaurus-plugin-content-docs`, `docusaurus-plugin-content-pages`, `docusaurus-plugin-debug`, `docusaurus-plugin-google-analytics`, `docusaurus-plugin-google-gtag`, `docusaurus-plugin-ideal-image`, `docusaurus-plugin-pwa`, `docusaurus-plugin-sitemap`, `docusaurus-preset-classic`, `docusaurus-remark-plugin-npm2yarn`, `docusaurus-theme-classic`, `docusaurus-theme-common`, `docusaurus-theme-live-codeblock`, `docusaurus-theme-search-algolia`, `docusaurus-theme-translations`, `docusaurus-utils-common`, `docusaurus-utils-validation`, `docusaurus-utils`, `docusaurus`, `eslint-plugin`, `lqip-loader`
- [#7437](https://github.com/facebook/docusaurus/pull/7437) refactor: use TS project references instead of running tsc multiple times ([@Josh-Cena](https://github.com/Josh-Cena))
- `docusaurus-plugin-pwa`
- [#7421](https://github.com/facebook/docusaurus/pull/7421) refactor(pwa): migrate client modules to TS ([@Josh-Cena](https://github.com/Josh-Cena))
- `docusaurus-theme-classic`
- [#7415](https://github.com/facebook/docusaurus/pull/7415) refactor(theme-classic): always collocate stylesheets with components in one folder ([@Josh-Cena](https://github.com/Josh-Cena))
- `docusaurus`
- [#7405](https://github.com/facebook/docusaurus/pull/7405) refactor(core): properly code-split NotFound page ([@Josh-Cena](https://github.com/Josh-Cena))

#### Committers: 23

- Akara ([@Messiahhh](https://github.com/Messiahhh))
- Benjamin Diolez ([@BenDz](https://github.com/BenDz))
- Charles Korn ([@charleskorn](https://github.com/charleskorn))
- Designatory ([@Designatory](https://github.com/Designatory))
- Forresst ([@forresst](https://github.com/forresst))
- Ggicci ([@ggicci](https://github.com/ggicci))
- James ([@Zamiell](https://github.com/Zamiell))
- Jan Peer Stöcklmair ([@JPeer264](https://github.com/JPeer264))
- Jeremy ([@jrmyw92](https://github.com/jrmyw92))
- Joshua Chen ([@Josh-Cena](https://github.com/Josh-Cena))
- Junjie ([@junjieweb](https://github.com/junjieweb))
- Lane Goolsby ([@lanegoolsby](https://github.com/lanegoolsby))
- Massoud Maboudi ([@massoudmaboudi](https://github.com/massoudmaboudi))
- Matthias Koch ([@matkoch](https://github.com/matkoch))
- Michael Hughes ([@mhughes2k](https://github.com/mhughes2k))
- Ngô Quốc Đạt ([@datlechin](https://github.com/datlechin))
- Nitya Narasimhan ([@nitya](https://github.com/nitya))
- Oluwatobi Sofela ([@oluwatobiss](https://github.com/oluwatobiss))
- Ori Shalom ([@ori-shalom](https://github.com/ori-shalom))
- Pranab Das ([@pranabdas](https://github.com/pranabdas))
- Rui Peres ([@RuiAAPeres](https://github.com/RuiAAPeres))
- Sébastien Lorber ([@slorber](https://github.com/slorber))
- 凱恩 Kane ([@Gary50613](https://github.com/Gary50613))

## 2.0.0-beta.20 (2022-05-05)

#### :bug: Bug Fix
Expand Down
20 changes: 9 additions & 11 deletions __tests__/validate-package-json.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,15 @@ describe('packages', () => {
packageJsonFile.content.name?.startsWith('@'),
)
.forEach((packageJsonFile) => {
if (packageJsonFile) {
// Unfortunately jest custom message do not exist in loops,
// so using an exception instead to show failing package file
// (see https://github.com/facebook/jest/issues/3293)
// expect(packageJsonFile.content.publishConfig?.access)
// .toEqual('public');
if (packageJsonFile.content.publishConfig?.access !== 'public') {
throw new Error(
`Package ${packageJsonFile.file} does not have publishConfig.access: 'public'`,
);
}
// Unfortunately jest custom message do not exist in loops,
// so using an exception instead to show failing package file
// (see https://github.com/facebook/jest/issues/3293)
// expect(packageJsonFile.content.publishConfig?.access)
// .toEqual('public');
if (packageJsonFile.content.publishConfig?.access !== 'public') {
throw new Error(
`Package ${packageJsonFile.file} does not have publishConfig.access: 'public'`,
);
}
});
});
Expand Down
5 changes: 2 additions & 3 deletions admin/new.docusaurus.io/functions/codesandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
import {createPlaygroundResponse} from '../functionUtils/playgroundUtils';
import type {Handler} from '@netlify/functions';

export const handler: Handler = async function handler() {
return createPlaygroundResponse('codesandbox');
};
export const handler: Handler = () =>
Promise.resolve(createPlaygroundResponse('codesandbox'));
Loading

0 comments on commit 062348e

Please sign in to comment.