From 40fd731b74961d715f8b08e3b686124c7061c0f7 Mon Sep 17 00:00:00 2001 From: Juan Picado Date: Wed, 17 Aug 2022 20:20:16 +0200 Subject: [PATCH 1/7] test: improve e2e verdaccio configuration ``` lerna notice total files: 64 775 lerna notice 776 lerna ERR! E503 one of the uplinks is down, refuse to publish 777 error Command failed with exit code 1. 778 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 779 Error: Process completed with exit code 1. ``` --- admin/verdaccio.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/admin/verdaccio.yaml b/admin/verdaccio.yaml index 1e8c71c5a83e..dd72ade16c29 100644 --- a/admin/verdaccio.yaml +++ b/admin/verdaccio.yaml @@ -13,11 +13,21 @@ storage: ../storage +publish: + allow_offline: false + # A list of other known repositories we can talk to uplinks: npmjs: url: https://registry.npmjs.org/ packages: + '@docusaurus/*': + access: $all + publish: $all + '@*/*': + access: $all + publish: $authenticated + proxy: npmjs '**': # Allow all users (including non-authenticated users) to read and # publish all packages From 76b7fa1c5e111e675978d485e53054b53bbecbcf Mon Sep 17 00:00:00 2001 From: Juan Picado Date: Wed, 17 Aug 2022 20:28:14 +0200 Subject: [PATCH 2/7] chore: force e2e on this pr to be removed --- .github/workflows/tests-e2e.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 75d38f43b5cf..3e8523060461 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -12,15 +12,17 @@ on: - packages/** - tsconfig.json pull_request: - branches: - - main - - docusaurus-v** + # force E2E on PR for this PR (test) + # branches: + # - main + # - docusaurus-v** paths: - package.json - yarn.lock - jest.config.mjs - packages/** - tsconfig.json + - admin/verdaccio.yaml - .github/workflows/tests-e2e.yml concurrency: From 2d4306bc6e4f34d9bea43e317c49b70ef2b3d33d Mon Sep 17 00:00:00 2001 From: Juan Picado Date: Wed, 17 Aug 2022 20:35:29 +0200 Subject: [PATCH 3/7] chore: add small exception for external package --- admin/verdaccio.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/admin/verdaccio.yaml b/admin/verdaccio.yaml index dd72ade16c29..8656993aa65e 100644 --- a/admin/verdaccio.yaml +++ b/admin/verdaccio.yaml @@ -21,6 +21,10 @@ uplinks: npmjs: url: https://registry.npmjs.org/ packages: + '@docusaurus/react-loadable': + access: $all + publish: $all + proxy: npmjs '@docusaurus/*': access: $all publish: $all From 99d588c9345fe33bbc768ae72469cc1e7ad41edd Mon Sep 17 00:00:00 2001 From: Juan Picado Date: Wed, 17 Aug 2022 21:57:55 +0200 Subject: [PATCH 4/7] chore: improve docs on verdaccio config file --- admin/verdaccio.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/admin/verdaccio.yaml b/admin/verdaccio.yaml index 8656993aa65e..93934295c0d1 100644 --- a/admin/verdaccio.yaml +++ b/admin/verdaccio.yaml @@ -21,17 +21,21 @@ uplinks: npmjs: url: https://registry.npmjs.org/ packages: + # this package is hosted outside the monorepo + # https://github.com/slorber/react-loadable + # thus requires to be fetched from npmjs '@docusaurus/react-loadable': access: $all publish: $all - proxy: npmjs + proxy: npmjs + # group and isolate all local packages, avoid being proxy from outside '@docusaurus/*': access: $all publish: $all '@*/*': - access: $all - publish: $authenticated - proxy: npmjs + access: $all + publish: $authenticated + proxy: npmjs '**': # Allow all users (including non-authenticated users) to read and # publish all packages From c2942f442f653b0f66a699841ed5506945249897 Mon Sep 17 00:00:00 2001 From: Juan Picado Date: Wed, 17 Aug 2022 22:10:26 +0200 Subject: [PATCH 5/7] chore: testing speed logging --- admin/verdaccio.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/admin/verdaccio.yaml b/admin/verdaccio.yaml index 93934295c0d1..816735384f80 100644 --- a/admin/verdaccio.yaml +++ b/admin/verdaccio.yaml @@ -13,6 +13,9 @@ storage: ../storage +## verdaccio does not allow to publish packages when the client is offline, to avoid +## errors on publish it is disabled +## https://verdaccio.org/docs/configuration#offline-publish publish: allow_offline: false @@ -47,7 +50,7 @@ packages: # Log settings logs: - - {type: stdout, format: pretty, level: http} + - {type: stdout, format: json, level: warn} # Fix 413 errors in e2e CI max_body_size: 1000mb From 4c8fe71cae3636ed68c0a11ea8d29fdee024e616 Mon Sep 17 00:00:00 2001 From: Juan Picado Date: Wed, 17 Aug 2022 22:26:30 +0200 Subject: [PATCH 6/7] chore: restore e2e configuration --- .github/workflows/tests-e2e.yml | 7 +++---- admin/verdaccio.yaml | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests-e2e.yml b/.github/workflows/tests-e2e.yml index 3e8523060461..c774e46df60b 100644 --- a/.github/workflows/tests-e2e.yml +++ b/.github/workflows/tests-e2e.yml @@ -12,10 +12,9 @@ on: - packages/** - tsconfig.json pull_request: - # force E2E on PR for this PR (test) - # branches: - # - main - # - docusaurus-v** + branches: + - main + - docusaurus-v** paths: - package.json - yarn.lock diff --git a/admin/verdaccio.yaml b/admin/verdaccio.yaml index 816735384f80..72e3fa1cad3a 100644 --- a/admin/verdaccio.yaml +++ b/admin/verdaccio.yaml @@ -50,7 +50,7 @@ packages: # Log settings logs: - - {type: stdout, format: json, level: warn} + - {type: stdout, format: pretty, level: http} # Fix 413 errors in e2e CI max_body_size: 1000mb From 024dd81adbee7680d8dfba3e05bd08a4ec49daba Mon Sep 17 00:00:00 2001 From: Joshua Chen Date: Thu, 18 Aug 2022 14:18:25 +0800 Subject: [PATCH 7/7] Minor changes --- admin/verdaccio.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/admin/verdaccio.yaml b/admin/verdaccio.yaml index 72e3fa1cad3a..bd49be44f15e 100644 --- a/admin/verdaccio.yaml +++ b/admin/verdaccio.yaml @@ -13,9 +13,9 @@ storage: ../storage -## verdaccio does not allow to publish packages when the client is offline, to avoid -## errors on publish it is disabled -## https://verdaccio.org/docs/configuration#offline-publish +# Verdaccio does not allow to publish packages when the client is offline, to avoid +# errors on publish +# https://verdaccio.org/docs/configuration#offline-publish publish: allow_offline: false @@ -24,14 +24,12 @@ uplinks: npmjs: url: https://registry.npmjs.org/ packages: - # this package is hosted outside the monorepo - # https://github.com/slorber/react-loadable - # thus requires to be fetched from npmjs + # Forked packages need to be fetched from npm '@docusaurus/react-loadable': access: $all publish: $all proxy: npmjs - # group and isolate all local packages, avoid being proxy from outside + # Group and isolate all local packages, avoid being proxy from outside '@docusaurus/*': access: $all publish: $all