Commit Graph

370 Commits

Author SHA1 Message Date
Sébastien Lorber fb172dc4e6
misc: more issue template improvements (#4994) 2021-06-17 12:04:31 +02:00
Lucas Correia 34411e12e5
fix(v2): truncate docuhash return value in order to avoid ERRNAMETOOLONG error (#4899)
* fix: truncate docuhash return value in order to avoid ERRNAMETOOLONG error

* chore: add deep file path test page to website

* refactor: reorganize docuHash/pathUtils code and tests

* chore: git support longpaths on v2 windows tests workflow

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-06-15 18:39:06 +02:00
Sébastien Lorber b835aecaec
chore: removal of Docusaurus v1 code from master (it is now available on docusaurus-v1 branch) (#4902) 2021-06-10 10:54:07 +02:00
Sébastien Lorber 6fe7c0cd6f
fix(v2): use yarn install --frozen-lockfile on CI 2021-06-09 15:18:07 +02:00
Sébastien Lorber f0d4d8dfc7
chore: fail CI if yarn.lock is modified on install (#4897) 2021-06-03 14:56:22 +02:00
Sébastien Lorber f35dc6938b
misc: issue template config typo (#4889) 2021-06-02 15:39:53 +02:00
Sébastien Lorber 8298b249e7
misc: add github issue template config (#4886)
* Add issue template config, use contact links for questions

* Add issue template config, use contact links for questions

* Update config.yml

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2021-06-02 15:27:18 +02:00
Alexey Pyltsyn 1afb0dc219
misc: improve bug report issue template (#4878)
* misc: improve bug report issue template

* Update bug.md

* Apply suggestions from code review

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/bug.md

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Update .github/ISSUE_TEMPLATE/bug.md

Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>

* Update bug.md

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com>
2021-06-02 11:36:45 +02:00
Reece Dunham 05e7250c08
feat(v2): Webpack 5, PostCSS 8 (#4089)
* Initial webpack 5 work

* It works on my machine (lol)

* Committing a bit more work

* It works - sorta

* Update packages/docusaurus/package.json

* at least fix prettier /shrug

* making more progress. build should work now, css stuff is still a bit broken

* Terser things

Signed-off-by: Reece Dunham <me@rdil.rocks>

* Working on things

* Vendor webpack

* Repair chunks, and tests

* Rerun prettier

* Re-add client prefetching

* Update snapshots

* Update snapshots

* I hope this works

* Remove redundant dev server code

* relock

* Trying to reduce memory usage and fix things

* Dead code elim

* Search bar works!!!

* Prefetching should work again

* lock

* ts issue

* Repair snapshot

* Run prettier

* Fix the CI for now

* fix lint-prettier

* clean-css works, now for the other one

* Fix lockfile

* Fixes prettier

* Other css minification works!!!

* Add clean-css options, fix webpack versions

Signed-off-by: Reece Dunham <me@rdil.rocks>

* Fix tests and several of the webpack loaders

Signed-off-by: Reece Dunham <me@rdil.rocks>

* Re-add support for simple css minifier

* Update other related dependencies

* Fix lockfile

* Dev server fixups

Signed-off-by: Reece Dunham <me@rdil.rocks>

* Simplify css things

* Update webpack, try with postcss 7

* Other cssnano repairs

* fix lockfile

* Clean up the babel preset

* Fix lockfile

* Bump RL SSR version

* Fix the build errors

* Lockfile fix

* It works again

* webpack 5 should close compiler after run

* add proper webpack5 persistent caching config

* upgrade webpack deps again

* reduce build perf timeouts to avoid build time regressions

* test if incremental build can run on netlify

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* test

* test

* test

* test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* fix existsSync() calls

* replace @ts-nocheck by a temporary Webpack type

* replace @ts-nocheck by a temporary Webpack type

* replace @ts-nocheck by a temporary Webpack type

* migrate existing stats.warningsFilter to config.ignoreWarnings

* remove stats from postBuild lifecycle data doc, as it is likely unused (we'll add it back if someone ask for it)

* improve build.ts TS issues + move some sync code to async

* cleanup TS of start.ts

* fix TS error

* fix TS issues

* fix TS issues

* fix ts error

* netlify test

* netlify test

* netlify test

* netlify test

* netlify test

* script cleanup

* script cleanup

* re-enable @typescript-eslint/ban-ts-comment

* Deprecate getCacheLoader / getBabelLoader but keep retrocompatibility

* useless TS

* fix and comment gca(chunkName) prefetching function

* remove deprecated mainTemplate.requireFn

* temporarily use react-loadable-ssr-addon-v5-slorber until PR merged: https://github.com/facebook/docusaurus/pull/4089

* comment unsafeCache option

* add explicit and more precise webpack targets

* splitChunks, use new type: "css/mini-extract" as it seems recommended for webpack 5

* webpack error handling:
- log error.details as documented
- keep using react-dev-utils/formatWebpackMessages for now

* fix webpack5 warnings for evalSourceMapMiddleware.js

* typo

* rename webpackHotDevClient

* make all modifications of react-dev-utils explicit with a comment

* revert LogPlugin adapter

* loader-utils update

* add useful share cache comment

* add useful comments regarding the null-loader used in SSR for css files

* upgrade webpack-merge in a retrocompatible way

* use MiniCssExtractPlugin.emit false as recommended

* use @docusaurus/responsive-loader

* revert MiniCssExtractPlugin esModule: false change

* add link to PR for custom CleanWebpackPlugin

* pwa: add fallback to env variable or webpack 5 fails to build

* upgrade to CssMinimizerPlugin 2.0

* only build en locale for windows tests

* line breaks between errors

* add useful comment

* Fix e2e tests with Yarn2 not finding new init template dependencies

* fix bad import

* disable browserslist target as webpack already tries to use browserlists if a config is found, and it is a problem for existing sites

* webpack5 TS fixes

* fix getMinimizer order (even if it does not work yet)

* update postcss to v8, fix cssnano minimizer errors

* add NavbarItem position to types (useful for QuestDB site upgrade to Webpack5)

* add webpack cache env variable to reduce risk of webpack 5 adoption

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-04-30 18:06:53 +02:00
Sébastien Lorber 8119de105a
chore(v2): do not build all locales when monitoring build time perf (#4611) 2021-04-14 09:28:38 +02:00
Sébastien Lorber f7614081dd
ci(v2): fail CI if build takes too much time (#4516)
* remove the .cache folder so that it removes both webpack cache-loader-v4/persistent-cache-v5 + webpack terser cache

* Add GH action to track build time perf with a timeout

* Add GH action to track build time perf with a timeout
2021-03-25 17:30:49 +01:00
Armano 88a48a072a
ci: enable yarn install cache (#4486)
* test: enable yarn install cache

* ci: correct cache key

* ci: update caching to use bahmutov/npm-install
2021-03-25 16:29:32 +01:00
Armano 839d9d70ba
ci: change default actions timeout from 6h to 30m (#4508) 2021-03-24 12:24:44 +01:00
Sébastien Lorber acc92461b0
chore: fix GH actions lint problem matchers issue in PR (#4471) 2021-03-19 18:53:46 +01:00
Sébastien Lorber 5543f09ed1
chore: json files should be linted (#4462) 2021-03-18 19:39:50 +01:00
Sébastien Lorber 3422f80a9a
chore: simplify CI setup (#4447)
* improve ci

* improve ci

* use actions/setup-node@v2 everywhere

* run pwd for test

* debug gh action

* debug glob CI issue?

* Separate v1/v2 tests due to shell conflict

* cleanup

* test v1 change

* circleci fix

* fix test docusaurus v1 paths

* Refactor CI script names and use paths to filter  actions from running unnecessary

* fix lighthouse url

* v1 tests runInBand

* try to fix v1 tests race conditions

* change rootDir for v1 tests

* minor CI improvements
2021-03-18 17:40:28 +01:00
Long Ho 1078341b22
refactor(v2): i18n cleanups / refactors (#4405)
* chore: fix various intl stuff
- remove intl-locales-supported & intl since they're deprecated and only
needed for IE11
- add new polyfills for node 12
- clean up babel intl extractor
- reset jest test timezone to UTC so it passes even for East Coast
contributor

* chore: change build to include Node 14

* docs: update i18n reqs
2021-03-15 18:02:53 +01:00
Sébastien Lorber 4dad3bf96b
misc: restore build size bot (#4337)
* restore build size bot

* update
2021-03-03 16:36:40 +01:00
Yangshun Tay 572746d65f
chore: delete build size bot (#4334)
We've found a vulnerability in the way we configured this action. See https://securitylab.github.com/research/github-actions-preventing-pwn-requests
2021-03-03 18:54:27 +08:00
Sébastien Lorber db7a3482f4
chore(v2): Fix build size bot (#4248)
* Fix build size bot

* use compression: 'none'
2021-02-19 10:44:06 +01:00
Alexey Pyltsyn f13448d5e1
chore(v2): upgrade dependencies + require Node 12 (#4223)
* chore(v2): upgrade dependencies

* Set minimum Node.js version to 12.13

* Fix test

* Upgrade copy-text-to-clipboard

* Bump Node versions

* Update .nvmrc

* mark cacheTime as forbidded field

* Downgrade jest to v25.2.7

* Increase Node version for Windows CI

* Test fix

* Attempt to fix Windows CI

* Downgrade execa

* fix async test errors

* Upgrade execa

Co-authored-by: slorber <lorber.sebastien@gmail.com>
2021-02-18 15:12:42 +01:00
Sébastien Lorber ffb2d29366
chore(v2): fix build-size bot again (#4159) 2021-02-02 18:46:22 +01:00
Sébastien Lorber fe6b841642
chore(v2): fix build size bot monitoring of js/css assets (#4156)
* fix build-size bot monitoring

* fix build-size bot monitoring
2021-02-02 16:57:37 +01:00
Sébastien Lorber 458bf67484
docs(v2): Include new.docusaurus.io CodeSandbox in issue templates + README (#4058) 2021-01-18 19:40:27 +01:00
Sébastien Lorber 141d062c3b
chore(v2): fix windows Jest tests (#3959)
* test(v2): Fix docusaurus-utils tests for windows

* test(v2): Fix plugin-client-redirects test

- add the posixPath in writeRedirectsFiles.ts

* test(v2): Fix plugin-content-pages test

add posixPath in test and index

* test(v2): add window test configuration

 - add the window test configuration in nodejs-windows.yml

* test(v2): revert plugin-content-pages test fix

* test(v2): Fix mdx-loader/transformImage test

* test(v2): add cleanPath in transformImage test

* fix version path tests for windows

* make versionMetadata test work on Windows

* try to fix posix/win32 path issues

* attempt to fix windows test

* try to make source alias less win32 sensitive

* try to make source alias less win32 sensitive

* try to make source alias less win32 sensitive

* try to make source alias less win32 sensitive

* try to make source alias less win32 sensitive

* try to make source alias less win32 sensitive

* specific jest config for windows

* attempt to fix windows testing issue

* attempt to fix windows testing issue

* attempt to fix windows testing issue

* attempt to fix windows testing issue

* attempt to fix windows testing issue

* attempt to fix windows testing issue

* attempt to fix windows testing issue

* remove bad cleanPath fn

* try to fix windows tests

* try to fix windows tests

* blog: try to fix windows tests by using same logic as on docs plugin

* try to fix windows tests

* try to fix windows tests

* try to fix windows tests

* try to fix windows tests

* improve the Github CI setup for windows: make jobs run in parallel

* revert GH action change

Co-authored-by: Sachin Kumar Rajput <skr571999@gmail.com>
2020-12-28 19:50:12 +01:00
Sébastien Lorber 4dea2c0819
chore(ci): fix canary release filtering (#3907)
* checkout before using dorny filters

* add     runs-on: ubuntu-latest

* fix
2020-12-11 17:10:45 +01:00
Sébastien Lorber 358ef86edf
chore(ci): only publish @canary release if packages/** has changed 2020-12-11 16:37:58 +01:00
Bartosz Kaszubowski 9fd8a3c693
chore(ci): increase Lighthouse CI max_timeout (#3884) 2020-12-07 15:50:50 +01:00
Bartosz Kaszubowski 99e3ee796e
chore(ci): run V1 Build and Migration CLI tests conditionally on CI (#3863)
* chore(ci): run V1 Build and Migration CLI test conditionally on CI

* chore(ci): extend lighthouse timeout to 5 minutes

* chore(ci): attempt to speed up build size check

* chore(ci): use different build command in build size check

* chore(ci): use only one locale in build size report workflow

* chore(ci): fix quotes, move build-script param down
2020-12-02 20:19:28 +01:00
Sébastien Lorber e90749c6f8
fix(v2): to fix the canary release GH workflow (#3852)
* attempt to fix the canary release  GH workflow

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to fix canary-releases.yml

* attempt to make the canary workflow work again

* try to fix canary again

* try to fix canary again

* try to fix canary again
2020-12-02 20:15:12 +01:00
Bartosz Kaszubowski 3f07114758
chore(ci): reduce number of jobs, remove build from lighthouse pipeline (#3861) 2020-12-02 10:05:18 +01:00
Bartosz Kaszubowski 3e101f86b7
chore(ci): CI scripts cleanup, add Node 14 runs, bump checkout action (#3849)
* chore(ci): CI scripts cleanup, add Node 14 and 15 runs, bump checkout action

* chore(ci): attempt to fix Yarn v2 install

* chore(ci): another attempt to fix Yarn v2 install

* use local yarn-deduplicate

* move yarn config steps earlier

* remove localhost registry config

* revert changes, temporary remove lock update from postinstall

* revert to use Yarn v2 only for website build

* revert back localhost registry

* missing flag

* is it node 15 to blame?

* not running yarn v2 on workspace so lock update can be reverted
2020-12-01 16:22:03 +01:00
Sébastien Lorber 28a83d73e3
feat(v2): add automated canary releases (#3827)
* attempt to add automated canary releases

* fix canary releases workflow
2020-12-01 11:56:59 +01:00
Sébastien Lorber 764d1fd191
chore(v2): fix PRs not able to add lighthouse/buildsize comment from works (#3846)
https://github.blog/2020-08-03-github-actions-improvements-for-fork-and-pull-request-workflows/
2020-11-30 16:47:19 +01:00
Sarthak kundra bd62be93d9
feat(v2): Added Lighthouse CI to PR checks (#3761)
* added lighthouse CI

removed wait for Netlify action

corrected Netlify deploy urls

corrected sitename

corrected sitename

* removed bootstrap and blog-only urls

* upload results to public storage

* added lighthousesrc.json

* corrected configPath

* corrected robots-txt assertion

* corrected syntax for lighthousesrc

* tried different audit

* corrected all audits for lighthouse

* added is-crawlable audit to skip

* added lighthouse stats commit to action

* Fixed Lighthouse yml syntax

* Fixed lighthouse yml syntax(2)

* trying comment

* trying yaml syntax

* test logging

* trying to see a log

* logging....

* corrected audit step id

* Corrected token

* changed comment number from issue to PR

* trying different message

* corrected message

* added offline-start-url to skip audits

* added start-url to skip fields

* added offline-starts-url
2020-11-26 17:42:05 +01:00
Bartosz Kaszubowski 3ab9204ced
chore(internal): fix CI on merge after build size addition 2020-11-16 16:59:35 +01:00
Jainam Chirag Shah d05d703dad
chore(v2): add build size bot workflow Github CI workflow (#3744) 2020-11-16 15:32:04 +01:00
ylemkimon 9ff24d7da3
test(e2e): dogfood Yarn with enableGlobalCache (#3673)
* test(e2e): Yarn with enableGlobalCache

* Update e2e-test.yml

* Update e2e-test.yml
2020-11-02 18:21:03 +01:00
Yangshun Tay 35b6edb3f3
misc: update CODEOWNERS (#3511)
* misc: update CODEOWNERS

* Update CODEOWNERS

Co-authored-by: Alexey Pyltsyn <lex61rus@gmail.com>
2020-10-01 12:44:38 +02:00
Sébastien Lorber f6926039ec
chore(v2): windows, 3 yarn install attempts, to avoid most timeout failures? (#3260)c 2020-08-11 16:51:04 +02:00
Sébastien Lorber a0ef8939a1
chore(v2): ability to test the migration cli easily (#3113)
* ability to test the migration cli easily

* add node scripts to help test migration cli (locally + CI)

* add test for frontmatter quotify

* more tests for shouldQuotifyFrontMatter

* typo

* updated yarn lock
2020-07-24 15:07:24 +02:00
Anshul Goyal a78f703366
feat(v2): v1-v2 migration cli automate migration from v1 to v2 (#3015)
* add poc for migration tool

* fix version

* fix path

* fix some type error

* fix type errors

* fix commad

* delete package.lock.json

* ignore lib folder in eslint

* ignore lib in prettier

* fix missing version

* fix sidebar in next

* use primaey color

* fix navbar link

* fix footer

* sanatize front-matter for gray-matter

* add e2e test

* fixworkflow

* add unit test

* chore(v2): fix eslint error

* refactor(v2): use descriptive variable names

* refactor(v2): refactor createProjectStructure

* refactor(v2): refactor migrateDocusaurusProject

* refactor(v2): fix eslint errors

* fix(v2): fix mistake

* use path.join

* remove console.log

* try automate migrating md file to mdx

* fix types not found

* fix types

* remove unused fixture

* use package.json for version

* add support for pages

* add support

* sanitize fortmatter only in case of special character

* chore(v2): add color to dependencies

* feat(v2): initialize config with range of color and add logs

* chore(v2): add glob dependency

* fix(v2): fix color generation

* fix(v2): fix type issue

* feat(v2): add all unknown fields to customFields

* fix(v2): fix css mistake

* fix lerna

* fix(v2): fix github actions

* feat(v2): add option flag for migrating pages

* fix special character

* remove depulicate build

* fix test

* remove unwanted file

* fix frontmatter

* remove unused file

* rerun the test

* fix links

* feat(v2): filter out more fields from customFields

* feat(v2): filter out deprecated fields from customFields

* fix items

* fix types

* merge master

* revert docs

* fix doc

* fix broken link

* fix test

* test

* fix ci

* fix ci

* fix ci

* fix ci

* fix frontmatter

* log custom fields

Co-authored-by: teikjun <teikjunhci@gmail.com>
2020-07-24 12:52:16 +02:00
Sam Zhou cf5babd5c1
chore(v2): Add E2E test for yarn v2 (#3008)
* 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
2020-07-01 12:06:03 +02:00
Sam Zhou 592dca9196
chore(v2): Implement a simple E2E testing mechanism for `docusausus start` (#2950)
* chore(v2): Implement a simple E2E testing mechanism for `docusausus start`

* Detect compiler errors
2020-06-22 11:32:22 +02:00
Sam Zhou 1fdc8c5da1
chore(v2): Run E2E tests in CI (#2929) 2020-06-15 03:19:08 +08:00
Yangshun Tay 70f6023adf misc: update CODEOWNERS 2020-04-24 12:24:53 +08:00
Alexey Pyltsyn a869d5d705 misc: fix heading level in feature issue template 2020-03-29 17:37:52 +03:00
Alexey Pyltsyn 756c83aad8
Fix docs style (#2322) 2020-02-26 03:22:25 +03:00
Alexey Pyltsyn 9015e797e1
chore: add section about env to bug issue template (#2315) 2020-02-24 16:06:22 +08:00
Yangshun Tay a38125a718
chore: drop support for node <10.9 (#2207)
* drop node <10.9 on 2020

* misc: add nvmrc

Co-authored-by: Endi <endiliey@gmail.com>
2020-01-12 13:24:11 +08:00
Yangshun Tay 26fa885ef6
misc: do not disturb Endi (#2197) 2020-01-08 01:17:37 +08:00
Yangshun Tay 55e676cb25
misc: add command to run prettier on docs (#2102)
* misc: add command to run prettier on docs

* Fix GH issue template

* Fix tests

* Add prettier-docs command to precommit
2019-12-07 21:56:30 -08:00
Endi 8d24e31df4
Update nodejs-windows.yml
tweak for docusaurus build on v1 and v2
2019-12-07 10:27:10 +07:00
Endi 2b47dc66a3
Just use one node version 2019-12-07 10:19:43 +07:00
Endi 968844eac0
chore: add GitHub actions for v2 windows build 2019-12-07 10:16:01 +07:00
endiliey 3303257d78 chore: update codeowners 2019-11-21 00:37:40 +07:00
endiliey 1c8c8d04e8 chore: automatically add labels to issues 2019-11-13 19:55:20 +07:00
Eric Carboni b027db1b34 docs(v1): remove exclusive language (#1961)
* Initial commit to replace easy, easily, simple, just, of course

* Revert ordered list change
2019-11-11 14:06:54 -08:00
Yangshun Tay 9f6460fde0 misc: facebook/Docusaurus -> facebook/docusaurus 2019-10-12 01:11:34 -07:00
Yangshun Tay dc2a0eda0a
misc: add funding links 2019-05-25 22:54:15 -07:00
Yangshun Tay 1602b459da fix: update paths for monorepo 2019-03-23 21:53:32 -07:00
Endilie Yacop Sucipto 054416b730
chore: automate request for review on v2
Automate request for review on any pull request related to v2
https://blog.github.com/2017-07-06-introducing-code-owners/
2018-09-25 20:33:52 +08:00
Endilie Yacop Sucipto 39b77935c4
chore: add documentation issue template 2018-09-05 10:24:58 +08:00
Yangshun Tay 9f22dfa4fb Standardize issue templates 2018-07-06 01:04:41 -07:00
Endilie Yacop Sucipto 587509ec78 Better issue templates (#833)
* Use github template for new issue

* Update bug.md

* Update feature.md

* Update proposal.md

* Update question.md

* Update CONTRIBUTING.md
2018-07-05 22:55:18 -07:00
Joel Marcey 255fa40274
Add Docusaurus version to issue template 2018-04-24 10:25:07 -07:00
Joel Marcey e8bc81f985
Update ISSUE_TEMPLATE.md 2018-03-07 14:32:52 -08:00
Joel Marcey 7c98b9118c
Update PULL_REQUEST_TEMPLATE.md 2018-02-27 21:30:29 -08:00
Joel Marcey 8756ed44fc
Update ISSUE_TEMPLATE.md 2018-02-27 21:28:46 -08:00
Joel Marcey e655ac0f37 Add Issue and Pull request templates 2017-12-12 11:14:50 -08:00