Compare commits

...

124 Commits

Author SHA1 Message Date
Juan Picado
0e58b9927a chore: update versions (next-8) (#4999)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-15 09:43:25 +01:00
Marc Bernard
899504143a fix(middleware): allow content-type with charset (#4990)
* fix(middleware): allow content-type with charset

* Add test
2024-12-12 21:37:46 +01:00
verdacciobot
23f893453c chore: updated static data 2024-12-12 00:16:58 +00:00
Juan Picado
ca4dc04aae chore: update versions (next-8) (#4951)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-11 22:13:46 +01:00
Marc Bernard
0225c80663 chore(ui): vitest follow-ups (#4993)
* chore(ui): vitest follow-ups

* markdown plugin
2024-12-11 21:12:49 +01:00
Marc Bernard
15dddbe9e4 chore(logger): avoid message if level remains the same (#4991) 2024-12-11 21:00:08 +01:00
Juan Picado
dee09011cb [Snyk] Security upgrade express from 4.21.1 to 4.21.2 (#4985)
* fix: packages/web/package.json to reduce vulnerabilities

The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-PATHTOREGEXP-8482416

* fix

* test

---------

Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2024-12-11 20:46:11 +01:00
Marc Bernard
ff78ea6911 chore: local storage debug messages (#4992) 2024-12-11 19:40:02 +01:00
verdacciobot
bb86c5693a chore: updated static data 2024-12-09 00:18:17 +00:00
renovate[bot]
5113eebbd3 fix(deps): update dependency abortcontroller-polyfill to v1.7.6 (#4980) 2024-12-08 10:22:39 +01:00
renovate[bot]
6cfec17a10 fix(deps): update dependency compression to v1.7.5 (master) (#4981) 2024-12-07 23:42:22 +01:00
renovate[bot]
51e571a1ba chore(deps): update dependency @crowdin/cli to v4.4.1 (master) (#4979)
* chore(deps): update dependency @crowdin/cli to v4.4.1

* clean up

* test

* missing package migrate

* clean up

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Juan Picado <juanpicado19@gmail.com>
2024-12-07 22:35:48 +01:00
Juan Picado
4f6609a072 final migration to vitest remove jest (#4978)
* migrate vitest ui-components

* migrate vitest ui-components

* fix e2e

* cleanup
2024-12-07 21:48:32 +01:00
verdacciobot
ebede07eb9 chore: updated static data 2024-12-05 00:17:04 +00:00
renovate[bot]
4af6b86094 chore(deps): update dependency @changesets/get-dependents-graph to v2.1.2 (#4975)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-04 12:11:22 +01:00
renovate[bot]
14bb4f551f chore(deps): update dependency @changesets/cli to v2.27.10 (#4974)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-03 10:13:14 +01:00
dependabot[bot]
8e05ad2351 chore(deps): bump github/codeql-action from 3.27.0 to 3.27.5 (#4973)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.0 to 3.27.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](662472033e...f09c1c0a94)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 10:13:01 +01:00
Marc Bernard
5b7a3e6843 docs: fix security jwt config example (#4976) 2024-12-03 10:05:13 +01:00
verdacciobot
beffd788a5 chore: updated static data 2024-12-02 01:14:39 +00:00
Marc Bernard
eca62597e8 fix: error E409 "username is already registered" (adduser) (#4957)
* fix: E409 username is already registered (adduser)

* update tests
2024-12-01 15:44:00 +01:00
Marc Bernard
ba71932523 chore(loader): fix types for plugin options (#4970)
* chore(loader): fix types for plugin options

* debug
2024-11-30 09:01:23 +01:00
Marc Bernard
6e344d0f48 chore(api): fix void return for some tests (#4969) 2024-11-30 00:23:47 +01:00
Marc Bernard
64a7fc0fc7 chore(core): typing, naming, and docs of parameters (#4971) 2024-11-29 18:08:59 +01:00
Marc Bernard
538bb8f3a6 feat: keep_readmes option when publishing packages (#4961) 2024-11-28 11:54:51 +01:00
Marc Bernard
3967a5280a chore: tweak error logging messages (#4966)
* chore: tweak error logging messages

* Update tricky-impalas-shake.md
2024-11-28 11:01:33 +01:00
Juan Picado
47e6ce9083 chore: reuse workflows configurations (#4965)
* build

test

test

test

Update action.yml

Update action.yml

test

test

Update action.yml

Update action.yml

Update action.yml

test

test

Update ci.yml

Update ci.yml

test

test

test

test

Update action.yml

test

Update ci.yml

Update e2e-ci.yml

test

* Update ci.yml

* Update plugin-generator-e2e.yaml

* test

* test

* test

* test

* Update e2e-ci.yml

* Update e2e-ui.yml

* test

* Update ci.yml

* Update ci.yml

* Update action.yml

* Update action.yml

* Update package.json

* Update static-data.yml

* Update static-data.yml

* Update website.yml

* test

* Update ui-components.yml

* Update ui-components.yml

* Update ui-components.yml
2024-11-28 10:53:05 +01:00
verdacciobot
ac1056025d chore: updated static data 2024-11-28 01:12:17 +00:00
Juan Picado
4b5d4f4b99 Update VERSIONS.md 2024-11-26 18:42:44 +01:00
Marc Bernard
03b5a15f28 chore: version details and history (#4935)
* chore: version details and history

* Update

* Remove 2.x, 3.x

* next-8

* npm next-8

* Deprecate 5.x

* Add helm charts
2024-11-26 08:07:29 +01:00
verdacciobot
b9ee19bc0a chore: updated static data 2024-11-25 00:17:00 +00:00
Marc Bernard
9041b0f9ad chore: add info to log when audit, htpasswd, theme are used (#4956)
* chore: add info to log when audit, htpasswd, theme are used

* fix

* fix

* fix logger
2024-11-24 14:01:24 +01:00
verdacciobot
4a6a921ead chore: updated static data 2024-11-21 00:16:35 +00:00
Juan Picado
7c5b80aed8 change neutrino to a safe link (#4962)
missing link

Co-Authored-By: Arti <59352535+artifishvr@users.noreply.github.com>
2024-11-20 21:54:14 +01:00
Arti
a501cd25bc change neutrino to a safe link (#4962) 2024-11-20 21:52:36 +01:00
Marc Bernard
42d5b05594 chore: avoid vitest warning (#4959) 2024-11-20 08:04:43 +01:00
Marc Bernard
2eebfec770 fix: readme prettier (#4955) 2024-11-18 20:58:48 +01:00
Juan Picado
3f3082877d Update README.md 2024-11-18 08:09:16 +01:00
verdacciobot
287d2a3c34 chore: updated static data 2024-11-18 00:17:10 +00:00
Juan Picado
5cbee6f57f fix: unpublish a package on storage package (#4937)
* fix: unpublish a package on storage package

fix: unpublish a package on storage package

fix unpublish e2e

* Update index.ts

* reuse cli e2e tests

* npm 10 migrated

* migrate tests

* migrate tests

* clean up

* Create hot-crews-live.md
2024-11-16 20:39:47 +01:00
Marc Bernard
b6ea32c435 chore: add error to log level enum (#4943) 2024-11-16 13:48:00 +01:00
Marc Bernard
4f5802c95d chore: add unpublish to package access config (#4941) 2024-11-16 13:20:13 +01:00
Marc Bernard
e308fbbf3a chore: move agent_options to config (#4942)
* chore: move agent_options to config

* changeset
2024-11-16 12:48:21 +01:00
Marc Bernard
35360c8bbe chore(deps): update version comments in actions (#4944) 2024-11-16 12:05:57 +01:00
Marc Bernard
80e4cb852e chore: add info to log when local storage is used (#4948) 2024-11-16 11:26:27 +01:00
Marc Bernard
b2339e2c16 chore(web): fix syntax of test files (#4949) 2024-11-16 11:19:15 +01:00
Marc Bernard
0cee514d8a chore(docs): add links to more articles (#4945)
* docs: add links to more articles

* Update
2024-11-16 10:44:03 +01:00
Marc Bernard
4adaa833ba chore: fix typedocs warnings (#4946) 2024-11-16 10:43:39 +01:00
Marc Bernard
a049bba201 chore(tests): temp folder naming (#4950) 2024-11-16 10:43:12 +01:00
Juan Picado
1d2f33c5bf chore: update versions (next-8) (#4903) 2024-11-14 19:55:45 +01:00
verdacciobot
caa3d005b2 chore: updated static data 2024-11-14 00:15:40 +00:00
verdacciobot
3d33bebb8f chore: updated static data 2024-11-11 00:16:13 +00:00
dependabot[bot]
53411dd77d chore(deps): bump github/codeql-action from 2.26.12 to 3.27.0 (#4927)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.26.12 to 3.27.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](4d85deb854...662472033e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-10 22:13:42 +01:00
verdacciobot
bddf8e3e01 chore: updated static data 2024-11-07 00:15:38 +00:00
renovate[bot]
21c28dd4c8 chore(deps): update github/codeql-action digest to 6a89f57 (#4931)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-04 07:06:04 +01:00
verdacciobot
8172b34dac chore: updated static data 2024-11-04 00:16:51 +00:00
renovate[bot]
8a3b65ef2b chore(deps): update all linting dependencies (#4932) 2024-11-03 07:06:42 +01:00
dependabot[bot]
894ef902de chore(deps): bump actions/cache from 3.3.3 to 4.1.2 (#4926) 2024-11-02 12:01:14 +01:00
dependabot[bot]
0c613ad693 chore(deps): bump actions/upload-artifact from 3.1.3 to 4.4.3 (#4929) 2024-11-02 12:01:04 +01:00
dependabot[bot]
3755c0652a chore(deps): bump actions/setup-node from 4.0.4 to 4.1.0 (#4928)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4.0.4 to 4.1.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](0a44ba7841...39370e3970)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-02 11:38:10 +01:00
Marc Bernard
e3c55f008c chore: encode parts of URL (#4922) 2024-11-02 10:31:21 +01:00
dependabot[bot]
fa22fa340d chore(deps): bump actions/checkout from 4.2.0 to 4.2.2 (#4930) 2024-11-02 10:02:18 +01:00
verdacciobot
f0ba62af1f chore: updated static data 2024-10-31 00:16:07 +00:00
Marc Bernard
bb11a0391f chore: remove auth-always (#4921)
* chore: remove auth-always

* npmrc

* revert yarn1
2024-10-28 18:48:38 +01:00
Juan Picado
fce618afc9 Revert "chore: update pnpm and node (#4916)"
This reverts commit 3370bfa1ec.
2024-10-28 18:33:46 +01:00
Juan Picado
3370bfa1ec chore: update pnpm and node (#4916) 2024-10-28 18:29:55 +01:00
Marc Bernard
58e0d950df fix(middleware): error 404 when getting scoped tarballs (#4913)
* fix(middleware): error 404 when getting scoped tarballs

* Create mbt.yml

* Update mbt.yml

* Change to relative URL, constants, proxy url

* Split into make-url-relative.ts

* add debug
2024-10-28 07:39:23 +01:00
Marc Bernard
48aa89f651 chore: request header constants (#4920) 2024-10-28 07:22:15 +01:00
verdacciobot
027057c686 chore: updated static data 2024-10-28 00:16:57 +00:00
verdacciobot
cfd56ec724 chore: updated static data 2024-10-24 00:16:05 +00:00
verdacciobot
078cd6826f chore: updated static data 2024-10-21 00:16:41 +00:00
Juan Picado
e93d6a30a4 chore: vitest migration part 5 (#4914)
* migrate web package to vitest

* migrate node-api to vitest

* migrate file-locking vitest

* migrate cli

* remove jest from npm packages

* Create weak-cherries-serve.md

* update ci
2024-10-20 19:26:36 +02:00
renovate[bot]
f5f6e88d7a fix(deps): update dependency cookies to v0.9.1 (#4912) 2024-10-17 18:59:00 +02:00
verdacciobot
fb9e756f69 chore: updated static data 2024-10-17 00:15:54 +00:00
verdacciobot
626719befd chore: updated static data 2024-10-14 00:16:42 +00:00
Juan Picado
0cfb63829d chore: update snapshot config 2024-10-13 17:31:02 +02:00
renovate[bot]
f6344c08c8 chore(deps): update github/codeql-action digest to 4d85deb (#4879)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-13 17:16:38 +02:00
renovate[bot]
1a917221d6 fix(deps): update dependency express to v4.21.1 (#4906)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-13 11:49:57 +02:00
renovate[bot]
e219e7884e fix(deps): update dependency clipanion to v4.0.0-rc.4 (#4902) 2024-10-12 14:48:23 +02:00
Marc Bernard
1076a892e1 chore(middleware): fix syntax of test files (#4896) 2024-10-12 13:43:15 +02:00
Marc Bernard
2f6e74288b chore(website): update addons list (#4895) 2024-10-10 08:50:25 +02:00
verdacciobot
0d37aa3f7d chore: updated static data 2024-10-10 00:15:28 +00:00
Juan Picado
56d4230c8f chore: update versions (next-8) (#4870) 2024-10-08 08:30:39 +02:00
Marc Bernard
c4e88752fb chore(ui): replace react-json-view (#4892) 2024-10-08 07:51:23 +02:00
Marc Bernard
76dfcf1a66 fix: code scan issues (#4891) 2024-10-08 07:51:09 +02:00
Marc Bernard
409494aeb6 chore(ui): typing for Theme (#4890) 2024-10-08 07:51:02 +02:00
Juan Picado
124e5f2de7 chore: migrate htpasswd package vitest (#4889)
* migrate htpasswd package

* update versions

* Update htpasswd.passwords.test.ts
2024-10-07 08:28:30 +02:00
verdacciobot
51b0368c49 chore: updated static data 2024-10-07 00:16:17 +00:00
Marc Bernard
5731e88a99 fix: code scan issues (#4888) 2024-10-06 09:02:47 +02:00
Marc Bernard
9a057d1b62 chore(deps): update version comments in actions (#4887) 2024-10-05 18:40:07 +02:00
dependabot[bot]
255cabc790 chore(deps): bump actions/checkout from 3.6.0 to 4.2.0 (#4878)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](f43a0e5ff2...d632683dd7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-03 11:09:46 +02:00
renovate[bot]
30ac3a119f chore(deps): update all linting dependencies (#4880) 2024-10-03 09:11:51 +02:00
verdacciobot
df3bcb1457 chore: updated static data 2024-10-03 00:15:47 +00:00
dependabot[bot]
dbce1d5862 chore(deps): bump actions/setup-node from 2.5.2 to 4.0.4 (#4877)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.2 to 4.0.4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.5.2...0a44ba7841725637a19e28fa30b79a866c81b0a6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 22:22:01 +02:00
dependabot[bot]
4808b737cd chore(deps): bump github/codeql-action from 2.26.6 to 3.26.10 (#4876)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.26.6 to 3.26.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](be8b74c09c...e2b3eafc8d)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-01 22:21:36 +02:00
Marc Bernard
5bb81ebf91 fix(middleware): encoding of scoped package name (#4874)
* fix(middleware): encoding of scope package name

* Change order

* Test description

* debug

* Add to tests
2024-10-01 08:31:42 +02:00
Juan Picado
7902331894 Update SECURITY.md 2024-09-30 08:31:45 +02:00
verdacciobot
9b1583d36b chore: updated static data 2024-09-30 00:16:26 +00:00
Juan Picado
99a1af1c35 vitest migration more packages (#4872)
* migrate storage package

* migrate middleware package

* migrate auth-memory plugin
2024-09-29 16:03:29 +02:00
Juan Picado
4afca90e21 vitest migration some packages (#4871) 2024-09-29 12:47:10 +02:00
Marc Bernard
5cfbc1485d fix(store): add logging when requesting tarball (#4847)
* fix(api): error handling when requesting tarball

* add tarball test for scoped packages

* update changeset

* add logging for tarball requests

* Revert

* Update violet-boxes-float.md
2024-09-28 12:47:45 +02:00
Juan Picado
2f704a6445 chore: update install docs 2024-09-27 06:45:27 +02:00
Juan Picado
24cc01e90e Update crowdin.yaml 2024-09-26 23:13:52 +02:00
Juan Picado
a5ae8b5f82 chore: remove versioned docs 7.x
not longer need it
2024-09-26 23:00:18 +02:00
Juan Picado
11ce908fc6 Update crowdin.yaml 2024-09-26 21:56:25 +02:00
Juan Picado
14c1c829e8 chore: update website config 6.x 2024-09-26 21:05:10 +02:00
Juan Picado
100421624f chore: disable ga-IE temporary website 2024-09-26 21:02:19 +02:00
verdacciobot
80313897cb chore: updated static data 2024-09-26 00:15:15 +00:00
Juan Picado
1dc5cdffc3 chore: update versions (next-8) (#4840)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-09-25 23:20:07 +02:00
Marc Bernard
e85069010f fix(middleware): pass version to allow check (#4846)
* fix(middleware): pass version to allow check

* add tests
2024-09-25 23:13:31 +02:00
verdacciobot
a3cf3e7921 chore: updated static data 2024-09-23 00:15:56 +00:00
Juan Picado
234874ef6e Update x-smok-test-docker.yml 2024-09-22 18:42:17 +02:00
Juan Picado
87d4912066 chore: reuse workflows step 1 (#4852)
for x branches
2024-09-22 16:16:53 +02:00
Juan Picado
cd76d54c9a Update README.md 2024-09-21 18:02:20 +02:00
Juan Picado
72a65917c4 Update README.md 2024-09-21 06:14:02 +02:00
Juan Picado
5c65124fee Update README.md 2024-09-21 06:13:09 +02:00
verdacciobot
695c28b5f2 chore: updated static data 2024-09-19 00:15:17 +00:00
verdacciobot
418e159121 chore: updated static data 2024-09-16 00:15:56 +00:00
Juan Picado
4da9711fed chore: update pino dep 2024-09-15 22:18:21 +02:00
renovate[bot]
21be801c10 fix(deps): update dependency sonic-boom to v3.8.1 (#4841)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-15 22:16:46 +02:00
Juan Picado
6a8154cd62 Create long-eyes-drum.md 2024-09-15 13:46:12 +02:00
Juan Picado
dfe925c259 feat: update logger pino to latest (#4839)
* feat: update logger pino to latest

remove old logger package

* update engines

* Update package.json

* Update beige-lions-type.md
2024-09-15 13:32:50 +02:00
Juan Picado
6fac16fc4d chore: update renovate 2024-09-15 11:59:25 +02:00
Juan Picado
9e87ab49c6 chore: update docker ci settings 2024-09-15 08:34:34 +02:00
Juan Picado
63457e6f9e Update renovate.json 2024-09-12 23:20:35 +02:00
824 changed files with 11978 additions and 29782 deletions

View File

@@ -4,7 +4,7 @@
"@babel/env",
{
"targets": {
"node": 12
"node": 18
}
}
],

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/middleware': patch
---
fix(middleware): pass version to allow check

View File

@@ -7,7 +7,6 @@
'@verdaccio/file-locking': major
'verdaccio-htpasswd': major
'@verdaccio/ui-theme': major
'@verdaccio/logger-7': major
'verdaccio-memory': major
'@verdaccio/search-indexer': major
'@verdaccio/server': major
@@ -26,6 +25,7 @@
'verdaccio': major
'@verdaccio/url': major
'@verdaccio/node-api': major
'@verdaccio/web': major
'@verdaccio/loaders': major
'@verdaccio/config': major
'@verdaccio/search': major

View File

@@ -0,0 +1,7 @@
---
'@verdaccio/server': patch
'@verdaccio/middleware': patch
'@verdaccio/core': patch
---
chore: request header constants

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/logger-commons': patch
---
chore(logger): avoid message if level remains the same

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/types': patch
'@verdaccio/proxy': patch
---
chore: move agent_options to config

View File

@@ -12,6 +12,22 @@
"@verdaccio/ui-theme"
]
],
"ignoredPackages": [
"@verdaccio/test-cli-commons",
"@verdaccio/e2e-cli-npm6",
"@verdaccio/e2e-cli-npm7",
"@verdaccio/e2e-cli-npm8",
"@verdaccio/e2e-cli-npm9",
"@verdaccio/e2e-cli-npm10",
"@verdaccio/e2e-cli-npm-common",
"@verdaccio/e2e-cli-yarn1",
"@verdaccio/e2e-cli-yarn2",
"@verdaccio/e2e-cli-yarn3",
"@verdaccio/e2e-cli-yarn4",
"@verdaccio/e2e-cli-pnpm8",
"@verdaccio/e2e-cli-pnpm9",
"@verdaccio/e2e-cli-pnpm10"
],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch"

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/loaders': patch
'@verdaccio/config': patch
---
chore(loader): fix types for plugin options

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/core': patch
---
chore(core): typing, naming, and docs of parameters

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/web': patch
---
chore(web): fix syntax of test files

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/types': patch
---
chore: add `error` to log level enum

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/middleware': patch
---
fix(middleware): allow content-type with charset

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/local-storage': patch
'@verdaccio/store': patch
---
fix: code scan issues

View File

@@ -0,0 +1,8 @@
---
'@verdaccio/server': patch
'@verdaccio/store': patch
'@verdaccio/auth': patch
'@verdaccio/web': patch
---
chore: add info to log when audit, htpasswd, theme are used

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/auth': patch
'@verdaccio/api': patch
---
fix: E409 username is already registered (adduser)

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/types': patch
'@verdaccio/config': patch
---
chore: fix typedocs warnings

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/store': patch
---
chore: add info to log when local storage is used

View File

@@ -0,0 +1,5 @@
---
'verdaccio-htpasswd': patch
---
chore: add debug code to htpasswd package

View File

@@ -0,0 +1,9 @@
---
'@verdaccio/types': patch
'@verdaccio/core': patch
'verdaccio': patch
'@verdaccio/store': patch
'@verdaccio/api': patch
---
fix: unpublish a package on storage package

View File

@@ -0,0 +1,37 @@
---
'@verdaccio/api': minor
'@verdaccio/auth': minor
'@verdaccio/cli': minor
'@verdaccio/config': minor
'@verdaccio/core': minor
'@verdaccio/file-locking': minor
'@verdaccio/tarball': minor
'@verdaccio/types': minor
'@verdaccio/url': minor
'@verdaccio/hooks': minor
'@verdaccio/loaders': minor
'@verdaccio/logger': minor
'@verdaccio/logger-commons': minor
'@verdaccio/logger-prettify': minor
'@verdaccio/middleware': minor
'@verdaccio/node-api': minor
'verdaccio-audit': minor
'verdaccio-auth-memory': minor
'verdaccio-htpasswd': minor
'@verdaccio/local-storage': minor
'verdaccio-memory': minor
'@verdaccio/ui-theme': minor
'@verdaccio/proxy': minor
'@verdaccio/search': minor
'@verdaccio/search-indexer': minor
'@verdaccio/server': minor
'@verdaccio/signature': minor
'@verdaccio/store': minor
'generator-verdaccio-plugin': minor
'@verdaccio/ui-components': minor
'@verdaccio/utils': minor
'verdaccio': minor
'@verdaccio/web': minor
---
feat: update logger pino to latest

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/ui-theme': patch
'@verdaccio/ui-components': patch
---
chore(ui): vitest follow-ups

View File

@@ -0,0 +1,8 @@
---
'@verdaccio/api': patch
'@verdaccio/core': patch
'@verdaccio/middleware': patch
'@verdaccio/proxy': patch
---
fix(middleware): error 404 when getting scoped tarballs

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/middleware': patch
---
fix(middleware): encoding of scope package name

View File

@@ -26,7 +26,6 @@
"@verdaccio/hooks": "7.0.0",
"@verdaccio/loaders": "7.0.0",
"@verdaccio/logger": "7.0.0",
"@verdaccio/logger-7": "7.0.0",
"@verdaccio/logger-commons": "7.0.0",
"@verdaccio/logger-prettify": "7.0.0",
"@verdaccio/middleware": "7.0.0",
@@ -56,7 +55,45 @@
"@verdaccio/utils": "7.0.0",
"verdaccio": "7.0.0",
"@verdaccio/web": "7.0.0",
"@verdaccio/website": "6.0.0"
"@verdaccio/website": "6.0.0",
"@verdaccio/e2e-cli-npm-common": "1.0.0",
"@verdaccio/e2e-cli-pnpm-common": "1.0.2-next-8.0",
"@verdaccio/e2e-cli-pnpm10": "1.0.0"
},
"changesets": ["beige-lions-type", "chatty-apricots-report"]
"changesets": [
"angry-doors-tan",
"beige-lions-type",
"blue-paws-cheer",
"chatty-apricots-report",
"clean-beds-wash",
"clever-bees-happen",
"cool-seals-watch",
"curvy-rockets-camp",
"cyan-snakes-kiss",
"early-eyes-float",
"fifty-falcons-design",
"gentle-stingrays-repeat",
"gold-squids-watch",
"green-eagles-boil",
"healthy-ducks-drive",
"healthy-zoos-lie",
"hip-eggs-serve",
"hot-crews-live",
"long-eyes-drum",
"long-singers-drive",
"lucky-crabs-enjoy",
"nine-countries-remember",
"quick-seas-deny",
"rotten-melons-notice",
"rude-birds-design",
"rude-socks-walk",
"serious-apes-rule",
"silent-bags-listen",
"stupid-camels-build",
"sweet-crabs-deliver",
"thirty-comics-trade",
"tricky-impalas-shake",
"violet-boxes-float",
"weak-cherries-serve"
]
}

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/loaders': minor
---
chore: remove logger as dependency

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/middleware': patch
---
chore(middleware): fix syntax of test files

View File

@@ -0,0 +1,5 @@
---
'verdaccio': patch
---
chore: encode parts of URL

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/types': patch
'@verdaccio/store': patch
---
feat: keep_readmes option when publishing packages

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/ui-components': patch
---
chore(ui): replace react-json-view

View File

@@ -0,0 +1,9 @@
---
'@verdaccio/logger-commons': patch
'@verdaccio/local-storage': patch
'@verdaccio/test-helper': patch
'@verdaccio/core': patch
'verdaccio': patch
---
chore(tests): temp folder naming

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/api': patch
---
chore(api): fix void return for some tests

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/ui-components': patch
---
chore(ui): typing for Theme

View File

@@ -0,0 +1,5 @@
---
'@verdaccio/local-storage': patch
---
chore: local storage debug messages

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/local-storage': patch
'@verdaccio/store': patch
---
chore: tweak error logging messages

View File

@@ -0,0 +1,6 @@
---
'@verdaccio/store': patch
'@verdaccio/tarball': patch
---
fix(api): add logging when requesting tarball

View File

@@ -0,0 +1,18 @@
---
'@verdaccio/logger-commons': patch
'@verdaccio/file-locking': patch
'@verdaccio/ui-theme': patch
'@verdaccio/search-indexer': patch
'@verdaccio/server': patch
'@verdaccio/server-fastify': patch
'@verdaccio/test-helper': patch
'@verdaccio/middleware': patch
'verdaccio': patch
'@verdaccio/node-api': patch
'@verdaccio/auth': patch
'@verdaccio/api': patch
'@verdaccio/cli': patch
'@verdaccio/web': patch
---
chore: auth package requires logger as parameter

22
.github/actions/build-app/action.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: 'Build app'
description: 'build verdaccio application'
inputs:
registry-url:
description: 'Registry URL for pnpm'
required: false
default: 'http://localhost:4873'
node-version:
description: 'Node.js version to use'
required: true
runs:
using: composite
steps:
- name: Install dependencies with a custom registry version ${{ inputs.node-version }}
uses: ./.github/actions/install-app-node
with:
node-version: ${{ inputs.node_version }}
- name: build
run: pnpm build
shell: bash

View File

@@ -0,0 +1,12 @@
name: 'Cache packages'
description: 'get or set cache packages'
runs:
using: composite
steps:
- name: Cache Packages
id: cache-packages
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
with:
path: ./packages/
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}

15
.github/actions/cache-store/action.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: 'Cache build'
description: 'get or set cache build'
runs:
using: composite
steps:
- name: Cache .pnpm-store
id: cache-npm
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ github.event.pull_request.number }}-${{ runner.os }}
restore-keys: |
pnpm-

View File

@@ -0,0 +1,50 @@
name: 'Install app with Node specific version'
description: 'install application'
inputs:
registry-url:
description: 'Registry URL for pnpm'
required: false
default: 'http://localhost:4873'
reporter:
description: 'Reporter for pnpm'
required: false
default: 'silent'
loglevel:
description: 'Log level for pnpm'
required: false
default: 'error'
node-version:
description: 'Node.js version to use'
required: true
runs:
using: composite
steps:
- name: Use Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ inputs.node-version }}
- name: Install pnpm
run: |
corepack enable
corepack prepare
shell: bash
- name: set store
run: |
if [ ! -d "$HOME/.pnpm-store" ]; then
mkdir -p $HOME/.pnpm-store
pnpm config set store-dir $HOME/.pnpm-store
else
echo "Store directory already exists. Skipping configuration."
fi
shell: bash
- name: Restore cache pnpm store
uses: ./.github/actions/cache-store
- name: Install
run: pnpm install --reporter=${{inputs.reporter}} --ignore-scripts --registry ${{ inputs.registry-url }} --loglevel=${{ inputs.loglevel }}
shell: bash
- name: Save cache pnpm store
if: steps.cache-npm.outputs.cache-hit == 'false'
uses: ./.github/actions/cache-store

39
.github/actions/install-app/action.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: 'Install app'
description: 'install application'
inputs:
registry-url:
description: 'Registry URL for pnpm'
required: false
default: 'http://localhost:4873'
reporter:
description: 'Reporter for pnpm'
required: false
default: 'silent'
runs:
using: composite
steps:
- name: Use Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: |
corepack enable
corepack prepare
shell: bash
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
shell: bash
- name: Restore cache pnpm store
uses: ./.github/actions/cache-store
- name: Install
run: pnpm install --reporter=${{inputs.reporter}} --ignore-scripts --registry ${{ inputs.registry-url }}
shell: bash
- name: Save cache pnpm store
if: steps.cache-npm.outputs.cache-hit == 'false'
uses: ./.github/actions/cache-store

View File

@@ -20,12 +20,12 @@ jobs:
if: github.ref == 'refs/heads/master' && github.repository == 'verdaccio/verdaccio'
steps:
- name: checkout code repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: setup node.js
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
env:

View File

@@ -16,7 +16,7 @@ permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: true
jobs:
prepare:
@@ -24,57 +24,30 @@ jobs:
name: setup verdaccio
services:
verdaccio:
image: verdaccio/verdaccio:5
image: verdaccio/verdaccio:6
ports:
- 4873:4873
env:
NODE_ENV: production
options: >-
--health-cmd="curl -f http://0.0.0.0:4873/-/ping || exit 1"
--health-interval=10s
--health-timeout=20s
--health-retries=6
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: |
corepack enable
corepack install
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm install --registry http://localhost:4873
- name: Cache .pnpm-store
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies with a custom registry
uses: ./.github/actions/install-app
lint:
runs-on: ubuntu-latest
name: Lint
needs: prepare
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies with a custom registry
uses: ./.github/actions/install-app
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: |
corepack enable
corepack install
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: set store
run: |
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm install --ignore-scripts
reporter: 'default'
- name: Lint
run: pnpm lint
format:
@@ -82,24 +55,11 @@ jobs:
name: Format
needs: prepare
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Use Node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies with a custom registry
uses: ./.github/actions/install-app
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: |
corepack enable
corepack install
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: set store
run: |
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm install --ignore-scripts
reporter: 'default'
- name: Lint
run: pnpm format:check
test:
@@ -108,30 +68,15 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
node_version: [18, 20, 21, 22]
node_version: [18, 20, 21, 22, 23]
name: ${{ matrix.os }} / Node ${{ matrix.node_version }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Use Node ${{ matrix.node_version }}
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build application with Node ${{ matrix.node_version }}
uses: ./.github/actions/build-app
with:
node-version: ${{ matrix.node_version }}
- name: Install pnpm
run: |
corepack enable
corepack prepare
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: set store
run: |
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm install --ignore-scripts --registry http://localhost:4873
- name: build
run: pnpm build
- name: Test
run: pnpm test
sync-translations:
@@ -140,15 +85,15 @@ jobs:
name: synchronize translations
if: (github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'verdaccio/verdaccio') || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: |
corepack enable
corepack install
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}

View File

@@ -1,6 +1,10 @@
name: 'Code scanning - action'
name: 'CodeQL Analysis'
on:
push:
paths:
- .github/workflows/codeql-analysis.yml
- 'packages/**'
pull_request:
paths:
- .github/workflows/codeql-analysis.yml
@@ -13,7 +17,7 @@ permissions:
concurrency:
group: code-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: true
jobs:
CodeQL-Build:
@@ -25,20 +29,20 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@be8b74c09c1778bcdbea38e1a45efea2cb73e18c # v2
uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
with:
config: |
paths-ignore:
- packages/config/test/partials/config/js/invalid.js
- packages/middleware/test/static/js
# Override language selection by uncommenting this and choosing your languages
# with:
@@ -46,7 +50,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@be8b74c09c1778bcdbea38e1a45efea2cb73e18c # v2
uses: github/codeql-action/autobuild@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -60,4 +64,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@be8b74c09c1778bcdbea38e1a45efea2cb73e18c # v2
uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5

View File

@@ -20,13 +20,13 @@ jobs:
NODE_OPTIONS: --max_old_space_size=4096
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Start containers
run: docker compose -f "./e2e/docker/apache-verdaccio/docker-compose.yaml" up -d --build
- name: Install node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: npm setup

View File

@@ -18,13 +18,13 @@ jobs:
NODE_OPTIONS: --max_old_space_size=4096
steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Start containers
run: docker compose -f "./e2e/docker/proxy-nginx/docker-compose.yaml" up -d --build
- name: Install node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: npm setup

View File

@@ -24,8 +24,8 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'verdaccio/verdaccio'
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # tag=v1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
- uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host
@@ -41,6 +41,7 @@ jobs:
images: ${{ github.repository }}
tag-custom: nightly-master
tag-custom-only: ${{ github.ref == 'refs/heads/master' }}
tag-latest: false
tag-semver: |
{{version}}
{{major}}

View File

@@ -18,72 +18,24 @@ jobs:
env:
NODE_ENV: production
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Use Node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: |
corepack enable
corepack prepare
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm install --reporter=silence --ignore-scripts --registry http://localhost:4873
- name: Cache .pnpm-store
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
restore-keys: |
pnpm-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies with a custom registry
uses: ./.github/actions/install-app
build:
needs: [prepare]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Use Node 16
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build application with Node ${{ matrix.node_version }}
uses: ./.github/actions/build-app
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: |
corepack enable
corepack prepare
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
- name: set store
run: |
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm recursive install --reporter=silence --registry http://localhost:4873
- name: build
run: pnpm build
node-version: ${{ matrix.node_version }}
- name: Cache packages
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
id: cache-packages
with:
path: ./packages/
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
restore-keys: |
packages-
# - name: Cache test
# uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # tag=v3
# id: cache-test
# with:
# path: ./e2e/
# key: test-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
# restore-keys: |
# test-
uses: ./.github/actions/cache-packages
e2e-cli-npm:
needs: [prepare, build]
strategy:
fail-fast: false
fail-fast: false
matrix:
pkg:
[
@@ -93,37 +45,19 @@ jobs:
npm9,
npm10
]
node: [20, 21]
node: [18, 23]
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies with a custom registry version ${{ inputs.node-version }}
uses: ./.github/actions/install-app-node
with:
node-version: ${{ matrix.node }}
- name: Install pnpm
run: |
corepack enable
corepack prepare
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
- name: set store
run: |
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm install --offline --reporter=silence --ignore-scripts --registry http://localhost:4873
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ./packages/
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
# - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # tag=v3
# with:
# path: ./e2e/
# key: test-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
- name: build e2e
run: pnpm --filter @verdaccio/test-cli-commons build
node-version: ${{ inputs.node_version }}
reporter: 'default'
loglevel: 'debug'
- name: Restore cache pnpm store
uses: ./.github/actions/cache-packages
- name: Test CLI
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
@@ -136,38 +70,21 @@ jobs:
[
pnpm8,
pnpm9,
pnpm10,
]
node: [20, 21]
node: [18, 23]
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies with a custom registry version ${{ inputs.node-version }}
uses: ./.github/actions/install-app-node
with:
node-version: ${{ matrix.node }}
- name: Install pnpm
run: |
corepack enable
corepack prepare
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
- name: set store
run: |
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm install --loglevel debug --ignore-scripts --registry http://localhost:4873
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ./packages/
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
# - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # tag=v3
# with:
# path: ./e2e/
# key: test-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
- name: build e2e
run: pnpm --filter @verdaccio/test-cli-commons build
node-version: ${{ inputs.node_version }}
reporter: 'default'
loglevel: 'debug'
- name: Restore cache pnpm store
uses: ./.github/actions/cache-packages
- name: Test CLI
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}
e2e-cli-yarn:
@@ -176,43 +93,25 @@ jobs:
fail-fast: false
matrix:
pkg:
[
[
yarn1,
yarn2,
yarn3,
yarn4
]
node: [20, 21]
node: [18, 23]
name: ${{ matrix.pkg }}/ ubuntu-latest / ${{ matrix.node }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install dependencies with a custom registry version ${{ inputs.node-version }}
uses: ./.github/actions/install-app-node
with:
node-version: ${{ matrix.node }}
- name: Install pnpm
run: |
corepack enable
corepack prepare
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
- name: set store
run: |
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm install --offline --reporter=silence --ignore-scripts --registry http://localhost:4873
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ./packages/
key: pkg-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
# - uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # tag=v3
# with:
# path: ./e2e/
# key: test-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.run_id }}-${{ github.sha }}
- name: build e2e
run: pnpm --filter @verdaccio/test-cli-commons build
node-version: ${{ inputs.node_version }}
reporter: 'default'
loglevel: 'debug'
- name: Restore cache pnpm store
uses: ./.github/actions/cache-packages
- name: Test CLI
run: NODE_ENV=production pnpm test --filter ...@verdaccio/e2e-cli-${{matrix.pkg}}

View File

@@ -1,39 +1,32 @@
name: E2E UI
on: [pull_request]
permissions:
contents: read
concurrency:
group: e2e-ui-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
name: UI Test E2E
services:
verdaccio:
image: verdaccio/verdaccio:5
image: verdaccio/verdaccio:6
ports:
- 4873:4873
env:
NODE_ENV: production
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Use Node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build application with Node 20
uses: ./.github/actions/build-app
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: |
corepack enable
corepack prepare
- name: Install
run: pnpm install --reporter=silence --registry http://localhost:4873
- name: build
run: pnpm build
node-version: 20
- name: Test UI
run: pnpm test:e2e:ui
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: videos
path: /home/runner/work/verdaccio/verdaccio/e2e/ui/cypress/videos

View File

@@ -9,32 +9,20 @@ on:
concurrency:
group: generator-plugin-${{ github.ref }}
cancel-in-progress: true
cancel-in-progress: true
jobs:
e2e-plugin-generator:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18,20, 21]
node-version: [20, 22, 23]
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build application with Node ${{ matrix.node_version }}
uses: ./.github/actions/build-app
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
run: |
corepack enable
corepack install
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
- name: install
run: pnpm install
- name: build
run: pnpm build
node-version: ${{ matrix.node_version }}
- name: install verdaccio
run: npm install -g verdaccio@5
- name: Start server
@@ -49,4 +37,4 @@ jobs:
run: npm install -g yo@4 --loglevel=info
- name: install generator
run: npm install -g generator-verdaccio-plugin --loglevel=info --registry http://localhost:4873
# Future: add a test to verify the plugin is working with prompt
# Future: add a test to verify the plugin is working with prompt

View File

@@ -0,0 +1,56 @@
name: Docker publish to docker.io
on:
workflow_call:
inputs:
tag-latest:
required: true
type: boolean
description: 'Tag as latest'
default: false
tag-custom:
required: true
type: string
description: 'Custom tag'
default: 'nightly-master'
tag-custom-only:
required: true
type: boolean
description: 'Custom tag only'
default: false
jobs:
docker:
runs-on: ubuntu-latest
if: github.repository == 'verdaccio/verdaccio'
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
- uses: docker/setup-buildx-action@v1
with:
driver-opts: network=host
- uses: docker/login-action@v1
name: Login Docker Hub
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Prepare docker image tags
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: ${{ github.repository }}
tag-custom: ${{ inputs.tag-custom }}
tag-custom-only: ${{ inputs.tag-custom-only }}
tag-latest: ${{ inputs.tag-latest }}
tag-semver: |
{{version}}
{{major}}
{{major}}.{{minor}}
- name: Build & Push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}

View File

@@ -3,6 +3,7 @@ name: static data
on:
workflow_dispatch:
# pull_request:
schedule:
# twice peer week
- cron: '0 0 * * 1,4'
@@ -20,17 +21,14 @@ jobs:
runs-on: ubuntu-latest
if: github.repository == 'verdaccio/verdaccio'
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
fetch-depth: 0
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
- name: Install dependencies with a custom registry
uses: ./.github/actions/install-app
with:
node-version: 18.x
- name: install pnpm
run: sudo npm i pnpm@latest-8 -g
- name: install dependencies
run: pnpm install
reporter: 'default'
- name: Build Translations percentage
run: pnpm --filter @verdaccio/crowdin-translations build
- name: update contributors
@@ -42,7 +40,7 @@ jobs:
- name: update translations
run: pnpm run translations
env:
TOKEN: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
TOKEN: ${{ secrets.CROWDIN_VERDACCIO_API_KEY }}
- name: format
run: pnpm format
- name: Commit & Push changes

13
.github/workflows/test-docker-build.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
on:
workflow_call:
jobs:
testDocker:
name: Test Docker Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build
run: docker build .
env:
VERDACCIO_BUILD_REGISTRY: https://registry.npmjs.org

View File

@@ -0,0 +1,13 @@
on:
workflow_call:
jobs:
testVerdaccio:
name: Test Verdaccio Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Publish
uses: verdaccio/github-actions/publish@f2e0370cfa5d74d24c325017b701bfddc9cc2e5d # tag=v0.4.0
with:
args: -d

View File

@@ -1,9 +1,10 @@
name: UI Components
on:
# pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
# schedule:
# - cron: '0 0 * * *'
permissions:
contents: read # to fetch code (actions/checkout)
@@ -23,29 +24,17 @@ jobs:
env:
NODE_OPTIONS: --max_old_space_size=4096
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
with:
node-version-file: '.nvmrc'
- name: Cache pnpm modules
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- name: Install dependencies with a custom registry
uses: ./.github/actions/install-app
- name: Install pnpm
run: |
corepack enable
corepack prepare --activate pnpm@8.9.0
corepack prepare
- name: Install
run: pnpm install
run: pnpm install
- name: Build storybook
run: pnpm ui:storybook:build
- name: Copy public content

View File

@@ -2,7 +2,6 @@ name: Verdaccio Website CI
on:
workflow_dispatch:
permissions:
contents: read # to fetch code (actions/checkout)
@@ -22,7 +21,7 @@ jobs:
name: setup verdaccio
services:
verdaccio:
image: verdaccio/verdaccio:5
image: verdaccio/verdaccio:6
ports:
- 4873:4873
env:
@@ -30,35 +29,15 @@ jobs:
env:
NODE_OPTIONS: --max_old_space_size=4096
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Node
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build application with Node 20
uses: ./.github/actions/build-app
with:
node-version-file: '.nvmrc'
- name: Install pnpm
run: |
corepack enable
corepack install
- name: set store
run: |
mkdir ~/.pnpm-store
pnpm config set store-dir ~/.pnpm-store
- name: Install
run: pnpm install --registry http://localhost:4873
- name: Cache .pnpm-store
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
with:
path: ~/.pnpm-store
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-
- name: Build
run: pnpm build
node-version: 20
- name: Build Translations percentage
run: pnpm --filter @verdaccio/crowdin-translations build
- name: Cache Docusaurus Build
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.0.2
with:
path: website/node_modules/.cache/webpack
key: cache/webpack-${{github.ref}}-${{ hashFiles('**/pnpm-lock.yaml') }}

View File

@@ -0,0 +1,114 @@
on:
workflow_call:
jobs:
npm8:
name: 'npm8:angular example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Use Node.js'
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: 'install latest npm'
run: npm i -g npm@next-8
- 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="silent"
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
npm9:
name: 'npm9:angular example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Use Node.js'
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
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'
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="silent"
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
npm10:
name: 'npm10:angular example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Use Node.js'
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
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
npm run ng build --aot

View File

@@ -0,0 +1,31 @@
on:
workflow_call:
jobs:
npm10:
name: 'npm10:audit example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Use Node.js'
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
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

View File

@@ -0,0 +1,74 @@
on:
workflow_call:
jobs:
npm9:
name: 'npm9:gatsby example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Use Node.js'
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: 'install npm 9'
run: npm i -g npm@next-9
- 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
npm10:
name: 'npm10:gatsby example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Use Node.js'
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
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

View File

@@ -0,0 +1,234 @@
on:
workflow_call:
jobs:
yarn:
name: 'yarn:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Use Node.js'
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- 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
yarn init --yes
yarn add 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
yarn2:
name: 'yarn2:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Use Node.js'
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- 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
yarn init --yes
yarn set version berry
yarn config set npmRegistryServer "http://localhost:4873"
yarn config set unsafeHttpWhitelist --json '["localhost"]'
yarn add jest@29.5.0
echo "it('should pass', () => { expect(true).toBeTruthy(); });" | tee pass.test.js
yarn jest pass.test.js
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
npm8:
name: 'npm8:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Use Node.js'
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: 'install latest npm'
run: npm i -g npm@next-8
- 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.5.0 --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
npm9:
name: 'npm9:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Use Node.js'
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
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'
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
npm10:
name: 'npm10:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Use Node.js'
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
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:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Use Node.js'
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: 'install latest pnpm'
run: npm i -g pnpm@latest-8
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup yarn node ./scripts/run-verdaccio.js &
- name: 'Ping to verdaccio'
run: |
pnpm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
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
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
pnpm9:
name: 'pnpm:9:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: 'Use Node.js'
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: 'install latest pnpm'
run: npm i -g pnpm@latest-9
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
yarn node ./scripts/run-verdaccio.js &
- name: 'Ping to verdaccio'
run: |
pnpm ping --registry http://localhost:4873
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
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
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

View File

@@ -0,0 +1,28 @@
on:
workflow_call:
jobs:
release:
name: Release Snapshot
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node (latest)
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: Declare some variables
shell: bash
run: |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- name: Bump up package
run: npm version prerelease --no-git-tag-version --preid ${{ env.sha_short }}
- name: Publish
run: sh scripts/publish-prerelease.sh
env:
REGISTRY_AUTH_TOKEN: ${{ secrets.VERDACCIO_REGISTRY_TOKEN_CANARY }}
REGISTRY_URL: rg.verdaccio.org

28
.github/workflows/x-release.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
on:
workflow_call:
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node (latest)
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: Types
run: yarn code:types
- name: Publish
run: sh scripts/publish.sh
env:
REGISTRY_AUTH_TOKEN: ${{ secrets.REGISTRY_AUTH_TOKEN }}
REGISTRY_URL: registry.npmjs.org
- name: Create release notes
run: sh scripts/github-release.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -0,0 +1,32 @@
on:
workflow_call:
inputs:
docker_tag:
required: true
type: string
description: 'Docker tag to use for the verdaccio image'
default: '5'
module_tag:
required: true
type: string
description: 'Npmjs module tag to use for the verdaccio image'
default: '@latest'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: Docker test
run: |
docker run -d -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio:${{ inputs.docker_tag }}
- name: verdaccio cli
run: npm install -g verdaccio${{inputs.module_tag }} --registry http://localhost:4873
- name: gastby cli
run: npm install -g gatsby-cli --registry http://localhost:4873
- name: netlify cli
run: npm install -g netlify-cli --registry http://localhost:4873
- name: angular cli
run: npm install -g @angular/cli --registry http://localhost:4873

View File

@@ -0,0 +1,45 @@
on:
workflow_call:
inputs:
docker_tag:
required: true
type: string
description: 'Docker tag to use for the verdaccio image'
default: '5'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node (latest)
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: Docker test
run: |
docker run -d -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio:${{ inputs.docker_tag }}
- name: login
run: npx npm-cli-login -u test -p 1234 -e test@domain.test -r http://localhost:4873
- name: Install
run: yarn
- name: Build
run: yarn build
- name: Types
run: yarn code:types
- name: Bump up package
run: npm version prerelease --no-git-tag-version --preid $(date +%s%N)
- name: publish verdaccio
run: npm publish --registry http://localhost:4873
- name: install verdaccio
run: npm i -g verdaccio --loglevel info --registry http://localhost:4873
- name: verdaccio version
run: verdaccio --version
- name: 'Running the integration test'
run: |
source scripts/e2e-setup-ci.sh
npm init --force
npm install jest --registry http://localhost:4873
npm install verdaccio --registry http://localhost:4873
echo "test('require module should works', () => { const {runServer} = require('verdaccio') });" | tee module.spec.js
cat module.spec.js
yarn jest

21
.github/workflows/yarn-ci-lint.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
on:
workflow_call:
jobs:
ci-lint:
name: Node Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Format
run: yarn format:check
- name: Lint
run: yarn lint
- name: Lint Lockfile
run: yarn lint:lockfile

24
.github/workflows/yarn-ci.yml vendored Normal file
View File

@@ -0,0 +1,24 @@
on:
workflow_call:
inputs:
node_version:
required: true
type: string
jobs:
ci:
name: Node ${{ inputs.node_version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Use Node ${{ inputs.node_version }}
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: ${{ inputs.node_version }}
- name: Install
run: yarn install --immutable
- name: Build
run: yarn build
- name: Types
run: yarn code:types
- name: Test
run: yarn test

View File

@@ -29,10 +29,6 @@ coverage/
test-storage*
test/
__mocks__/
jestEnvironment.js
test/jest.e2e.config.js
test/jest.config.functional.js
jest.config.js
# misc
contrib/

1
.npmrc
View File

@@ -1,2 +1 @@
always-auth = true
fetch-retries="10"

View File

@@ -6,13 +6,12 @@
![verdaccio gif](https://cdn.verdaccio.dev/readme/readme-website.png)
# Version Next (Development branch)
# Version Next (Development Branch)
> Looking for Verdaccio version 5 or 6? Version 6 is the latest version and successor to version 5. Version 6 requires Node.js 18 or higher and is maintained in the `6.x` branch.
> The plugins for versions 5 and 6 are located at the [`verdaccio/monorepo`](https://github.com/verdaccio/monorepo) repository. Plugins for the `next-8` version are hosted in this project under the `./packages/plugins` folder.
> Looking for Verdaccio 5 version? Check the branch `5.x`
> The plugins for the `v5.x` that are hosted within this organization are located
> at the [`verdaccio/monorepo`](https://github.com/verdaccio/monorepo) repository, while for the `next` version
> are hosted on this project `./packages/plugins`, keep on mind `next` plugins will eventually would be
> incompatible with `v5.x` versions.
> Note that contributing guidelines might be different based on the branch.
[Verdaccio](https://verdaccio.org/) is a simple, **zero-config-required local private npm registry**.
@@ -36,26 +35,30 @@ Google Cloud Storage** or create your own plugin.
[![Github](https://img.shields.io/github/stars/verdaccio/verdaccio.svg?style=social&label=Stars)](https://github.com/verdaccio/verdaccio/stargazers)
[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
## Versions
You can find more details about the different versions of Verdaccio, minimum requirements, as well as links to associated npm packages and docker images in the [version history](VERSIONS.md).
## Install
> Latest Node.js v16 required
> Node.js v18 as minimum version required
Install with npm:
```bash
npm install -g verdaccio@next
npm install -g verdaccio@next-8
```
With `yarn`
```bash
yarn global add verdaccio@next
yarn global add verdaccio@next-8
```
With `pnpm`
```bash
pnpm i -g verdaccio@next
pnpm i -g verdaccio@next-8
```
or
@@ -94,18 +97,28 @@ Our goal is to give you the confidence to use your preferred package manager wit
### Commands
| cmd | npm6 | npm7 | npm8 | npm9 | npm10 | pnpm8 | pnpm9 (beta) | yarn1 | yarn2 | yarn3 | yarn4 |
| --------- | ---- | ---- | ---- | ---- | ----- | ----- | ------------ | ----- | ----- | ----- | ----- |
| publish | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| info | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | |
| audit | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
| install | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
| deprecate | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | |
| ping | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| search | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| star | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| stars | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| dist-tag | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | |
| cmd | npm6 | npm7 | npm8 | npm9 | npm10 | pnpm8 | pnpm9 | pnpm10 | yarn1 | yarn2 | yarn3 | yarn4 |
| --------- | ---- | ---- | ---- | ---- | ----- | ----- | ----- | ------ | ----- | ----- | ----- | ----- |
| publish | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| unpublish | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | | | | |
| info | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
| audit | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
| install | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | |
| deprecate | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| ping | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| search | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| star | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⛔ | ⛔ | ⛔ | ⛔ |
| stars | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | |
| dist-tag | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ |
> notes:
>
> - yarn search cmd exist in _modern_ but, it do not uses the search registry endpoint.
> - yarn _modern_ has two info commands, the one used here is `yarn npm info`
❌ = no tested
✅ = tested
⛔ = no supported
## Donations

View File

@@ -2,15 +2,7 @@
## Supported versions
The following table describes the versions of this project that are currently supported with security updates:
| Version | Supported |
| --------- | ------------------ |
| 2.x | :x: |
| 3.x | :x: |
| 4.x | :x: |
| 5.x | :white_check_mark: |
| 6.x alpha | :x: |
You can find details about the supported versions of Verdaccio in the [version history](VERSIONS.md).
## Responsible disclosure security policy

23
VERSIONS.md Normal file
View File

@@ -0,0 +1,23 @@
# Versions
The following table describes the versions of this project:
| Version | Supported | Minimum Node.js | Branch | Npm Tag | Docker Images | Helm Charts |
| ---------------- | ------------------ | --------------- | ------ | ---------------- | ----------------------- | ----------- |
| 4.x | :x: (deprecated) | 10 | 4.x | latest-4 | 4, 4.x, 4.x.x, 4.x-next | 3.x |
| 5.x previous | :x: (deprecated) | 14 | 5.x | latest-5 | 5, 5.x, 5.x.x, 5.x-next | 4.0 - 4.18 |
| 6.x current | :white_check_mark: | 18 | 6.x | latest-6, latest | 6, 6.x, 6.x.x, 6.x-next | 4.19 - ... |
| 7.x next | :x: | 18 | 7.x | next-7 | 7.x-next | n/a |
| 8.x experimental | :x: | 18 | master | next-8 | nightly-master | n/a |
## Npm Registry
The official Verdaccio npm packages are located at https://www.npmjs.com/package/verdaccio.
## Docker Hub
The official Verdaccio Docker Images are found at https://hub.docker.com/r/verdaccio/verdaccio.
## Helms Charts
The official Verdaccio Helm Charts are found at https://artifacthub.io/packages/helm/verdaccio/verdaccio.

View File

@@ -15,5 +15,5 @@ files:
ignore: [/website/docs/api/**/*]
- source: /website/versioned_docs/**/*
translation: /website/i18n/%locale%/docusaurus-plugin-content-docs/**/%original_file_name%
ignore: [/website/versioned_docs/version-5.x/api/**/*, /website/versioned_docs/version-6.x/api/**/*]
ignore: [/website/versioned_docs/version-6.x/api/**/*]

View File

@@ -2,25 +2,21 @@
"private": true,
"name": "@verdaccio/test-cli-commons",
"version": "2.0.0-next-8.0",
"main": "./build/index.js",
"types": "./build/index.d.ts",
"main": "src/index.ts",
"devDependencies": {
"@verdaccio/config": "workspace:8.0.0-next-8.1",
"@verdaccio/core": "workspace:8.0.0-next-8.1",
"@verdaccio/types": "workspace:13.0.0-next-8.0",
"@verdaccio/config": "workspace:8.0.0-next-8.6",
"@verdaccio/core": "workspace:8.0.0-next-8.6",
"@verdaccio/types": "workspace:13.0.0-next-8.2",
"debug": "4.3.7",
"fs-extra": "11.2.0",
"get-port": "5.1.1",
"got": "11.8.6",
"js-yaml": "4.1.0",
"lodash": "4.17.21",
"verdaccio": "workspace:8.0.0-next-8.1"
"verdaccio": "workspace:8.0.0-next-8.6"
},
"scripts": {
"test": "jest",
"type-check": "tsc --noEmit -p tsconfig.build.json",
"build:types": "tsc --emitDeclarationOnly -p tsconfig.build.json",
"build:js": "babel src/ --out-dir build/ --copy-files --extensions \".ts,.tsx\" --source-maps",
"build": "pnpm run build:js && pnpm run build:types"
"test": "echo no test",
"build": "echo no build"
}
}

View File

@@ -1,22 +1,31 @@
import buildDebug from 'debug';
import { addRegistry } from './utils';
const debug = buildDebug('verdaccio:e2e:npm-utils');
export async function bumbUp(cmd, tempFolder, registry) {
await cmd({ cwd: tempFolder }, 'version', 'minor', ...addRegistry(registry.getRegistryUrl()));
}
export async function publish(cmd, tempFolder, pkgName, registry, arg: string[] = []) {
const resp = await cmd(
export async function bumpUpPackage(cmd, tempFolder, pkgName, registry, arg: string[] = []) {
debug('bump up package %o', pkgName);
await cmd(
{ cwd: tempFolder },
'publish',
'version',
...arg,
'--json',
'--no--git-tag-version',
'--loglevel=info',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.name).toEqual(pkgName);
}
export async function publish(cmd, tempFolder, pkgName, registry, arg: string[] = []) {
debug('publishing %o', pkgName);
await cmd({ cwd: tempFolder }, 'publish', ...arg, ...addRegistry(registry.getRegistryUrl()));
}
export async function getInfoVersions(cmd, pkgName, registry) {
debug('getting info %o', pkgName);
const infoResp = await cmd(
{},
'info',
@@ -25,5 +34,6 @@ export async function getInfoVersions(cmd, pkgName, registry) {
...addRegistry(registry.getRegistryUrl())
);
const infoBody = JSON.parse(infoResp.stdout as string);
debug('info %o', infoBody);
return infoBody;
}

View File

@@ -4,6 +4,7 @@ import buildDebug from 'debug';
import { createInterface } from 'readline';
const debug = buildDebug('verdaccio:e2e:process');
const debugRead = buildDebug('verdaccio:e2e:line');
export type ExecOutput = {
stdout: string;
@@ -11,7 +12,7 @@ export type ExecOutput = {
};
export async function exec(options: SpawnOptions, cmd, args): Promise<ExecOutput> {
debug('start _exec %o %o %o', options, cmd, args);
debug('start _exec %o %o %o', options, cmd, args ? args.join(' ') : '');
let stdout = '';
let stderr;
const env = options.env;
@@ -32,9 +33,17 @@ export async function exec(options: SpawnOptions, cmd, args): Promise<ExecOutput
const childProcess = spawn(cmd, args, spawnOptions);
if (childProcess.stdout) {
const rl = createInterface({ input: childProcess.stdout });
childProcess.stdout.on('data', (data) => {
debugRead('data %o', data.toString());
});
const rl = createInterface({
input: childProcess.stdout,
output: process.stdout,
terminal: false,
});
rl.on('line', function (line) {
debugRead('line %o', line);
stdout += line;
});
}
@@ -42,6 +51,7 @@ export async function exec(options: SpawnOptions, cmd, args): Promise<ExecOutput
const err = new Error(`Running "${cmd} ${args.join(' ')}" returned error code `);
return new Promise((resolve, reject) => {
childProcess.on('exit', (error) => {
debugRead('exit %o', error);
if (!error) {
resolve({ stdout, stderr });
} else {

View File

@@ -17,7 +17,7 @@ export type Setup = {
const log =
process.env.NODE_ENV === 'production'
? { type: 'stdout', format: 'json', level: 'warn' }
: { type: 'stdout', format: 'pretty', level: 'info' };
: { type: 'stdout', format: 'pretty', level: 'debug' };
const defaultConfig = {
...getDefaultConfig(),

View File

@@ -1,9 +1,12 @@
import buildDebug from 'debug';
import fs from 'fs-extra';
import { cp, readFile, writeFile } from 'fs/promises';
import { join } from 'path';
import { fileUtils } from '@verdaccio/core';
const debug = buildDebug('verdaccio:e2e:utils');
export function createProject(projectName: string) {
const tempRootFolder = global.__namespace.getItem('dir-suite-root');
const verdaccioInstall = join(tempRootFolder, projectName);
@@ -13,12 +16,14 @@ export function createProject(projectName: string) {
}
export function copyConfigFile(rootFolder, configTemplate): string {
const configPath = join(rootFolder, 'config.yaml');
debug('copying config file %o', configPath);
copyTo(join(__dirname, configTemplate), configPath);
return configPath;
}
export async function createTempFolder(prefix: string) {
debug('creating temp folder %o', prefix);
return fileUtils.createTempFolder(prefix);
}
@@ -31,10 +36,12 @@ export function cleanUpTemp(tmpFolder) {
}
export function addRegistry(registryUrl) {
debug('adding registry %o', registryUrl);
return ['--registry', registryUrl];
}
export function addNpmPrefix(installFolder) {
debug('adding prefix %o', installFolder);
return ['--prefix', installFolder];
}
@@ -50,6 +57,7 @@ export async function prepareYarnModernProject(
registryDomain: string,
yarnPath: string
) {
debug('preparing yarn project %o', projectName);
const tempFolder = await createTempFolder(projectName);
// FUTURE: native copy folder instead fs-extra
fs.copySync(templatePath, tempFolder);
@@ -67,6 +75,7 @@ export const getPackageJSON = (
dependencies = {},
devDependencies = {}
) => {
debug('creating package.json %o', packageName);
const json = {
name: packageName,
version,
@@ -103,6 +112,7 @@ export async function prepareGenericEmptyProject(
dependencies: any = {},
devDependencies: any = {}
) {
debug('preparing generic project %o', packageName);
const getNPMrc = (port, token, registry) => `//localhost:${port}/:_authToken=${token}
registry=${registry}`;
const tempFolder = await createTempFolder('temp-folder');

View File

@@ -0,0 +1,3 @@
{
"extends": "../../../.babelrc"
}

View File

@@ -0,0 +1,7 @@
{
"rules": {
"no-console": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/explicit-member-accessibility": 0
}
}

View File

@@ -0,0 +1,45 @@
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
import { addRegistry, initialSetup, prepareGenericEmptyProject } from '@verdaccio/test-cli-commons';
export function runAudit(npm) {
describe('audit a package', () => {
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['verdaccio-memory', '@verdaccio/cli']])(
'should audit a package %s',
async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl(),
{ jquery: '3.6.1' }
);
// install is required to create package lock file
await npm({ cwd: tempFolder }, 'install', ...addRegistry(registry.getRegistryUrl()));
const resp = await npm(
{ cwd: tempFolder },
'audit',
'--json',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.metadata).toBeDefined();
expect(parsedBody.auditReportVersion).toBeDefined();
expect(parsedBody.vulnerabilities).toBeDefined();
}
);
afterAll(async () => {
registry.stop();
});
});
}

View File

@@ -0,0 +1,119 @@
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
import {
addRegistry,
initialSetup,
npmUtils,
prepareGenericEmptyProject,
} from '@verdaccio/test-cli-commons';
export function runDeprecate(npm) {
describe('deprecate a package', () => {
let registry;
async function deprecate(tempFolder, packageVersion, registry, message) {
await npm(
{ cwd: tempFolder },
'deprecate',
packageVersion,
message,
'--json',
...addRegistry(registry.getRegistryUrl())
);
}
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['@verdaccio/deprecated-1']])(
'should deprecate a single package %s',
async (pkgName) => {
const message = 'some message';
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
// deprecate one version
await deprecate(tempFolder, `${pkgName}@1.0.0`, registry, message);
// verify is deprecated
const infoBody = await npmUtils.getInfoVersions(npm, `${pkgName}`, registry);
expect(infoBody.name).toEqual(pkgName);
expect(infoBody.deprecated).toEqual(message);
}
);
test.each([['@verdaccio/deprecated-2']])(
'should un-deprecate a package %s',
async (pkgName) => {
const message = 'some message';
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
// deprecate one version
await deprecate(tempFolder, `${pkgName}@1.0.0`, registry, message);
// verify is deprecated
const infoBody = await npmUtils.getInfoVersions(npm, `${pkgName}`, registry);
expect(infoBody.deprecated).toEqual(message);
// empty string is same as undeprecate
await deprecate(tempFolder, `${pkgName}@1.0.0`, registry, '');
const infoBody2 = await npmUtils.getInfoVersions(npm, `${pkgName}`, registry);
expect(infoBody2.deprecated).toBeUndefined();
}
);
test.each([['@verdaccio/deprecated-3']])(
'should deprecate a multiple packages %s',
async (pkgName) => {
const message = 'some message';
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
// publish 1.0.0
await npmUtils.publish(npm, tempFolder, pkgName, registry);
// publish 1.1.0
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
// publish 1.2.0
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
// publish 1.3.0
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
// // deprecate all version
await deprecate(tempFolder, pkgName, registry, message);
// verify is deprecated
for (let v of ['1.0.0', '1.1.0', '1.2.0', '1.3.0']) {
const infoResp = await npmUtils.getInfoVersions(npm, `${pkgName}@${v}`, registry);
expect(infoResp.deprecated).toEqual(message);
}
// publish normal version
// publish 1.4.0
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
const infoResp = await npmUtils.getInfoVersions(npm, `${pkgName}@1.4.0`, registry);
// must be not deprecated
expect(infoResp.deprecated).toBeUndefined();
}
);
afterAll(async () => {
registry.stop();
});
});
}

View File

@@ -0,0 +1,92 @@
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
import {
addRegistry,
initialSetup,
npmUtils,
prepareGenericEmptyProject,
} from '@verdaccio/test-cli-commons';
export function runDistTag(npm) {
describe('dist-tag a package', () => {
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['@foo/foo', 'foo']])('should list dist-tags for %s', async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry, ['--tag', 'beta']);
const resp2 = await npm(
{ cwd: tempFolder },
'dist-tag',
'ls',
'--json',
...addRegistry(registry.getRegistryUrl())
);
expect(resp2.stdout).toEqual('beta: 1.1.0latest: 1.0.0');
});
test.each([['@verdaccio/bar']])('should remove tag with dist-tags for %s', async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry, ['--tag', 'beta']);
const resp2 = await npm(
{ cwd: tempFolder },
'dist-tag',
'rm',
`${pkgName}@1.1.0`,
'beta',
...addRegistry(registry.getRegistryUrl())
);
expect(resp2.stdout).toEqual('-beta: @verdaccio/bar@1.1.0');
});
test.each([['@verdaccio/five']])(
'should add tag to package and version with dist-tags for %s',
async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
const resp2 = await npm(
{ cwd: tempFolder },
'dist-tag',
'add',
`${pkgName}@1.1.0`,
'alfa',
...addRegistry(registry.getRegistryUrl())
);
expect(resp2.stdout).toEqual(`+alfa: ${pkgName}@1.1.0`);
}
);
afterAll(async () => {
registry.stop();
});
});
}

View File

@@ -0,0 +1,10 @@
export { runAudit } from './audit';
export { runDeprecate } from './deprecate';
export { runInstall } from './install';
export { runInfo } from './info';
export { runPing } from './ping';
export { runPublish } from './publish';
export { runSearch } from './search';
export { runStar } from './star';
export { runUnpublish } from './unpublish';
export { runDistTag } from './dist-tags';

View File

@@ -0,0 +1,32 @@
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
import { addRegistry, initialSetup } from '@verdaccio/test-cli-commons';
export function runInfo(npm) {
describe('install a package', () => {
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test('should run npm info json body', async () => {
const resp = await npm(
{},
'info',
'verdaccio',
'--json',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.name).toEqual('verdaccio');
expect(parsedBody.dependencies).toBeDefined();
});
afterAll(async () => {
registry.stop();
});
});
}

View File

@@ -0,0 +1,39 @@
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
import { addRegistry, initialSetup, prepareGenericEmptyProject } from '@verdaccio/test-cli-commons';
export function runInstall(npm) {
describe('install a project packages', () => {
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test('should run npm install json body', async () => {
const { tempFolder } = await prepareGenericEmptyProject(
'something',
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl(),
{ react: '18.2.0' }
);
const resp = await npm(
{ cwd: tempFolder },
'install',
'--json',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.added).toBeDefined();
expect(parsedBody.audit).toBeDefined();
});
afterAll(async () => {
registry.stop();
});
});
}

View File

@@ -0,0 +1,11 @@
{
"private": true,
"name": "@verdaccio/e2e-cli-npm-common",
"version": "1.0.0",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:2.0.0-next-8.0"
},
"scripts": {
"test": "echo no test"
}
}

View File

@@ -0,0 +1,25 @@
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
import { addRegistry, initialSetup } from '@verdaccio/test-cli-commons';
export function runPing(npm) {
describe('ping registry', () => {
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test('should ping registry', async () => {
const resp = await npm({}, 'ping', '--json', ...addRegistry(registry.getRegistryUrl()));
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.registry).toEqual(registry.getRegistryUrl() + '/');
});
afterAll(async () => {
registry.stop();
});
});
}

View File

@@ -0,0 +1,42 @@
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
import { addRegistry, initialSetup, prepareGenericEmptyProject } from '@verdaccio/test-cli-commons';
export function runPublish(npm) {
describe('publish a package', () => {
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['verdaccio-memory', 'verdaccio', '@verdaccio/foo', '@verdaccio/some-foo']])(
'should publish a package %s',
async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
const resp = await npm(
{ cwd: tempFolder },
'publish',
'--json',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.name).toEqual(pkgName);
expect(parsedBody.files).toBeDefined();
expect(parsedBody.files).toBeDefined();
}
);
afterAll(async () => {
registry.stop();
});
});
}

View File

@@ -0,0 +1,34 @@
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
import { addRegistry, initialSetup } from '@verdaccio/test-cli-commons';
export function runSearch(npm) {
describe('search a package', () => {
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test('should search a package', async () => {
const resp = await npm(
{},
'search',
'@verdaccio/cli',
'--json',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
const pkgFind = parsedBody.find((item) => {
return item.name === '@verdaccio/cli';
});
expect(pkgFind.name).toEqual('@verdaccio/cli');
});
afterAll(async () => {
registry.stop();
});
});
}

View File

@@ -0,0 +1,90 @@
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
import {
addRegistry,
initialSetup,
npmUtils,
prepareGenericEmptyProject,
} from '@verdaccio/test-cli-commons';
export function runStar(npm) {
describe('star a package', () => {
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['@verdaccio/foo']])('should star a package %s', async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
const resp = await npm(
{ cwd: tempFolder },
'star',
pkgName,
...addRegistry(registry.getRegistryUrl())
);
expect(resp.stdout).toEqual(`${pkgName}`);
});
test.each([['@verdaccio/bar']])('should unstar a package %s', async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
const resp = await npm(
{ cwd: tempFolder },
'star',
pkgName,
...addRegistry(registry.getRegistryUrl())
);
expect(resp.stdout).toEqual(`${pkgName}`);
const resp1 = await npm(
{ cwd: tempFolder },
'unstar',
pkgName,
...addRegistry(registry.getRegistryUrl())
);
expect(resp1.stdout).toEqual(`${pkgName}`);
});
test('should list stars of a user %s', async () => {
const pkgName = '@verdaccio/stars';
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
await npm({ cwd: tempFolder }, 'star', pkgName, ...addRegistry(registry.getRegistryUrl()));
const resp = await npm(
{ cwd: tempFolder },
'stars',
...addRegistry(registry.getRegistryUrl())
);
// side effects: this result is affected the the package published in the previous step
expect(resp.stdout).toEqual(`@verdaccio/foo@verdaccio/stars`);
});
afterAll(async () => {
registry.stop();
});
});
}

View File

@@ -0,0 +1,8 @@
{
"extends": "../../../tsconfig.reference.json",
"references": [
{
"path": "../cli-commons"
}
]
}

View File

@@ -0,0 +1,86 @@
import { afterAll, beforeAll, describe, expect, test } from 'vitest';
import {
addRegistry,
initialSetup,
npmUtils,
prepareGenericEmptyProject,
} from '@verdaccio/test-cli-commons';
export function runUnpublish(npm) {
describe('unpublish a package', () => {
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['@verdaccio/test1', 'super-package-do-not-exist-spam']])(
'should unpublish a full package %s',
async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0-beta',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
await npmUtils.bumpUpPackage(npm, tempFolder, pkgName, registry, ['minor']);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
await npmUtils.bumpUpPackage(npm, tempFolder, pkgName, registry, ['minor']);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
await npmUtils.bumpUpPackage(npm, tempFolder, pkgName, registry, ['major']);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
const resp2 = await npm(
{ cwd: tempFolder },
'unpublish',
pkgName,
'--force',
'--loglevel=info',
'--json',
...addRegistry(registry.getRegistryUrl())
);
expect(resp2.stdout).toEqual('- @verdaccio/test1');
}
);
test.each([['@verdaccio/test1', 'super-package-do-not-exist-spam']])(
'should unpublish a package %s version',
async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0-beta',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
await npmUtils.bumpUpPackage(npm, tempFolder, pkgName, registry, ['minor']);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
await npmUtils.bumpUpPackage(npm, tempFolder, pkgName, registry, ['minor']);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
await npmUtils.bumpUpPackage(npm, tempFolder, pkgName, registry, ['major']);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
const resp2 = await npm(
{ cwd: tempFolder },
'unpublish',
`${pkgName}@1.0.0-beta`,
'--force',
'--loglevel=info',
'--json',
...addRegistry(registry.getRegistryUrl())
);
expect(resp2.stdout).toEqual('- @verdaccio/test1@1.0.0-beta');
}
);
afterAll(async () => {
registry.stop();
});
});
}

View File

@@ -1,44 +1,9 @@
import { addRegistry, initialSetup, prepareGenericEmptyProject } from '@verdaccio/test-cli-commons';
import { describe } from 'vitest';
import { runAudit } from '@verdaccio/e2e-cli-npm-common';
import { npm } from './utils';
describe('audit a package', () => {
jest.setTimeout(10000);
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['verdaccio-memory', '@verdaccio/cli']])(
'should audit a package %s',
async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl(),
{ jquery: '3.6.1' }
);
// install is required to create package lock file
await npm({ cwd: tempFolder }, 'install', ...addRegistry(registry.getRegistryUrl()));
const resp = await npm(
{ cwd: tempFolder },
'audit',
'--json',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.metadata).toBeDefined();
expect(parsedBody.auditReportVersion).toBeDefined();
expect(parsedBody.vulnerabilities).toBeDefined();
}
);
afterAll(async () => {
registry.stop();
});
runAudit(npm);
});

View File

@@ -1,115 +1,9 @@
import {
addRegistry,
initialSetup,
npmUtils,
prepareGenericEmptyProject,
} from '@verdaccio/test-cli-commons';
import { describe } from 'vitest';
import { runDeprecate } from '@verdaccio/e2e-cli-npm-common';
import { npm } from './utils';
describe('deprecate a package', () => {
jest.setTimeout(20000);
let registry;
async function deprecate(tempFolder, packageVersion, registry, message) {
await npm(
{ cwd: tempFolder },
'deprecate',
packageVersion,
message,
'--json',
...addRegistry(registry.getRegistryUrl())
);
}
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['@verdaccio/deprecated-1']])(
'should deprecate a single package %s',
async (pkgName) => {
const message = 'some message';
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
// deprecate one version
await deprecate(tempFolder, `${pkgName}@1.0.0`, registry, message);
// verify is deprecated
const infoBody = await npmUtils.getInfoVersions(npm, `${pkgName}`, registry);
expect(infoBody.name).toEqual(pkgName);
expect(infoBody.deprecated).toEqual(message);
}
);
test.each([['@verdaccio/deprecated-2']])('should un-deprecate a package %s', async (pkgName) => {
const message = 'some message';
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
// deprecate one version
await deprecate(tempFolder, `${pkgName}@1.0.0`, registry, message);
// verify is deprecated
const infoBody = await npmUtils.getInfoVersions(npm, `${pkgName}`, registry);
expect(infoBody.deprecated).toEqual(message);
// empty string is same as undeprecate
await deprecate(tempFolder, `${pkgName}@1.0.0`, registry, '');
const infoBody2 = await npmUtils.getInfoVersions(npm, `${pkgName}`, registry);
expect(infoBody2.deprecated).toBeUndefined();
});
test.each([['@verdaccio/deprecated-3']])(
'should deprecate a multiple packages %s',
async (pkgName) => {
const message = 'some message';
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
// publish 1.0.0
await npmUtils.publish(npm, tempFolder, pkgName, registry);
// publish 1.1.0
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
// publish 1.2.0
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
// publish 1.3.0
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
// // deprecate all version
await deprecate(tempFolder, pkgName, registry, message);
// verify is deprecated
for (let v of ['1.0.0', '1.1.0', '1.2.0', '1.3.0']) {
const infoResp = await npmUtils.getInfoVersions(npm, `${pkgName}@${v}`, registry);
expect(infoResp.deprecated).toEqual(message);
}
// publish normal version
// publish 1.4.0
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
const infoResp = await npmUtils.getInfoVersions(npm, `${pkgName}@1.4.0`, registry);
// must be not deprecated
expect(infoResp.deprecated).toBeUndefined();
}
);
afterAll(async () => {
registry.stop();
});
runDeprecate(npm);
});

View File

@@ -1,91 +1,9 @@
import {
addRegistry,
initialSetup,
npmUtils,
prepareGenericEmptyProject,
} from '@verdaccio/test-cli-commons';
import { describe } from 'vitest';
import { runDistTag } from '@verdaccio/e2e-cli-npm-common';
import { npm } from './utils';
describe('publish a package', () => {
jest.setTimeout(20000);
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test.each([['@foo/foo', 'foo']])('should list dist-tags for %s', async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry, ['--tag', 'beta']);
const resp2 = await npm(
{ cwd: tempFolder },
'dist-tag',
'ls',
'--json',
...addRegistry(registry.getRegistryUrl())
);
expect(resp2.stdout).toEqual('beta: 1.1.0latest: 1.0.0');
});
test.each([['@verdaccio/bar']])('should remove tag with dist-tags for %s', async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry, ['--tag', 'beta']);
const resp2 = await npm(
{ cwd: tempFolder },
'dist-tag',
'rm',
`${pkgName}@1.1.0`,
'beta',
...addRegistry(registry.getRegistryUrl())
);
expect(resp2.stdout).toEqual('-beta: @verdaccio/bar@1.1.0');
});
test.each([['@verdaccio/five']])(
'should add tag to package and version with dist-tags for %s',
async (pkgName) => {
const { tempFolder } = await prepareGenericEmptyProject(
pkgName,
'1.0.0',
registry.port,
registry.getToken(),
registry.getRegistryUrl()
);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
await npmUtils.bumbUp(npm, tempFolder, registry);
await npmUtils.publish(npm, tempFolder, pkgName, registry);
const resp2 = await npm(
{ cwd: tempFolder },
'dist-tag',
'add',
`${pkgName}@1.1.0`,
'alfa',
...addRegistry(registry.getRegistryUrl())
);
expect(resp2.stdout).toEqual(`+alfa: ${pkgName}@1.1.0`);
}
);
afterAll(async () => {
registry.stop();
});
describe('dist-tags a package', () => {
runDistTag(npm);
});

View File

@@ -1,31 +1,9 @@
import { addRegistry, initialSetup } from '@verdaccio/test-cli-commons';
import { describe } from 'vitest';
import { runInfo } from '@verdaccio/e2e-cli-npm-common';
import { npm } from './utils';
describe('install a package', () => {
jest.setTimeout(10000);
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test('should run npm info json body', async () => {
const resp = await npm(
{},
'info',
'verdaccio',
'--json',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.name).toEqual('verdaccio');
expect(parsedBody.dependencies).toBeDefined();
});
afterAll(async () => {
registry.stop();
});
describe('info a package', () => {
runInfo(npm);
});

View File

@@ -1,38 +1,9 @@
import { addRegistry, initialSetup, prepareGenericEmptyProject } from '@verdaccio/test-cli-commons';
import { describe } from 'vitest';
import { runInstall } from '@verdaccio/e2e-cli-npm-common';
import { npm } from './utils';
describe('install a project packages', () => {
jest.setTimeout(100000);
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test('should run npm install json body', async () => {
const { tempFolder } = await prepareGenericEmptyProject(
'something',
'1.0.0-patch',
registry.port,
registry.getToken(),
registry.getRegistryUrl(),
{ react: '18.2.0' }
);
const resp = await npm(
{ cwd: tempFolder },
'install',
'--json',
...addRegistry(registry.getRegistryUrl())
);
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.added).toBeDefined();
expect(parsedBody.audit).toBeDefined();
});
afterAll(async () => {
registry.stop();
});
runInstall(npm);
});

View File

@@ -1,3 +0,0 @@
const config = require('../jest.config');
module.exports = { ...config };

View File

@@ -4,9 +4,10 @@
"version": "1.0.1",
"dependencies": {
"@verdaccio/test-cli-commons": "workspace:2.0.0-next-8.0",
"npm": "10.8.2"
"@verdaccio/e2e-cli-npm-common": "workspace:*",
"npm": "10.9.0"
},
"scripts": {
"test": "jest"
"test": "vitest run --testTimeout 50000"
}
}

View File

@@ -1,24 +1,9 @@
import { addRegistry, initialSetup } from '@verdaccio/test-cli-commons';
import { describe } from 'vitest';
import { runPing } from '@verdaccio/e2e-cli-npm-common';
import { npm } from './utils';
describe('ping registry', () => {
jest.setTimeout(10000);
let registry;
beforeAll(async () => {
const setup = await initialSetup();
registry = setup.registry;
await registry.init();
});
test('should ping registry', async () => {
const resp = await npm({}, 'ping', '--json', ...addRegistry(registry.getRegistryUrl()));
const parsedBody = JSON.parse(resp.stdout as string);
expect(parsedBody.registry).toEqual(registry.getRegistryUrl() + '/');
});
afterAll(async () => {
registry.stop();
});
runPing(npm);
});

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