@verdaccio/web 6.0.0-6-next.63 → 7.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +484 -0
  2. package/package.json +16 -16
package/CHANGELOG.md CHANGED
@@ -1,5 +1,489 @@
1
1
  # @verdaccio/web
2
2
 
3
+ ## 7.0.0-next.0
4
+
5
+ ### Major Changes
6
+
7
+ - feat!: bump to v7
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @verdaccio/auth@7.0.0-next.0
13
+ - @verdaccio/config@7.0.0-next.0
14
+ - @verdaccio/core@7.0.0-next.0
15
+ - @verdaccio/tarball@12.0.0-next.0
16
+ - @verdaccio/url@12.0.0-next.0
17
+ - @verdaccio/loaders@7.0.0-next.0
18
+ - @verdaccio/logger@7.0.0-next.0
19
+ - @verdaccio/middleware@7.0.0-next.0
20
+ - @verdaccio/store@7.0.0-next.0
21
+ - @verdaccio/utils@7.0.0-next.0
22
+
23
+ ## 6.0.0
24
+
25
+ ### Major Changes
26
+
27
+ - 292c0a37f: feat!: replace deprecated request dependency by got
28
+
29
+ This is a big refactoring of the core, fetching dependencies, improve code, more tests and better stability. This is essential for the next release, will take some time but would allow modularize more the core.
30
+
31
+ ## Notes
32
+
33
+ - Remove deprecated `request` by other `got`, retry improved, custom Agent ( got does not include it built-in)
34
+ - Remove `async` dependency from storage (used by core) it was linked with proxy somehow safe to remove now
35
+ - Refactor with promises instead callback wherever is possible
36
+ - ~Document the API~
37
+ - Improve testing, integration tests
38
+ - Bugfix
39
+ - Clean up old validations
40
+ - Improve performance
41
+
42
+ ## 💥 Breaking changes
43
+
44
+ - Plugin API methods were callbacks based are returning promises, this will break current storage plugins, check documentation for upgrade.
45
+ - Write Tarball, Read Tarball methods parameters change, a new set of options like `AbortController` signals are being provided to the `addAbortSignal` can be internally used with Streams when a request is aborted. eg: `addAbortSignal(signal, fs.createReadStream(pathName));`
46
+ - `@verdaccio/streams` stream abort support is legacy is being deprecated removed
47
+ - Remove AWS and Google Cloud packages for future refactoring [#2574](https://github.com/verdaccio/verdaccio/pull/2574).
48
+
49
+ - 459b6fa72: refactor: search v1 endpoint and local-database
50
+
51
+ - refactor search `api v1` endpoint, improve performance
52
+ - remove usage of `async` dependency https://github.com/verdaccio/verdaccio/issues/1225
53
+ - refactor method storage class
54
+ - create new module `core` to reduce the ammount of modules with utilities
55
+ - use `undici` instead `node-fetch`
56
+ - use `fastify` instead `express` for functional test
57
+
58
+ ### Breaking changes
59
+
60
+ - plugin storage API changes
61
+ - remove old search endpoint (return 404)
62
+ - filter local private packages at plugin level
63
+
64
+ The storage api changes for methods `get`, `add`, `remove` as promise base. The `search` methods also changes and recieves a `query` object that contains all query params from the client.
65
+
66
+ ```ts
67
+ export interface IPluginStorage<T> extends IPlugin {
68
+ add(name: string): Promise<void>;
69
+ remove(name: string): Promise<void>;
70
+ get(): Promise<any>;
71
+ init(): Promise<void>;
72
+ getSecret(): Promise<string>;
73
+ setSecret(secret: string): Promise<any>;
74
+ getPackageStorage(packageInfo: string): IPackageStorage;
75
+ search(query: searchUtils.SearchQuery): Promise<searchUtils.SearchItem[]>;
76
+ saveToken(token: Token): Promise<any>;
77
+ deleteToken(user: string, tokenKey: string): Promise<any>;
78
+ readTokens(filter: TokenFilter): Promise<Token[]>;
79
+ }
80
+ ```
81
+
82
+ - 9fc2e7961: feat(plugins): improve plugin loader
83
+
84
+ ### Changes
85
+
86
+ - Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227
87
+ - Avoid config collisions https://github.com/verdaccio/verdaccio/issues/928
88
+ - https://github.com/verdaccio/verdaccio/issues/1394
89
+ - `config.plugins` plugin path validations
90
+ - Updated algorithm for plugin loader.
91
+ - improved documentation (included dev)
92
+
93
+ ## Features
94
+
95
+ - Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227
96
+ - Custom prefix:
97
+
98
+ ```
99
+ // config.yaml
100
+ server:
101
+ pluginPrefix: mycompany
102
+ middleware:
103
+ audit:
104
+ foo: 1
105
+ ```
106
+
107
+ This configuration will look up for `mycompany-audit` instead `Verdaccio-audit`.
108
+
109
+ ## Breaking Changes
110
+
111
+ ### sinopia plugins
112
+
113
+ - `sinopia` fallback support is removed, but can be restored using `pluginPrefix`
114
+
115
+ ### plugin filter
116
+
117
+ - method rename `filter_metadata`->`filterMetadata`
118
+
119
+ ### Plugin constructor does not merge configs anymore https://github.com/verdaccio/verdaccio/issues/928
120
+
121
+ The plugin receives as first argument `config`, which represents the config of the plugin. Example:
122
+
123
+ ```
124
+ // config.yaml
125
+ auth:
126
+ plugin:
127
+ foo: 1
128
+ bar: 2
129
+
130
+ export class Plugin<T> {
131
+ public constructor(config: T, options: PluginOptions) {
132
+ console.log(config);
133
+ // {foo:1, bar: 2}
134
+ }
135
+ }
136
+ ```
137
+
138
+ - 794af76c5: Remove Node 12 support
139
+
140
+ - We need move to the new `undici` and does not support Node.js 12
141
+
142
+ - 10aeb4f13: feat!: experiments config renamed to flags
143
+
144
+ - The `experiments` configuration is renamed to `flags`. The functionality is exactly the same.
145
+
146
+ ```js
147
+ flags: token: false;
148
+ search: false;
149
+ ```
150
+
151
+ - The `self_path` property from the config file is being removed in favor of `config_file` full path.
152
+ - Refactor `config` module, better types and utilities
153
+
154
+ - e367c3f1e: - Replace signature handler for legacy tokens by removing deprecated crypto.createDecipher by createCipheriv
155
+
156
+ - Introduce environment variables for legacy tokens
157
+
158
+ ### Code Improvements
159
+
160
+ - Add debug library for improve developer experience
161
+
162
+ ### Breaking change
163
+
164
+ - The new signature invalidates all previous tokens generated by Verdaccio 4 or previous versions.
165
+ - The secret key must have 32 characters long.
166
+
167
+ ### New environment variables
168
+
169
+ - `VERDACCIO_LEGACY_ALGORITHM`: Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`
170
+ - `VERDACCIO_LEGACY_ENCRYPTION_KEY`: By default, the token stores in the database, but using this variable allows to get it from memory
171
+
172
+ - 82cb0f2bf: feat!: config.logs throw an error, logging config not longer accept array or logs property
173
+
174
+ ### 💥 Breaking change
175
+
176
+ This is valid
177
+
178
+ ```yaml
179
+ log: { type: stdout, format: pretty, level: http }
180
+ ```
181
+
182
+ This is invalid
183
+
184
+ ```yaml
185
+ logs: { type: stdout, format: pretty, level: http }
186
+ ```
187
+
188
+ or
189
+
190
+ ```yaml
191
+ logs:
192
+ - [{ type: stdout, format: pretty, level: http }]
193
+ ```
194
+
195
+ - 000d43746: feat: upgrade to material ui 5
196
+ - 558d78f32: feat: flexible user interface generator
197
+
198
+ **breaking change**
199
+
200
+ The UI does not provide a pre-generated `index.html`, instead the server generates
201
+ the body of the web application based in few parameters:
202
+
203
+ - Webpack manifest
204
+ - User configuration details
205
+
206
+ It allows inject html tags, javascript and new CSS to make the page even more flexible.
207
+
208
+ ### Web new properties for dynamic template
209
+
210
+ The new set of properties are made in order allow inject _html_ and _JavaScript_ scripts within the template. This
211
+ might be useful for scenarios like Google Analytics scripts or custom html in any part of the body.
212
+
213
+ - metaScripts: html injected before close the `head` element.
214
+ - scriptsBodyAfter: html injected before close the `body` element.
215
+ - bodyAfter: html injected after _verdaccio_ JS scripts.
216
+
217
+ ```yaml
218
+ web:
219
+ scriptsBodyAfter:
220
+ - '<script type="text/javascript" src="https://my.company.com/customJS.min.js"></script>'
221
+ metaScripts:
222
+ - '<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>'
223
+ - '<script type="text/javascript" src="https://browser.sentry-cdn.com/5.15.5/bundle.min.js"></script>'
224
+ - '<meta name="robots" content="noindex" />'
225
+ bodyBefore:
226
+ - '<div id="myId">html before webpack scripts</div>'
227
+ bodyAfter:
228
+ - '<div id="myId">html after webpack scripts</div>'
229
+ ```
230
+
231
+ ### UI plugin changes
232
+
233
+ - `index.html` is not longer used, template is generated based on `manifest.json` generated by webpack.
234
+ - Plugin must export:
235
+ - the manifest file.
236
+ - the manifest files: matcher (array of id that generates required scripts to run the ui)
237
+ - static path: The absolute path where the files are located in `node_modules`
238
+
239
+ ```
240
+ exports.staticPath = path.join(__dirname, 'static');
241
+ exports.manifest = require('./static/manifest.json');
242
+ exports.manifestFiles = {
243
+ js: ['runtime.js', 'vendors.js', 'main.js'],
244
+ css: [],
245
+ ico: 'favicon.ico',
246
+ };
247
+ ```
248
+
249
+ - Remove font files
250
+ - CSS is inline on JS (this will help with #2046)
251
+
252
+ ### Docker v5 Examples
253
+
254
+ - Move all current examples to v4 folder
255
+ - Remove any v3 example
256
+ - Create v5 folder with Nginx Example
257
+
258
+ #### Related tickets
259
+
260
+ https://github.com/verdaccio/verdaccio/issues/1523
261
+ https://github.com/verdaccio/verdaccio/issues/1297
262
+ https://github.com/verdaccio/verdaccio/issues/1593
263
+ https://github.com/verdaccio/verdaccio/discussions/1539
264
+ https://github.com/verdaccio/website/issues/264
265
+ https://github.com/verdaccio/verdaccio/issues/1565
266
+ https://github.com/verdaccio/verdaccio/issues/1251
267
+ https://github.com/verdaccio/verdaccio/issues/2029
268
+ https://github.com/verdaccio/docker-examples/issues/29
269
+
270
+ - 781ac9ac2: fix package configuration issues
271
+
272
+ ### Minor Changes
273
+
274
+ - 0da7031e7: allow disable login on ui and endpoints
275
+
276
+ To be able disable the login, set `login: false`, anything else would enable login. This flag will disable access via UI and web endpoints.
277
+
278
+ ```yml
279
+ web:
280
+ title: verdaccio
281
+ login: false
282
+ ```
283
+
284
+ - a1986e098: feat: expose middleware utils
285
+ - 24b9be020: refactor: improve docker image build with strict dependencies and prod build
286
+ - 631abe1ac: feat: refactor logger
287
+ - a23628be9: feat: parse and sanitize on ui
288
+ - 048ac95e8: feat: align with v5 ui endpoints and ui small bugfix
289
+ - b61f762d6: feat: add server rate limit protection to all request
290
+
291
+ To modify custom values, use the server settings property.
292
+
293
+ ```markdown
294
+ server:
295
+
296
+ ## https://www.npmjs.com/package/express-rate-limit#configuration-options
297
+
298
+ rateLimit:
299
+ windowMs: 1000
300
+ max: 10000
301
+ ```
302
+
303
+ The values are intended to be high, if you want to improve security of your server consider
304
+ using different values.
305
+
306
+ - 154b2ecd3: refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplications
307
+ - aa763baec: feat: add typescript project references settings
308
+
309
+ Reading https://ebaytech.berlin/optimizing-multi-package-apps-with-typescript-project-references-d5c57a3b4440 I realized I can use project references to solve the issue to pre-compile modules on develop mode.
310
+
311
+ It allows to navigate (IDE) trough the packages without need compile the packages.
312
+
313
+ Add two `tsconfig`, one using the previous existing configuration that is able to produce declaration files (`tsconfig.build`) and a new one `tsconfig` which is enables [_projects references_](https://www.typescriptlang.org/docs/handbook/project-references.html).
314
+
315
+ - 62c24b632: feat: add passwordValidationRegex property
316
+ - d08fe29d9: feat(web): add a config item to web,let the developer can select whet……her enable the html cache
317
+ - 5167bb528: feat: ui search support for remote, local and private packages
318
+
319
+ The command `npm search` search globally and return all matches, with this improvement the user interface
320
+ is powered with the same capabilities.
321
+
322
+ The UI also tag where is the origin the package with a tag, also provide the latest version and description of the package.
323
+
324
+ - f86c31ed0: feat: migrate web sidebar endpoint to fastify
325
+
326
+ reuse utils methods between packages
327
+
328
+ - 20c9e43ed: dist tags Implementation on Fastify
329
+ - 4b29d715b: chore: move improvements from v5 to v6
330
+
331
+ Migrate improvements form v5 to v6:
332
+
333
+ - https://github.com/verdaccio/verdaccio/pull/3158
334
+ - https://github.com/verdaccio/verdaccio/pull/3151
335
+ - https://github.com/verdaccio/verdaccio/pull/2271
336
+ - https://github.com/verdaccio/verdaccio/pull/2787
337
+ - https://github.com/verdaccio/verdaccio/pull/2791
338
+ - https://github.com/verdaccio/verdaccio/pull/2205
339
+
340
+ - 37274e4c8: feat: implement abbreviated manifest
341
+
342
+ Enable abbreviated manifest data by adding the header:
343
+
344
+ ```
345
+ curl -H "Accept: application/vnd.npm.install-v1+json" https://registry.npmjs.org/verdaccio
346
+ ```
347
+
348
+ It returns a filtered manifest, additionally includes the [time](https://github.com/pnpm/rfcs/pull/2) field by request.
349
+
350
+ Current support for packages managers:
351
+
352
+ - npm: yes
353
+ - pnpm: yes
354
+ - yarn classic: yes
355
+ - yarn modern (+2.x): [no](https://github.com/yarnpkg/berry/pull/3981#issuecomment-1076566096)
356
+
357
+ https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#abbreviated-metadata-format
358
+
359
+ - 45c03819e: refactor: render html middleware
360
+ - aecbd226d: web: allow ui hide package managers on sidebar
361
+
362
+ If there is a package manager of preference over others, you can define the package managers to be displayed on the detail page and sidebar, just define in the `config.yaml` and web section the list of package managers to be displayed.
363
+
364
+ ```
365
+ web:
366
+ title: Verdaccio
367
+ sort_packages: asc
368
+ primary_color: #cccccc
369
+ pkgManagers:
370
+ - pnpm
371
+ - yarn
372
+ # - npm
373
+ ```
374
+
375
+ To disable all package managers, just define empty:
376
+
377
+ ```
378
+ web:
379
+ title: Verdaccio
380
+ sort_packages: asc
381
+ primary_color: #cccccc
382
+ pkgManagers:
383
+ ```
384
+
385
+ and the section would be hidden.
386
+
387
+ ### Patch Changes
388
+
389
+ - 702d5c497: Fix the password validation logic for the `/reset_password` route to ensure that the password is only reset if it is valid.
390
+ - 351aeeaa8: fix(deps): @verdaccio/utils should be a prod dep of local-storage
391
+ - 1d1112805: Remove @ts-ignore and any in packages/web/src/endpoint/package.ts
392
+ - a828a5f6c: fix: #3174 set correctly ui values to html render
393
+ - a610ef26b: chore: add release step to private regisry on merge changeset pr
394
+ - 4fc21146a: fix: missing logo on header
395
+ - 34f0f1101: Enable prerelease mode with **changesets**
396
+ - 5ddfa5264: Fix the search by exact name of the package
397
+
398
+ Full package name queries was not finding anithing. It was happening
399
+ becouse of stemmer of [lunr.js](https://lunrjs.com/).
400
+
401
+ To fix this, the stemmer of [lunr.js](https://lunrjs.com/) was removed from search pipeline.
402
+
403
+ - 0a6412ca9: refactor: got instead undici
404
+ - b4cc80017: fix: improve abort request search
405
+ - Updated dependencies [292c0a37f]
406
+ - Updated dependencies [dc05edfe6]
407
+ - Updated dependencies [a1986e098]
408
+ - Updated dependencies [974cd8c19]
409
+ - Updated dependencies [a828271d6]
410
+ - Updated dependencies [ef88da3b4]
411
+ - Updated dependencies [43f32687c]
412
+ - Updated dependencies [679c19c1b]
413
+ - Updated dependencies [a3a209b5e]
414
+ - Updated dependencies [459b6fa72]
415
+ - Updated dependencies [9fc2e7961]
416
+ - Updated dependencies [9943e2b18]
417
+ - Updated dependencies [ae93e039d]
418
+ - Updated dependencies [24b9be020]
419
+ - Updated dependencies [794af76c5]
420
+ - Updated dependencies [e75c0a3b9]
421
+ - Updated dependencies [351aeeaa8]
422
+ - Updated dependencies [10aeb4f13]
423
+ - Updated dependencies [1d1112805]
424
+ - Updated dependencies [631abe1ac]
425
+ - Updated dependencies [9718e0330]
426
+ - Updated dependencies [7ef599cc4]
427
+ - Updated dependencies [b702ea363]
428
+ - Updated dependencies [1b217fd34]
429
+ - Updated dependencies [e367c3f1e]
430
+ - Updated dependencies [a1da11308]
431
+ - Updated dependencies [d167f92e1]
432
+ - Updated dependencies [d2c65da9c]
433
+ - Updated dependencies [00d1d2a17]
434
+ - Updated dependencies [1810ed0d8]
435
+ - Updated dependencies [a610ef26b]
436
+ - Updated dependencies [ddb6a2239]
437
+ - Updated dependencies [31d661c7b]
438
+ - Updated dependencies [648575aa4]
439
+ - Updated dependencies [b61f762d6]
440
+ - Updated dependencies [4fc21146a]
441
+ - Updated dependencies [d43894e8f]
442
+ - Updated dependencies [154b2ecd3]
443
+ - Updated dependencies [061bfcc8d]
444
+ - Updated dependencies [aa763baec]
445
+ - Updated dependencies [378e907d5]
446
+ - Updated dependencies [16e38df8a]
447
+ - Updated dependencies [34f0f1101]
448
+ - Updated dependencies [82cb0f2bf]
449
+ - Updated dependencies [dc571aabd]
450
+ - Updated dependencies [5ddfa5264]
451
+ - Updated dependencies [b78f35257]
452
+ - Updated dependencies [ce013d2fc]
453
+ - Updated dependencies [f859d2b1a]
454
+ - Updated dependencies [2c594910d]
455
+ - Updated dependencies [6c1eb021b]
456
+ - Updated dependencies [62c24b632]
457
+ - Updated dependencies [0a6412ca9]
458
+ - Updated dependencies [0a6412ca9]
459
+ - Updated dependencies [d08fe29d9]
460
+ - Updated dependencies [5167bb528]
461
+ - Updated dependencies [f86c31ed0]
462
+ - Updated dependencies [65f88b826]
463
+ - Updated dependencies [aeff267d9]
464
+ - Updated dependencies [20c9e43ed]
465
+ - Updated dependencies [b3e8438f6]
466
+ - Updated dependencies [c9d1af0e5]
467
+ - Updated dependencies [730b5d8cc]
468
+ - Updated dependencies [4b29d715b]
469
+ - Updated dependencies [b13a3fefd]
470
+ - Updated dependencies [68ea21214]
471
+ - Updated dependencies [37274e4c8]
472
+ - Updated dependencies [fa274ee44]
473
+ - Updated dependencies [8f43bf17d]
474
+ - Updated dependencies [45c03819e]
475
+ - Updated dependencies [b849128de]
476
+ - @verdaccio/auth@6.0.0
477
+ - @verdaccio/config@6.0.0
478
+ - @verdaccio/core@6.0.0
479
+ - @verdaccio/tarball@11.0.0
480
+ - @verdaccio/url@11.0.0
481
+ - @verdaccio/loaders@6.0.0
482
+ - @verdaccio/logger@6.0.0
483
+ - @verdaccio/middleware@6.0.0
484
+ - @verdaccio/store@6.0.0
485
+ - @verdaccio/utils@6.0.0
486
+
3
487
  ## 6.0.0-6-next.63
4
488
 
5
489
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/web",
3
- "version": "6.0.0-6-next.63",
3
+ "version": "7.0.0-next.0",
4
4
  "description": "web ui middleware",
5
5
  "main": "./build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -25,30 +25,30 @@
25
25
  },
26
26
  "license": "MIT",
27
27
  "dependencies": {
28
- "@verdaccio/auth": "6.0.0-6-next.55",
29
- "@verdaccio/core": "6.0.0-6-next.76",
30
- "@verdaccio/config": "6.0.0-6-next.76",
31
- "@verdaccio/loaders": "6.0.0-6-next.45",
32
- "@verdaccio/logger": "6.0.0-6-next.44",
33
- "@verdaccio/middleware": "6.0.0-6-next.55",
34
- "@verdaccio/store": "6.0.0-6-next.56",
35
- "@verdaccio/tarball": "11.0.0-6-next.45",
36
- "@verdaccio/url": "11.0.0-6-next.42",
37
- "@verdaccio/utils": "6.0.0-6-next.44",
28
+ "@verdaccio/auth": "7.0.0-next.0",
29
+ "@verdaccio/core": "7.0.0-next.0",
30
+ "@verdaccio/config": "7.0.0-next.0",
31
+ "@verdaccio/loaders": "7.0.0-next.0",
32
+ "@verdaccio/logger": "7.0.0-next.0",
33
+ "@verdaccio/middleware": "7.0.0-next.0",
34
+ "@verdaccio/store": "7.0.0-next.0",
35
+ "@verdaccio/tarball": "12.0.0-next.0",
36
+ "@verdaccio/url": "12.0.0-next.0",
37
+ "@verdaccio/utils": "7.0.0-next.0",
38
38
  "debug": "4.3.4",
39
39
  "express": "4.18.2",
40
40
  "lodash": "4.17.21"
41
41
  },
42
42
  "devDependencies": {
43
- "@verdaccio/types": "11.0.0-6-next.25",
44
- "@verdaccio/test-helper": "2.0.0-6-next.8",
45
- "@verdaccio/api": "6.0.0-6-next.59",
43
+ "@verdaccio/types": "12.0.0-next.0",
44
+ "@verdaccio/test-helper": "3.0.0-next.0",
45
+ "@verdaccio/api": "7.0.0-next.0",
46
46
  "node-html-parser": "4.1.5",
47
47
  "supertest": "6.3.3",
48
48
  "nock": "13.2.9",
49
49
  "jsdom": "20.0.3",
50
- "verdaccio-auth-memory": "11.0.0-6-next.41",
51
- "verdaccio-memory": "11.0.0-6-next.43"
50
+ "verdaccio-auth-memory": "12.0.0-next.0",
51
+ "verdaccio-memory": "12.0.0-next.0"
52
52
  },
53
53
  "funding": {
54
54
  "type": "opencollective",