Compare commits

...

121 Commits

Author SHA1 Message Date
Juan Picado
e9902ecd4b chore(release): 5.5.0 2022-01-22 16:27:48 +01:00
Juan Picado
d36b8b1e00 feat: upgrade @verdaccio-ui-theme 2022-01-22 16:18:09 +01:00
Juan Picado
1a7b1ee8ad feat: add new options to the web disable login and pkg managers (#2947) 2022-01-22 10:58:04 +01:00
renovate[bot]
d6415d4dc3 chore(deps): update dependency supertest to v6.2.2 (#2938)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-22 09:50:26 +01:00
renovate[bot]
f9301d1827 chore(deps): update dependency jest-junit to v12.3.0 (#2944) 2022-01-21 21:54:07 +01:00
renovate[bot]
3a9d773415 fix(deps): update dependency verdaccio-audit to v10.1.1 (#2935) 2022-01-20 23:58:32 +01:00
renovate[bot]
8a75f8cc36 fix(deps): update dependency @verdaccio/readme to v10.2.1 (#2933)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-20 22:30:01 +01:00
renovate[bot]
e2eb6ce27f fix(deps): update dependency async to v3.2.3 (#2934)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-20 19:57:56 +01:00
renovate[bot]
8c7e39e8f3 fix(deps): update dependency @verdaccio/local-storage to v10.1.1 (#2932)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-20 19:05:03 +01:00
renovate[bot]
6110e51a83 chore(deps): update babel monorepo (#2929)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-20 18:28:18 +01:00
renovate[bot]
881367925c chore(deps): update dependency @types/express-serve-static-core to v4.17.28 (#2914)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-19 08:03:46 +01:00
renovate[bot]
b2bef8dfbc chore(deps): update dependency @octokit/rest to v18.12.0 (#2921)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-19 07:59:12 +01:00
renovate[bot]
eb65ba6e11 chore(deps): update dependency @types/http-errors to v1.8.2 (#2915)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-16 10:20:26 +01:00
renovate[bot]
ce3aa50d9a chore(deps): update dependency selfsigned to v1.10.14 (#2907)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-16 09:40:39 +01:00
renovate[bot]
d9cebcdbd9 chore(deps): update dependency @babel/register to v7.16.9 (#2911)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-16 09:12:56 +01:00
Juan Picado
b79266d54e feat: use backward compatible UI from v6 on v5 (#2912)
* feat: upgrade ui theme plugin v4

* chore: fix e2e

* fix: format

* chore: update theme ui
2022-01-15 20:51:14 +01:00
renovate[bot]
dad89bc72c chore(deps): update dependency @types/minimatch to v3.0.5 (#2894)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-13 20:21:15 +01:00
renovate[bot]
bd883cbe2b chore(deps): update dependency @types/serve-static to v1.13.10 (#2906)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-12 21:18:48 +01:00
renovate[bot]
c3849b314a chore(deps): update dependency @types/semver to v7.3.9 (#2904) 2022-01-11 18:32:07 +01:00
renovate[bot]
2bced91cd0 chore(deps): update babel monorepo to v7.16.8 (#2901) 2022-01-11 17:42:24 +01:00
renovate[bot]
511fc8f1e0 chore(deps): update dependency @types/jest to v26.0.24 (#2892)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-11 00:11:30 +01:00
renovate[bot]
ad938ac795 chore(deps): update dependency @types/request to v2.48.8 (#2895)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-10 22:21:44 +01:00
renovate[bot]
a99ea00c3a chore(deps): update actions/checkout action to v2.4.0 (#2896)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-10 22:21:30 +01:00
renovate[bot]
6ca7cced1e chore(deps): update actions/setup-node action to v2.5.1 (#2897)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-10 22:20:47 +01:00
renovate[bot]
9e27aa9d3c chore(deps): update dependency @types/lodash to v4.14.178 (#2893)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-10 00:16:37 +01:00
renovate[bot]
63c2ec1f89 chore(deps): update dependency @types/express to v4.17.13 (#2889) 2022-01-09 23:44:54 +01:00
renovate[bot]
bd738ecf60 fix(deps): update dependency fast-safe-stringify to v2.1.1 (#2891) 2022-01-09 23:21:08 +01:00
renovate[bot]
a6131f0748 chore(deps): update dependency @types/express-serve-static-core to v4.17.27 (#2890)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-01-09 22:44:02 +01:00
Juan Picado
22cfea0907 fix: update docker to v14.18.2 (#2888) 2022-01-09 22:15:12 +01:00
Juan Picado
ec98159c3c fix: update babel and core dependencies (#2887) 2022-01-09 22:02:47 +01:00
Juan Picado
558fcafc71 build: format code prettier, enable ci (#2886)
* fix: format code prettier, enable ci

* chore: add trivago import prettier pluggin
2022-01-09 20:51:50 +01:00
renovate[bot]
23d0bd7056 fix(deps): update all non-major linting dependencies (5.x) (#2885)
* fix(deps): update all non-major linting dependencies

* fix lint issues

* chore: increase timeout

* chore: increase timeout

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Juan Picado <juanpicado19@gmail.com>
2022-01-09 20:31:26 +01:00
renovate[bot]
1ec77e7605 fix(deps): update dependency pino to v6.13.4 (#2829) 2021-12-31 15:08:57 +01:00
Juan Picado
7423e3d008 chore(release): 5.4.0 2021-12-24 19:15:15 +01:00
Juan Picado
5b1264c733 feat: allow override user rate limit and user agent (#2803)
* feat: allow override user rate limit

- improve user_agent config allow string

* chore: fix tests

* chore: refactor userRateLimit

* chore: remove comment

* chore: optional prop

* chore: refactor limiter

* chore: refactor endpoints

* chore: fix undefined

* chore: fix params

* chore: fix params

* chore: update ui

* chore: refactor limiter

* chore: fix tests

* chore: fix test
2021-12-24 19:04:15 +01:00
Juan Picado
f64e403f0a feat: add rate limit to user api endpoints (#2800) (#2799)
* feat: add rate limit to user api endpoints

* chore: fix test

* chore: refactor token endpoint

* chore: refactor
2021-12-24 01:07:26 +01:00
Juan Picado
c91d6beb8b feat: add rate limit to web endpoints (#2799)
* feat: add rate limit to web endpoints

* fix: types express conflict

* fix: undefined issue

* fix: tests
2021-12-23 17:35:31 +01:00
Juan Picado
b2b3804f87 build: enable Node 17 on CI and npm8 on E2E (#2795)
* chore: increase ci e2e settings

* fix: ci for node 17

* chore: restore versions

* chore: fix tests

* chore: fix tests

* chore: fix domain

* chore: restore yarn on angular

* chore: rename tests

* chore: fix syntax

* chore: disable yarn angular
2021-12-23 00:14:53 +01:00
Juan Picado
e5d79ce8f0 feat: user agent is the client by default (#2793)
* feat: user agent is the client by default

* chore: get user agent fix

* chore: disable x-powered-by
2021-12-21 23:09:31 +01:00
renovate[bot]
46e583f683 fix(deps): update dependency body-parser to v1.19.1 (#2788)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-21 20:33:03 +01:00
renovate[bot]
c5c0ef8750 fix(deps): update dependency @verdaccio/commons-api to v10.1.0 (#2789)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-12-21 17:27:03 +01:00
Juan Picado
fd3ad1e546 feat: add cache-control header to endpoints (#2791)
Add no cache to endpoints that returns tokens in the body
2021-12-20 23:11:17 +01:00
Juan Picado
1c17d0986e feat: jwt default time new set (#2787)
Reduce 7 days to 1 hour as expiration time to improve security measures.
2021-12-20 08:09:18 +01:00
Juan Picado
e1a9bb46ff chore: add docker all hands talk 2021-12-16 18:29:04 +01:00
Juan Picado
e37e9fe15c chore(release): 5.3.2 2021-12-16 17:30:26 +01:00
贾顺名(Jarvis)
b5ac3c0f28 fix: publish with deprecated field (#2771)
* fix: publish with deprecated field by @Jiasm 

When publish with deprecated field in `package.json`, that will make all old versions miss.

Examples:

I have package@1.0.0 and package@1.0.1.

When `npm deprecate package@1.0.0 "xxx"`, Verdaccio will recived:

```json
{
  "name": "module_name",
  "version": {
    "1.0.0": {
      "deprecated": "xxx"
    },
    "1.0.1": {}
  }
}
```

⬆️ This make sense

But then publish new version with @1.0.2.

Verdaccio will recived:

```json
{
  "name": "module_name",
  "version": {
    "1.0.2": {
      "deprecated": "xxx" // if we set this field in package.json
    },
  }
}
```

and that metadata will override package.json, make old version miss.

migrate from #2766

* remove spaces

* fix: ignore empty package case

* fix: cover normal unpublish case

* refactor: Optimize check logic for lazy execution

* test: upgrade Jest Snapshot

* fix: set storage.getPackage `uplinksLook: false`.

* feat: use `_attachments` to distinguish deprecate

* test: rollback test snapshots

* test: rollback jest snapshots

* test: publish new version with deprecate field

* test: remove space
2021-12-16 16:17:52 +01:00
Juan Picado
3b2ec6cbfa chore: update readme 2021-12-15 23:25:26 +01:00
Juan Picado
f575ab767c chore(release): 5.3.1 2021-12-12 00:06:56 +01:00
Juan Picado
29d4551e5b fix: conflict core-js dependency (#2754)
* chore: remove core-js

* fix: update verdaccio core dependencies
2021-12-12 00:06:34 +01:00
Juan Picado
e747b9a3ad chore(release): 5.3.0 2021-12-08 22:29:13 +01:00
coolsp
820c9d5db2 fix: markdown anchor links in package readme.md broken #2712 2021-12-01 23:33:25 +01:00
Juan Picado
60cd25ce4f fix: update pnpm and bum up core deps (#2716) 2021-11-29 15:52:27 +01:00
renovate[bot]
8c074e8f24 fix(deps): update dependency verdaccio-audit to v10.0.3 (#2710)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-28 15:47:50 +01:00
renovate[bot]
74d7d02c39 fix(deps): update dependency @verdaccio/streams to v10.0.1 (#2709)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-28 15:47:35 +01:00
renovate[bot]
41cadccaef fix(deps): update dependency @verdaccio/readme to v10.0.1 (#2708)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-27 18:20:41 +01:00
renovate[bot]
73d565f5f5 fix(deps): update dependency @verdaccio/commons-api to v10.0.2 (#2706)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-27 18:20:21 +01:00
renovate[bot]
8e2884836b fix(deps): update dependency verdaccio-htpasswd to v10.0.1 (#2711) 2021-11-27 17:48:33 +01:00
renovate[bot]
eee19a5f79 fix(deps): update dependency http-errors to v1.8.1 (#2705)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-27 16:57:38 +01:00
Juan Picado
46a4e8e2e0 chore(release): 5.2.2 2021-11-08 10:33:44 +01:00
Juan Picado
0eab3e1746 fix: update python dependency on docker image (#2644) 2021-11-08 10:17:47 +01:00
Juan Picado
4fc5b59eca chore(release): 5.2.1 2021-11-08 09:15:33 +01:00
renovate[bot]
bfa7b34994 chore(deps): update dependency standard-version to v9.3.2 (#2637)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-05 16:59:41 +01:00
renovate[bot]
089796ca47 fix(deps): update dependency mime to v2.6.0 (#2634)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-05 07:17:07 +01:00
renovate[bot]
ef2fbff755 fix(deps): update dependency validator to v13.7.0 (#2635)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-05 07:03:37 +01:00
renovate[bot]
c6458f4ad6 chore(deps): update babel monorepo to v7.16.0 (#2631)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-04 19:47:38 +01:00
renovate[bot]
da5d7e96cb fix(deps): update dependency async to v3.2.2 (#2633)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-04 18:54:33 +01:00
Juan Picado
57bd5169f9 test: system test add logging for debuggin 2021-10-24 10:15:54 +02:00
Juan Picado
80dca8d96e chore(release): 5.2.0 2021-10-24 09:54:57 +02:00
Juan Picado
247a317ca0 feat: upgrade node docker to 14.18.1 (#2579) 2021-10-24 09:54:39 +02:00
renovate[bot]
384b3e2ce5 fix(deps): update dependency pino to v6.13.3 (#2562) 2021-10-24 08:43:00 +02:00
renovate[bot]
69091d15fb fix(deps): update dependency dayjs to v1.10.7 (#2565)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-23 11:34:29 +02:00
renovate[bot]
6a78ae0045 fix(deps): update dependency clipanion to v3.1.0 (#2561)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-22 08:17:32 +02:00
renovate[bot]
5d4e3a65ba chore(deps): update babel monorepo (#2563)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-22 08:00:10 +02:00
Juan Picado
c81458bb0d chore(release): 5.1.6 2021-09-21 20:32:28 +02:00
Juan Picado
9d7ddd9ecd fix: update dependencies security update (#2453) 2021-09-21 20:32:20 +02:00
Juan Picado
b4a5ffe9a0 chore(release): 5.1.5 2021-09-17 22:26:02 +02:00
Juan Picado
360bec9b53 fix: add finish language to ui (#2443) 2021-09-17 22:25:53 +02:00
Juan Picado
b993344c40 chore(release): 5.1.4 2021-09-07 21:21:15 +02:00
Juan Picado
2c590917b1 fix: npm7 audit fix and bulk endpoint (#2426)
* fix: npm7 audit fix and bulk endpoint

* chore: update registry

* chore: update registry
2021-09-07 21:19:44 +02:00
Juan Picado
1308ab295d chore(release): 5.1.3 2021-08-20 08:31:27 +02:00
Juan Picado
d63dcc02fa fix: update docker base image to v14.17.5 2021-08-20 08:30:59 +02:00
Juan Picado
7d9fcfb5e3 chore: disable release note steps 2021-08-20 08:28:41 +02:00
Juan Picado
2e995f5981 fix: update docker and core dependencies (#2375)
* fix: update docker base to node:14.17.5

* fix: update base dependencies

* chore: change to node:14.17.4
2021-08-12 07:56:20 +02:00
weifan she
ecfc4c3304 fix: plugin allow_publish (pkg) got a undefined version (#2315) 2021-08-12 07:41:00 +02:00
VerdaccioBot
a09a041754 Update README.md 2021-08-06 21:35:31 +02:00
Juan Picado
bab7a7f6bc chore(release): 5.1.2 2021-07-14 20:25:44 +02:00
Juan Picado
29240544b1 fix: remove token experiment flag (#2332) 2021-07-14 20:22:15 +02:00
Juan Picado
7180338c44 fix: update dependencies (#2333) 2021-07-14 20:21:41 +02:00
Juan Picado
2bc590895c fix: update docker base image node 14.17.3 2021-07-14 19:57:46 +02:00
Juan Picado
b8f711afab fix: update docker base image node 14.17.1 (#2314)
* fix: update docker base image node 14.17.2

* fix: update docker base image node 14.17.1
2021-07-03 13:09:37 +02:00
Juan Picado
4fe8ddf7c7 fix: update dependencies (#2303) 2021-06-23 19:39:20 +02:00
Juan Picado
b421ed87c4 fix: update dependencies (#2291)
* chore: update deps

* chore: restore jest
2021-06-12 07:59:26 +02:00
Juan Picado
da810f4a18 chore: fix release script (#2289)
* chore: fix release script

* chore: fix lint

* chore: restore file
2021-06-12 07:39:33 +02:00
Juan Picado
f272c11c48 chore(release): 5.1.1 2021-06-12 06:22:51 +02:00
Juan Picado
558dd3f3c6 fix: add logger fatal if fails on startup (#2288)
fix #2287
2021-06-12 06:19:26 +02:00
Juan Picado
38ca095fb0 fix: improve get headers from request #2190 (#2271)
* fix: improve request header handling

* chore: fix test

* chore: apply suggestion
2021-05-26 20:07:13 +02:00
Juan Picado
b5ee7039e3 chore(release): 5.1.0 2021-05-24 08:33:50 +02:00
Juan Picado
f1cfae4d35 chore: remove prepublish 2021-05-24 08:31:00 +02:00
Juan Picado
b2d6f3657a chore: add missing dependency 2021-05-24 08:23:45 +02:00
Juan Picado
2d7d8143e9 chore: remove try catch not need it 2021-05-22 14:49:11 +02:00
Juan Picado
8434cc550f fix: restore using local path web logo (#2270)
* fix: logo loaded locally

* chore: fix lint
2021-05-22 14:46:47 +02:00
Juan Picado
1e4c900dcb fix: update core dependencies (#2269) 2021-05-22 09:57:07 +02:00
Juan Picado
4ed7286bcb feat: update Node.js docker image 14.17.0 (#2247) 2021-05-15 16:54:45 +02:00
Juan Picado
251bd95373 feat: implement search v1 endpoint (#2256)
* feat: implement search v1 endpoint

* add allow_access

* chore: add types

* chore: format

* fix eslint prettier

* chore: add tests

* add tests

* chore: add npm search cli
2021-05-15 16:39:03 +02:00
Juan Picado
6be108917e chore: update dependencies (#2255) 2021-05-14 08:27:54 +02:00
Juan Picado
f168b2512e chore: disable yarn local cache enableGlobalCache (#2254)
* chore: add yarn local  cache

* update list files docker publish

* add example extending with plugins and yarn2
2021-05-14 08:04:19 +02:00
Juan Picado
69d7df20d8 build: enable pnp yarn2 (#2253)
* chore: enable pnp yarn

* chore: ignore pnp

* fix type issues on run eslint

* add missing dependency and fix some errors

* fix most of the errors

some were just disabled, already fixed in master

* add missing jest-config

* update jest@26 align with other deps

* add missing @babel/register

* clean up

* use yarn node

* use yarn node on release

* chore: add husky 6

* chore: add husky 6

* chore: lint-stage

* chore: test

* chore: add hook git

* chore: test

* chore: test

* update deps

* chore: fix commit lint

* fix docker run

* update git ignore
2021-05-13 23:13:57 +02:00
Juan Picado
351ea89df6 chore: update yarn@2.4.1 (#2252)
* feat: update Node.js docker image 14.17.0

* chore: update yarn2

* feat: restore file

* chore: update docker file ignore
2021-05-13 17:41:20 +02:00
Favo Yang
78d04cf9f8 feat: tarball url redirect (#1688)
* feat: tarball url redirect

* fix: handle uplinks

* feat: allow function for config.tarball_url_redirect

* fix:  hasLocalTarball was calling localStream,abort when already aborted

* chore: simplify localStream null check in hasLocalTarball

As requested in PR feedback.

* chore: fix sonarcloud code smell on test

the variable `credentials` was already declared before the tarball url tests.

* fix: move tarball_url_redirect to experiments

Co-authored-by: Gord Lea <johlea@cisco.com>
Co-authored-by: Gord Lea <jgordonlea@gmail.com>
2021-05-03 20:53:00 +02:00
Juan Picado
255650b91a chore(release): 5.0.4 2021-04-28 07:19:25 +02:00
Claude
01c5d2ca27 fix: scoped query support (#2208) 2021-04-28 07:18:30 +02:00
Juan Picado
6fb388e366 chore(release): 5.0.3 2021-04-27 22:33:40 +02:00
Juan Picado
ced47d56fc fix: update @verdaccio/ui-theme (#2207) 2021-04-27 22:28:01 +02:00
Juan Picado
848c0ee499 chore(release): 5.0.2 2021-04-27 19:53:38 +02:00
Claude
d8b62cff53 fix: incorrect sanity check for theme plugin (#2205) 2021-04-27 19:53:12 +02:00
Juan Picado
825c1fc688 Update README.md 2021-04-22 22:55:05 +02:00
Juan Picado
8074bae190 chore: remove workflow
not need it on 5.x
2021-04-21 22:36:05 +02:00
Juan Picado
aae3e4356b chore: test on node 16 2021-04-21 21:44:12 +02:00
Juan Picado
6a1cdeaec4 chore(release): 5.0.1 2021-04-10 11:13:03 +02:00
Juan Picado
782dd1ca93 fix: logo and favicon configuration (#2180) 2021-04-10 11:09:50 +02:00
Juan Picado
e56fd19968 chore: prepare 5.x 2021-04-09 18:38:26 +02:00
1766 changed files with 38799 additions and 6919 deletions

View File

@@ -9,18 +9,21 @@
# you can add exceptions like in .gitignore to maintain a whitelist:
# e.g.
!babel.config.js
!.eslintrc
!eslintrc.js
!.prettierrc
!.eslintignore
!.stylelintrc
!.jest.config.js
!.jestEnvironment.js
!.yarnrc.yml
!.yarn/releases/yarn-berry.cjs
!.yarn/releases/yarn-*.cjs
!.yarn/plugins/*
!.pnp.js
# do not copy over node_modules we will run `npm install` anyway
# just in case, yarn 2 pnp is enabled
node_modules
.husky/
.git/
# output from test runs and similar things
*.log

View File

@@ -20,3 +20,4 @@ test/unit/partials/
types/custom.d.ts
docker-examples/
LICENSE
.pnp.js

102
.eslintrc
View File

@@ -1,102 +0,0 @@
{
"extends": [
"eslint:recommended",
"google",
"plugin:react/recommended",
"plugin:jest/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
"plugin:jsx-a11y/recommended",
"prettier"
],
"plugins": ["import", "jest", "jsx-a11y", "react-hooks"],
"env": {
"es6": true,
"node": true,
"jest": true
},
"globals": {
"__APP_VERSION__": true
},
"parserOptions": {
"allowImportExportEverywhere": true,
"sourceType": "module",
"ecmaVersion": 11,
"ecmaFeatures": {
"impliedStrict": true,
"jsx": true
}
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"parser": "@typescript-eslint/parser",
"rules": {
"curly": ["error", "all"],
"react/prop-types": 0,
"jest/no-export": 0,
"jest/no-test-callback": 0,
"jest/expect-expect": 0,
"jest/no-try-expect": 0,
"jest/no-done-callback": "off",
"jest/no-conditional-expect": "off",
"keyword-spacing": "off",
"no-tabs": "off",
"no-useless-escape": "off",
"padded-blocks": "off",
"require-jsdoc": "off",
"valid-jsdoc": "off",
"import/order": ["error"],
"eol-last": "error",
"no-irregular-whitespace": "error",
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
"no-trailing-spaces": "error",
"camelcase": "off",
"guard-for-in": "error",
"new-cap": "error",
"max-len": ["error", 180],
"no-console": ["error", { "allow": ["warn"] }],
"no-constant-condition": "error",
"no-debugger": "error",
"no-empty": "error",
"no-fallthrough": "error",
"no-invalid-this": "error",
"no-new-require": "error",
"no-undef": "error",
"no-unreachable": "error",
"no-var": "error",
"one-var": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"handle-callback-err": 0,
"prefer-const": 0,
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-inferrable-types": 0,
"@typescript-eslint/no-empty-function": 0,
"@typescript-eslint/no-this-alias": 0,
"@typescript-eslint/no-use-before-define": 0,
"@typescript-eslint/array-type": ["error"],
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/indent": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/ban-types": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
// rules to fix
"no-unused-vars": ["warn", { "vars": "all", "args": "none" }],
"jest/no-identical-title": ["warn"],
"prefer-promise-reject-errors": ["warn"],
"jest/no-disabled-tests": ["warn"],
"jest/no-commented-out-tests": ["warn"],
"@typescript-eslint/prefer-optional-chain": ["warn"],
"@typescript-eslint/explicit-member-accessibility": ["warn"],
"@typescript-eslint/no-unused-vars": ["warn"]
}
}

View File

@@ -14,9 +14,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2.3.1
- uses: actions/checkout@v2.4.0
- name: Use Node ${{ matrix.node_version }}
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.5.1
with:
node-version: ${{ matrix.node_version }}
- name: Install

View File

@@ -14,9 +14,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2.3.1
- uses: actions/checkout@v2.4.0
- name: Use Node ${{ matrix.node_version }}
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.5.1
with:
node-version: ${{ matrix.node_version }}
- name: Install

View File

@@ -9,20 +9,22 @@ jobs:
strategy:
fail-fast: false
matrix:
node_version: [12, 14, 15]
node_version: [12, 14, 15, 16, 17]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v2.4.0
- name: Use Node ${{ matrix.node_version }}
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.5.1
with:
node-version: ${{ matrix.node_version }}
- name: Install
run: yarn install --immutable
- name: Build
run: yarn code:build
- name: Format
run: yarn format:check
- name: Lint
run: yarn lint
- name: Test

View File

@@ -1,52 +0,0 @@
name: "Code scanning - action"
on:
push:
pull_request:
schedule:
- cron: '0 2 * * 4'
jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest and windows-latest
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2.3.3
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@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
# 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@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@@ -7,17 +7,17 @@ jobs:
name: Test Docker Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v2.4.0
- name: Build
run: docker build .
env:
VERDACCIO_BUILD_REGISTRY: https://registry.verdaccio.org
VERDACCIO_BUILD_REGISTRY: https://registry.npmjs.org
testVerdaccio:
name: Test Verdaccio Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v2.4.0
- name: Publish
uses: verdaccio/github-actions/publish@v0.4.0
with:

View File

@@ -11,6 +11,9 @@ on:
- 'bin/**'
- 'package.json'
- 'yarn.lock'
- '.yarn/**'
- '.yarnrc.yaml'
- '.pnp.js'
branches:
- '**'
tags:
@@ -36,7 +39,7 @@ jobs:
with:
images: ${{ github.repository }}
tag-custom: 5.x-next
tag-custom-only: ${{ github.ref == 'refs/heads/master' }}
tag-custom-only: ${{ github.ref == 'refs/heads/5.x' }}
tag-semver: |
{{version}}
{{major}}

View File

@@ -7,49 +7,49 @@ on:
name: 'E2E Angular CLI with verdaccio'
jobs:
# todo: fix yarn global issue, cannot find ng
# yarn:
# name: 'yarn:angular example'
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v2.3.3
#
# - name: 'Use Node.js 10.x'
# uses: actions/setup-node@v2.1.5
# with:
# node-version: 10.x
# - name: Install Dependencies
# run: yarn install --pure-lockfile
# - name: 'Run verdaccio in the background'
# run: |
# nohup node ./scripts/run-verdaccio.js &
# - 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 global add @angular/cli
# which nodemon
# ng new verdaccio-angular --interactive=false
#
# cd verdaccio-angular
# echo "registry=http://localhost:4873" > ~/.npmrc
# yarn add @angular-devkit/core@next @babel/preset-env @babel/core -D
#
# ng build --aot
# todo: fix yarn global issue, cannot find ng
# yarn:
# name: 'yarn:angular example'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2.3.3
# - name: 'Use Node.js 14.x'
# uses: actions/setup-node@v2.1.5
# with:
# node-version: 14.x
# - name: Install Dependencies
# run: yarn install --pure-lockfile
# - name: 'Run verdaccio in the background'
# run: |
# nohup yarn node ./scripts/run-verdaccio.js &
# - 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 global add @angular/cli
# which nodemon
# ng new verdaccio-angular --interactive=false
# cd verdaccio-angular
# echo "registry=http://localhost:4873" > ~/.npmrc
# yarn add @angular-devkit/core@next @babel/preset-env @babel/core -D
# ng build --aot
npm:
name: 'npm:angular example'
name: 'npm6:angular example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v2.4.0
- name: 'Use Node.js 14.x'
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.5.1
with:
node-version: 14.x
- name: 'install latest npm'
@@ -58,7 +58,7 @@ jobs:
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
@@ -83,10 +83,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v2.4.0
- name: 'Use Node.js 14.x'
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.5.1
with:
node-version: 14.x
- name: 'install latest npm'
@@ -95,7 +95,44 @@ jobs:
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
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
npm8:
name: 'npm8:angular example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: 'Use Node.js 16.x'
uses: actions/setup-node@v2.5.1
with:
node-version: 16.x
- 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
@@ -134,7 +171,7 @@ jobs:
# run: yarn install --pure-lockfile
# - name: 'Run verdaccio in the background'
# run: |
# nohup node ./scripts/run-verdaccio.js &
# nohup yarn node ./scripts/run-verdaccio.js &
# - name: 'Ping to verdaccio'
# run: |
# pnpm ping --registry http://localhost:4873

View File

@@ -7,24 +7,94 @@ on:
name: 'E2E Gatsby.js CLI with verdaccio'
jobs:
npm:
npm6:
name: 'npm:gatsby example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v2.4.0
- name: 'Use Node.js 14.x'
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.5.1
with:
node-version: 14.x
- name: 'install latest npm'
- name: 'install npm 6'
run: npm i -g npm@latest-6
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
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="silent"
fetch-retries=10
fetch-retry-factor=2
fetch-retry-mintimeout=10000
fetch-retry-maxtimeout=80000" > ~/.npmrc
npm config list
npm i -g gatsby
gatsby new my-gatsby
cd my-gatsby
npm run build
npm7:
name: 'npm7:gatsby example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: 'Use Node.js 14.x'
uses: actions/setup-node@v2.5.1
with:
node-version: 14.x
- name: 'install npm 7'
run: npm i -g npm@latest-7
- 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="silent"
fetch-retries=10
fetch-retry-factor=2
fetch-retry-mintimeout=10000
fetch-retry-maxtimeout=80000" > ~/.npmrc
npm config list
npm i -g gatsby
gatsby new my-gatsby
cd my-gatsby
npm run build
npm8:
name: 'npm8:gatsby example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- name: 'Use Node.js 16.x'
uses: actions/setup-node@v2.5.1
with:
node-version: 16.x
- name: 'install npm 8'
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

View File

@@ -12,17 +12,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v2.4.0
- name: 'Use Node.js 12.x'
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.5.1
with:
node-version: 12.x
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
@@ -43,17 +43,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v2.4.0
- name: 'Use Node.js 12.x'
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.5.1
with:
node-version: 12.x
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
@@ -77,10 +77,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v2.4.0
- name: 'Use Node.js 12.x'
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.5.1
with:
node-version: 12.x
- name: 'install latest npm'
@@ -89,7 +89,7 @@ jobs:
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
@@ -110,19 +110,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v2.4.0
- name: 'Use Node.js 12.x'
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.5.1
with:
node-version: 12.x
- name: 'install latest npm'
run: npm i -g npm
run: npm i -g npm@next-7
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
nohup yarn node ./scripts/run-verdaccio.js --config ./scripts/e2e-config.yaml &
- name: 'Ping to verdaccio'
run: |
npm ping --registry http://localhost:4873
@@ -140,14 +140,14 @@ jobs:
yarn jest module.test.js
pnpm:
name: 'pnpm:jest example'
name: 'pnpm:latest:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v2.4.0
- name: 'Use Node.js 12.x'
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.5.1
with:
node-version: 12.x
- name: 'install latest pnpm'
@@ -156,7 +156,7 @@ jobs:
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup node ./scripts/run-verdaccio.js &
nohup yarn node ./scripts/run-verdaccio.js &
- name: 'Ping to verdaccio'
run: |
pnpm ping --registry http://localhost:4873
@@ -172,38 +172,3 @@ jobs:
yarn add left-pad --registry http://localhost:4873 --verbose
echo "const leftPad = require('left-pad'); it('should resolve a module', () => { expect(typeof leftPad).toBe('function');});" | tee module.test.js
yarn jest module.test.js
pnpm6:
name: 'pnpm6:jest example'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- name: 'Use Node.js 12.x'
uses: actions/setup-node@v2.1.5
with:
node-version: 12.x
- name: 'install latest pnpm'
run: sudo npm i pnpm@dev -g
- name: Install Dependencies
run: yarn install
- name: 'Run verdaccio in the background'
run: |
nohup 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 --force
pnpm install jest --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

View File

@@ -4,29 +4,27 @@ on:
push:
tags:
- '*'
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.3
- uses: actions/checkout@v2.4.0
- name: Use Node (latest)
uses: actions/setup-node@v2.1.5
uses: actions/setup-node@v2.5.1
with:
node-version: 14
- name: Install
run: yarn install
- name: Build
run: yarn code:build
- name: Lint
run: yarn lint
- 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 }}
# FIXME: there is an issue where all the changelog is copied to the release notes (all versions)
# - name: Create release notes
# run: sh scripts/github-release.sh
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

12
.gitignore vendored
View File

@@ -1,4 +1,4 @@
npm-debug.log
verdaccio-*.tgz
.DS_Store
build/
@@ -21,19 +21,13 @@ package-lock.json
npm_test-fails-add-tarball*
yarn-error.log
# Istanbul
# coverage
reports/
coverage/
.nyc*
# IDE
.idea/
# React
bundle.js
bundle.js.map
__tests__
# Compiled script
static/*

1
.husky/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
_

4
.husky/commit-msg Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn commitlint --edit "$1"

4
.husky/pre-commit Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn lint-staged

28878
.pnp.js generated Executable file

File diff suppressed because one or more lines are too long

View File

@@ -30,3 +30,4 @@ docker-examples/
.npmignore
.gitignore
*.ico
.pnp.js

View File

@@ -1,11 +0,0 @@
{
"endOfLine": "lf",
"useTabs": false,
"printWidth": 180,
"tabWidth": 2,
"singleQuote": true,
"bracketSpacing": true,
"jsxBracketSameLine": true,
"trailingComma": "es5",
"semi": true
}

13
.vscode/extensions.json vendored Normal file
View File

@@ -0,0 +1,13 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"EditorConfig.EditorConfig",
"dbaeumer.vscode-eslint",
"arcanis.vscode-zipfs",
"esbenp.prettier-vscode"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}

1
.vscode/launch.json vendored
View File

@@ -4,6 +4,7 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
"processId": "${command:PickProcess}",
{
"type": "node",
"request": "launch",

30
.vscode/settings.json vendored
View File

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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

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