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

downmerge from parent #1

Merged
merged 35 commits into from
Jul 8, 2020
Merged

downmerge from parent #1

merged 35 commits into from
Jul 8, 2020

Conversation

dpkg
Copy link
Owner

@dpkg dpkg commented Jul 8, 2020

Motivation

(Write your motivation here.)

Have you read the Contributing Guidelines on pull requests?

(Write your answer here.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

Related PRs

(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/facebook/docusaurus, and link to your PR here.)

SamChou19815 and others added 30 commits June 21, 2020 15:09
* chore(v2): Remove extraneous package-lock.json

* Empty commit to rerun tests
…tart` (#2950)

* chore(v2): Implement a simple E2E testing mechanism for `docusausus start`

* Detect compiler errors
* replace yup with joi

* update test snapshots with new  error messages
… plugins (#2943)

* add validation for blog plugin

* fix wrong default component

* fix test and add yup to package.json

* remove console.log

* add validation for classic theme and code block theme

* add yup to packages

* remove console.log

* fix build

* fix logo required

* replaced yup with joi

* fix test

* remove hapi from docusuars core

* replace joi with @hapi/joi

* fix eslint

* fix remark plugin type

* change remark plugin validation to match documentation

* move schema to it's own file

* allow unknown only on outer theme object

* fix type for schema type

* fix yarn.lock

* support both commonjs and ES modules

* add docs for new lifecycle method
* add plugin redirects production build note

* Update using-plugins.md

Co-authored-by: Yangshun Tay <[email protected]>
* feat(v2): Support swizzling TypeScript components

* Add tsc --noEmit to tsc script in theme-classic

Now everything can pass the type checker! (although still a lot of any)

* Add tsconfig and types.d.ts to website

Improve developer experience.

As an example, I converted NotFound to tsx

* Apply type annotation suggestions

* Do not fallback to `getThemePath` if getTypeScriptThemePath is undefined

* Fix tsc

* Add module declaration for @theme-original/*

* Move babel cli to root package.json
* Fix typo in markdown-features

The code needed to be in npm syntax in order to work with npm2yarn

* Update markdown-features.mdx

Co-authored-by: Sébastien Lorber <[email protected]>
* feat(v2): allow skipping build docs for next version

* Refactor

* Refactor

Co-authored-by: Sébastien Lorber <[email protected]>
…2955)

* feat: support for deletedDocs in siteConfig

fixes #2429

* docs: document deletedDocs option

* feat: allow array in deletedDocs config

* docs: clarify deletedDocs version formatting
* use joi for  validation

* fix theme validation

* add test for required fields

* format errors

* a little better format errors

* fix config file

* try to rerun action
* feat(v2): add option validation lifecycle method

* chore(v2): add dependencies

* chore(v2): add yup dependency

* feat(v2): add option validation for plugin-content-docs

* chore(v2): add facebook copyright

* refactor(v2): remove unused variable

* chore(v2): add dependencies

* chore(v2): add copyright

* fix(v2): use strict for option validation

* feat(v2): add option validation for plugin-content-pages

* feat(v2): add schema for plugin-google-analytics and plugin-google-gtag

* feat(v2): add option validation for plugin-sitemap

* chore(v2): add dependency for yup

* fix(v2): remove strict to allow normalization

* refactor(v2): refactor validate method

* feat(v2): modify existing tests

* feat(v2): add tests for plugin normalization

* style(v2): use a more descriptive filename for schema

* feat(v2): add normalization tests

* feat(v2): add more tests for option validation

* refactor(v2): remove unused code

* refactor(v2): remove unused code

* refactor(v2): refactor methods and types

* feat(v2): replace Yup with Joi

* fix(v2): fix plugin-content-docs schema

* feat(v2): modify tests for plugin-content-docs

* fix(v2): fix a typo

* refactor(v2): improve tests and refactor code

* feat(v2): support both commonjs and ES modules

* refactor(v2): refactor validateOption method

* style(v2): fix eslint errors and typo in types

* chore(v2): remove unused yup dependency

* style(v2): standardize naming across official plugins

* chore(v2): update test snapshots

* chore(v2): remove obsolete snapshots

* chore(v2): fix a typo and check test

* feat(v2): add validation for new field

* feat(v2): add test for new field
* feat(v2): use relative routes path in postBuild hook

* feat(v2): use relativeRoutesPath in other methods and modify tests

* fix(v2): fix D2 client redirects and tests

* feat(v2): add tests for relativeRoutesPaths

* fix(v2): fix some typos in configValidation

* fix(v2): fix an eslint warning and restart github action

* refactor(v2): create a removePrefix method

* refactor(v2): inline unnecessary method
* add simpleHash util

* refactor/split the routes generation logic + add route hash to avoid chunk conflicts

* minor fixes + fix tests

* fix comment typo
* refactor color mode system to enable all possibilities

* fix destructuring bug

* colorMode validation + deprecation + minor name changes + doc

* rename method noFlashColorMode

* fix doc wording

* docs wording

* docs wording

* re-enable theme config merging/normalization + colorMode fixes

* document theme normalization

* code review changes
* feat(v2): prompt user when default port is in use

* chore(v2): fixed eslint error

* fix(v2): removed portfinder from package

* fix(v2): removed irrelevant cra specific feature

* fix(v2): isolates feature and credits cra
* fix(v2): fix broken links on versions page

* fix(v2): fix broken link to remark and rehype
* chore(v2): Add E2E test for yarn v2

* Remove root node_modules to prevent them from accessible in e2e test

The purpose of e2e test is to ensure that the docusaurus inited website can stand on its own. The root node_modules remain accessible according to how node resolution works and it might interfere with the test. Remove them for safety.

* Add @mdx-js/react to docusaurus init templates
* add disableVersioning config to docs plugin

* fix test

* fix test
slorber and others added 5 commits July 1, 2020 19:06
…n asset types (#2994)

* Add some default asset loaders
Add webpack merge strategy feature to enable plugins to prepend some webpack configuration (like the ideal image plugin that should override the default image loader)

* Add documentation for using assets from markdown

* add path prefix for webpack file loader

* renaming

* document Merge strategies

* rename mergeStrategies -> mergeStrategy
* implement PWA plugin

* added pwa support for docusaurus website

* moved sw registration to client module

* moved compile function to webpack util

* build sw using webpack and render pwa popup

* implement @theme/PwaReloadPopup

* update website sw to use modules

* updated pwa readme

* fix header lint errors

* apply code formatting

* cache files only for mobile, saveData, or installed pwa

* added comments about clearing registrations

* fixed prettier error

* updated pwa README

* fix README JS

* move /blog => /blog/index.html logic to else branch

* add `alwaysPrecache` option

* updated docusaurus-plugin-pwa version

* added pwa to using-plugins.md

* review fixes

* re-disable restricted-globals to use self in service worker

* useless doc

* Update packages/docusaurus-plugin-pwa/README.md

Co-authored-by: Reece Dunham <[email protected]>

* Update packages/docusaurus-plugin-pwa/README.md

* update a bit pwa doc + minor refactors

* minor refactors + add workbox debug mode

* env PWA_ prefix

* typo

* minor refactor

* fix file output

* add serve:v2:ssl yarn command

* minor pwa fixes

* typo

* add dynamic import comment in SW

* comment

* let the PWA plugin implement its reload popup on his own

* pwa: add Joi options validation

* pwa plugin should have its own webpack/babel custom setup

* PWA:
- debug logs
- better SW params system
- offline mode activation strategies
- docs

* add pwa install gif

* pwa: popup -> reloadPopup + minor refactors

* fix process.env reading + better debug log

* minor fixes

* minor changes

* minor changes

Co-authored-by: slorber <[email protected]>
Co-authored-by: Sébastien Lorber <[email protected]>
Co-authored-by: Reece Dunham <[email protected]>
* add useBaseUrlUtils

* fix code highlighted lines
@dpkg dpkg merged commit 2a2bea9 into dpkg:master Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.