1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-24 21:15:51 +01:00

feat!: using new plugin loader (#4097)

* feat!: using new plugin loader

Already implemented here https://github.com/verdaccio/verdaccio/pull/3370

* format

* Update index.ts

* update ci

* fix workflow

* Update e2e-angular-cli-workflow.yml

* Update e2e-jest-workflow.yml

* ci

* test

* Create e2e-audit-workflow.yml

* Create e2e-next-cli-workflow.yml

* Delete e2e-next-cli-workflow.yml

* chore: replace storage plugin loader

* Update local-storage.spec.ts

* remove cache

* auth plugin loader

* format
This commit is contained in:
Juan Picado 2023-10-29 18:11:41 +01:00 committed by GitHub
parent 920ad82af4
commit 8a8a3307a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1225 changed files with 428 additions and 25963 deletions

@ -9,6 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# only suported versions defined at https://nodejs.org/en/about/previous-releases
node_version: [18, 20, 21]
runs-on: ubuntu-latest

@ -1,49 +1,10 @@
on:
schedule:
- cron: '0 3 * * 5'
pull_request:
branches:
- '**'
name: 'E2E Angular CLI with verdaccio'
jobs:
npm:
name: 'npm6:angular example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest npm'
run: npm i -g npm@latest-6
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
echo "registry=http://localhost:4873" > ~/.npmrc
npm config set loglevel="http"
npm config set fetch-retries="5"
npm config set fetch-retry-factor="50"
npm config set fetch-retry-mintimeout="20000"
npm config set fetch-retry-maxtimeout="80000"
npm install -g @angular/cli
ng new verdaccio-angular --interactive=false
cd verdaccio-angular
npm install @angular-devkit/core@next @babel/preset-env @babel/core -D
npm run ng build --aot
npm7:
name: 'npm7:angular example'
runs-on: ubuntu-latest
@ -129,6 +90,8 @@ jobs:
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest npm 9'
run: npm i -g npm@next-9
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
@ -149,6 +112,42 @@ jobs:
npm install -g @angular/cli
ng new verdaccio-angular --interactive=false
cd verdaccio-angular
npm install @angular-devkit/core@next @babel/preset-env @babel/core -D
npm run ng build --aot
npm10:
name: 'npm10:angular example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest npm 10'
run: npm i -g npm@next-10
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
echo "registry=http://localhost:4873" > ~/.npmrc
npm config set loglevel="info"
npm config set fetch-retries="5"
npm config set fetch-retry-factor="50"
npm config set fetch-retry-mintimeout="20000"
npm config set fetch-retry-maxtimeout="80000"
npm install -g @angular/cli
ng new verdaccio-angular --interactive=false
cd verdaccio-angular
npm install @angular-devkit/core@next @babel/preset-env @babel/core -D

@ -0,0 +1,34 @@
on:
pull_request:
branches:
- '**'
name: 'Plugin Audit E2E'
jobs:
npm10:
name: 'npm10:audit example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest npm 10'
run: npm i -g npm@next-10
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
npm init --yes
npm install next --registry http://localhost:4873 --loglevel info
npm audit

@ -1,47 +1,10 @@
on:
schedule:
- cron: '0 3 * * 5'
pull_request:
branches:
- '**'
name: 'E2E Gatsby.js CLI with verdaccio'
jobs:
npm6:
name: 'npm6:gatsby example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install npm 6'
run: npm i -g npm@latest-6
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
echo "registry=http://localhost:4873
loglevel="warn"
fetch-retries=10
fetch-retry-factor=2
fetch-retry-mintimeout=10000
fetch-retry-maxtimeout=80000" > ~/.npmrc
npm config list
npm i -g gatsby@4.24.7
gatsby new my-gatsby
cd my-gatsby
npm run build
npm9:
name: 'npm9:gatsby example'
runs-on: ubuntu-latest
@ -54,7 +17,7 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: 'install npm 9'
run: npm i -g npm@9.4.2
run: npm i -g npm@next-9
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
@ -67,13 +30,48 @@ jobs:
run: |
source scripts/e2e-setup-ci.sh
echo "registry=http://localhost:4873
loglevel="warn"
loglevel="info"
fetch-retries=10
fetch-retry-factor=2
fetch-retry-mintimeout=10000
fetch-retry-maxtimeout=80000" > ~/.npmrc
npm config list
npm i -g gatsby@5.6.0
npm i -g gatsby@latest
gatsby new my-gatsby
cd my-gatsby
npm run build
npm10:
name: 'npm10:gatsby example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install npm 10'
run: npm i -g npm@next-10
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
echo "registry=http://localhost:4873
loglevel="info"
fetch-retries=10
fetch-retry-factor=2
fetch-retry-mintimeout=10000
fetch-retry-maxtimeout=80000" > ~/.npmrc
npm config list
npm i -g gatsby@latest
gatsby new my-gatsby
cd my-gatsby
npm run build

@ -1,6 +1,4 @@
on:
schedule:
- cron: '0 3 * * 5'
pull_request:
branches:
- '**'
@ -72,39 +70,6 @@ jobs:
yarn add left-pad
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
npm:
name: 'npm:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest npm'
run: npm i -g npm@latest-6
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
npm init --force
npm install jest@29.5.0 --registry http://localhost:4873
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js
yarn add left-pad --registry http://localhost:4873 --verbose
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
npm8:
name: 'npm8:jest example'
runs-on: ubuntu-latest
@ -129,8 +94,8 @@ jobs:
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
npm init --force
npm install jest@29.5.0 --registry http://localhost:4873
npm init --yes
npm install jest@29.5.0 --registry http://localhost:4873 --loglevel info
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js
@ -149,6 +114,8 @@ jobs:
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest npm 9'
run: npm i -g npm@next-9
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
@ -160,8 +127,8 @@ jobs:
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
npm init --force
npm install jest@29.4.2 --registry http://localhost:4873
npm init --yes
npm install jest@29.4.2 --registry http://localhost:4873 --loglevel info
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js
@ -169,9 +136,41 @@ jobs:
yarn add left-pad --registry http://localhost:4873 --verbose
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
npm10:
name: 'npm10:jest example'
runs-on: ubuntu-latest
pnpm6:
name: 'pnpm:latest-6:jest example'
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- name: 'Use Node.js'
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version-file: '.nvmrc'
- name: 'install latest npm 10'
run: npm i -g npm@next-10
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
npm init --yes
npm install jest@29.4.2 --registry http://localhost:4873 --loglevel info
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js
yarn add left-pad --registry http://localhost:4873 --verbose
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
pnpm8:
name: 'pnpm8:jest example'
runs-on: ubuntu-latest
steps:
@ -182,7 +181,7 @@ jobs:
with:
node-version-file: '.nvmrc'
- name: 'install latest pnpm'
run: npm i -g pnpm@latest-6
run: npm i -g pnpm@latest-8
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
@ -194,8 +193,8 @@ jobs:
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
pnpm init --force
pnpm install jest@29.5.0 --registry http://localhost:4873
pnpm init
pnpm install jest@29.5.0 --registry http://localhost:4873 --loglevel info
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js
@ -228,7 +227,7 @@ jobs:
run: |
source scripts/e2e-setup-ci.sh
pnpm init
pnpm install jest@29.5.0 --registry http://localhost:4873
pnpm install jest@29.5.0 --registry http://localhost:4873 --loglevel info
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js

22704
.pnp.cjs generated

File diff suppressed because one or more lines are too long

2053
.pnp.loader.mjs generated

File diff suppressed because it is too large Load Diff

@ -5,7 +5,6 @@
"recommendations": [
"EditorConfig.EditorConfig",
"dbaeumer.vscode-eslint",
"arcanis.vscode-zipfs",
"esbenp.prettier-vscode"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.

@ -1,11 +1,5 @@
// Place your settings in this file to overwrite default and user settings.
{
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.tsserver.watchOptions": {
"watchFile": "useFsEventsOnParentDirectory",
"watchDirectory": "useFsEvents"
},
"eslint.nodePath": ".yarn/sdks",
"eslint.validate": [
"javascript",
"typescript"
@ -15,10 +9,7 @@
"**/coverage": true
},
"editor.formatOnSave": true,
"typescript.enablePromptUseWorkspaceTsdk": true,
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
}
}

Some files were not shown because too many files have changed in this diff Show More