@verdaccio/api 6.0.0-6-next.58 → 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 +435 -0
  2. package/package.json +11 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,440 @@
1
1
  # @verdaccio/api
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/logger@7.0.0-next.0
16
+ - @verdaccio/middleware@7.0.0-next.0
17
+ - @verdaccio/store@7.0.0-next.0
18
+ - @verdaccio/utils@7.0.0-next.0
19
+
20
+ ## 6.0.0
21
+
22
+ ### Major Changes
23
+
24
+ - 292c0a37f: feat!: replace deprecated request dependency by got
25
+
26
+ 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.
27
+
28
+ ## Notes
29
+
30
+ - Remove deprecated `request` by other `got`, retry improved, custom Agent ( got does not include it built-in)
31
+ - Remove `async` dependency from storage (used by core) it was linked with proxy somehow safe to remove now
32
+ - Refactor with promises instead callback wherever is possible
33
+ - ~Document the API~
34
+ - Improve testing, integration tests
35
+ - Bugfix
36
+ - Clean up old validations
37
+ - Improve performance
38
+
39
+ ## 💥 Breaking changes
40
+
41
+ - Plugin API methods were callbacks based are returning promises, this will break current storage plugins, check documentation for upgrade.
42
+ - 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));`
43
+ - `@verdaccio/streams` stream abort support is legacy is being deprecated removed
44
+ - Remove AWS and Google Cloud packages for future refactoring [#2574](https://github.com/verdaccio/verdaccio/pull/2574).
45
+
46
+ - a828271d6: refactor: download manifest endpoint and integrate fastify
47
+
48
+ Much simpler API for fetching a package
49
+
50
+ ```
51
+ const manifest = await storage.getPackageNext({
52
+ name,
53
+ uplinksLook: true,
54
+ req,
55
+ version: queryVersion,
56
+ requestOptions,
57
+ });
58
+ ```
59
+
60
+ > not perfect, the `req` still is being passed to the proxy (this has to be refactored at proxy package) and then removed from here, in proxy we pass the request instance to the `request` library.
61
+
62
+ ### Details
63
+
64
+ - `async/await` sugar for getPackage()
65
+ - Improve and reuse code between current implementation and new fastify endpoint (add scaffolding for request manifest)
66
+ - Improve performance
67
+ - Add new tests
68
+
69
+ ### Breaking changes
70
+
71
+ All storage plugins will stop to work since the storage uses `getPackageNext` method which is Promise based, I won't replace this now because will force me to update all plugins, I'll follow up in another PR. Currently will throw http 500
72
+
73
+ - 459b6fa72: refactor: search v1 endpoint and local-database
74
+
75
+ - refactor search `api v1` endpoint, improve performance
76
+ - remove usage of `async` dependency https://github.com/verdaccio/verdaccio/issues/1225
77
+ - refactor method storage class
78
+ - create new module `core` to reduce the ammount of modules with utilities
79
+ - use `undici` instead `node-fetch`
80
+ - use `fastify` instead `express` for functional test
81
+
82
+ ### Breaking changes
83
+
84
+ - plugin storage API changes
85
+ - remove old search endpoint (return 404)
86
+ - filter local private packages at plugin level
87
+
88
+ 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.
89
+
90
+ ```ts
91
+ export interface IPluginStorage<T> extends IPlugin {
92
+ add(name: string): Promise<void>;
93
+ remove(name: string): Promise<void>;
94
+ get(): Promise<any>;
95
+ init(): Promise<void>;
96
+ getSecret(): Promise<string>;
97
+ setSecret(secret: string): Promise<any>;
98
+ getPackageStorage(packageInfo: string): IPackageStorage;
99
+ search(query: searchUtils.SearchQuery): Promise<searchUtils.SearchItem[]>;
100
+ saveToken(token: Token): Promise<any>;
101
+ deleteToken(user: string, tokenKey: string): Promise<any>;
102
+ readTokens(filter: TokenFilter): Promise<Token[]>;
103
+ }
104
+ ```
105
+
106
+ - 9fc2e7961: feat(plugins): improve plugin loader
107
+
108
+ ### Changes
109
+
110
+ - Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227
111
+ - Avoid config collisions https://github.com/verdaccio/verdaccio/issues/928
112
+ - https://github.com/verdaccio/verdaccio/issues/1394
113
+ - `config.plugins` plugin path validations
114
+ - Updated algorithm for plugin loader.
115
+ - improved documentation (included dev)
116
+
117
+ ## Features
118
+
119
+ - Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227
120
+ - Custom prefix:
121
+
122
+ ```
123
+ // config.yaml
124
+ server:
125
+ pluginPrefix: mycompany
126
+ middleware:
127
+ audit:
128
+ foo: 1
129
+ ```
130
+
131
+ This configuration will look up for `mycompany-audit` instead `Verdaccio-audit`.
132
+
133
+ ## Breaking Changes
134
+
135
+ ### sinopia plugins
136
+
137
+ - `sinopia` fallback support is removed, but can be restored using `pluginPrefix`
138
+
139
+ ### plugin filter
140
+
141
+ - method rename `filter_metadata`->`filterMetadata`
142
+
143
+ ### Plugin constructor does not merge configs anymore https://github.com/verdaccio/verdaccio/issues/928
144
+
145
+ The plugin receives as first argument `config`, which represents the config of the plugin. Example:
146
+
147
+ ```
148
+ // config.yaml
149
+ auth:
150
+ plugin:
151
+ foo: 1
152
+ bar: 2
153
+
154
+ export class Plugin<T> {
155
+ public constructor(config: T, options: PluginOptions) {
156
+ console.log(config);
157
+ // {foo:1, bar: 2}
158
+ }
159
+ }
160
+ ```
161
+
162
+ - 794af76c5: Remove Node 12 support
163
+
164
+ - We need move to the new `undici` and does not support Node.js 12
165
+
166
+ - 10aeb4f13: feat!: experiments config renamed to flags
167
+
168
+ - The `experiments` configuration is renamed to `flags`. The functionality is exactly the same.
169
+
170
+ ```js
171
+ flags: token: false;
172
+ search: false;
173
+ ```
174
+
175
+ - The `self_path` property from the config file is being removed in favor of `config_file` full path.
176
+ - Refactor `config` module, better types and utilities
177
+
178
+ - e367c3f1e: - Replace signature handler for legacy tokens by removing deprecated crypto.createDecipher by createCipheriv
179
+
180
+ - Introduce environment variables for legacy tokens
181
+
182
+ ### Code Improvements
183
+
184
+ - Add debug library for improve developer experience
185
+
186
+ ### Breaking change
187
+
188
+ - The new signature invalidates all previous tokens generated by Verdaccio 4 or previous versions.
189
+ - The secret key must have 32 characters long.
190
+
191
+ ### New environment variables
192
+
193
+ - `VERDACCIO_LEGACY_ALGORITHM`: Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`
194
+ - `VERDACCIO_LEGACY_ENCRYPTION_KEY`: By default, the token stores in the database, but using this variable allows to get it from memory
195
+
196
+ - 82cb0f2bf: feat!: config.logs throw an error, logging config not longer accept array or logs property
197
+
198
+ ### 💥 Breaking change
199
+
200
+ This is valid
201
+
202
+ ```yaml
203
+ log: { type: stdout, format: pretty, level: http }
204
+ ```
205
+
206
+ This is invalid
207
+
208
+ ```yaml
209
+ logs: { type: stdout, format: pretty, level: http }
210
+ ```
211
+
212
+ or
213
+
214
+ ```yaml
215
+ logs:
216
+ - [{ type: stdout, format: pretty, level: http }]
217
+ ```
218
+
219
+ ### Minor Changes
220
+
221
+ - a1986e098: feat: expose middleware utils
222
+ - ef88da3b4: feat: improve support for fs promises older nodejs
223
+ - ae93e039d: fix: expose middleware methods
224
+ - 24b9be020: refactor: improve docker image build with strict dependencies and prod build
225
+ - 631abe1ac: feat: refactor logger
226
+ - b702ea363: abort search request support for proxy
227
+ - 00d1d2a17: chore: env variable for launch fastify
228
+
229
+ - Update fastify to major release `v4.3.0`
230
+ - Update CLI launcher
231
+
232
+ via CLI
233
+
234
+ ```
235
+ VERDACCIO_SERVER=fastify verdaccio
236
+ ```
237
+
238
+ with docker
239
+
240
+ ```
241
+ docker run -it --rm --name verdaccio \
242
+ -e "VERDACCIO_SERVER=8080" -p 8080:8080 \
243
+ -e "VERDACCIO_SERVER=fastify" \
244
+ verdaccio/verdaccio
245
+ ```
246
+
247
+ - e54ec4b5d: feat: remove level dependency by lowdb for npm token cli as storage
248
+
249
+ ### new npm token database
250
+
251
+ There will be a new database located in your storage named `.token-db.json` which
252
+ will store all references to created tokens, **it does not store tokens**, just
253
+ mask of them and related metadata required to reference them.
254
+
255
+ #### Breaking change
256
+
257
+ If you were relying on `npm token` experiment. This PR will replace the
258
+ used database (level) by a json plain based one (lowbd) which does not
259
+ require Node.js C++ compilation step and has less dependencies. Since was
260
+ a experiment there is no migration step.
261
+
262
+ - b61f762d6: feat: add server rate limit protection to all request
263
+
264
+ To modify custom values, use the server settings property.
265
+
266
+ ```markdown
267
+ server:
268
+
269
+ ## https://www.npmjs.com/package/express-rate-limit#configuration-options
270
+
271
+ rateLimit:
272
+ windowMs: 1000
273
+ max: 10000
274
+ ```
275
+
276
+ The values are intended to be high, if you want to improve security of your server consider
277
+ using different values.
278
+
279
+ - 154b2ecd3: refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplications
280
+ - aa763baec: feat: add typescript project references settings
281
+
282
+ 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.
283
+
284
+ It allows to navigate (IDE) trough the packages without need compile the packages.
285
+
286
+ 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).
287
+
288
+ - ce013d2fc: refactor: npm star command support reimplemented
289
+ - 62c24b632: feat: add passwordValidationRegex property
290
+ - 5167bb528: feat: ui search support for remote, local and private packages
291
+
292
+ The command `npm search` search globally and return all matches, with this improvement the user interface
293
+ is powered with the same capabilities.
294
+
295
+ The UI also tag where is the origin the package with a tag, also provide the latest version and description of the package.
296
+
297
+ - 4b29d715b: chore: move improvements from v5 to v6
298
+
299
+ Migrate improvements form v5 to v6:
300
+
301
+ - https://github.com/verdaccio/verdaccio/pull/3158
302
+ - https://github.com/verdaccio/verdaccio/pull/3151
303
+ - https://github.com/verdaccio/verdaccio/pull/2271
304
+ - https://github.com/verdaccio/verdaccio/pull/2787
305
+ - https://github.com/verdaccio/verdaccio/pull/2791
306
+ - https://github.com/verdaccio/verdaccio/pull/2205
307
+
308
+ - b13a3fefd: refactor: improve versions and dist-tag filters
309
+ - 37274e4c8: feat: implement abbreviated manifest
310
+
311
+ Enable abbreviated manifest data by adding the header:
312
+
313
+ ```
314
+ curl -H "Accept: application/vnd.npm.install-v1+json" https://registry.npmjs.org/verdaccio
315
+ ```
316
+
317
+ It returns a filtered manifest, additionally includes the [time](https://github.com/pnpm/rfcs/pull/2) field by request.
318
+
319
+ Current support for packages managers:
320
+
321
+ - npm: yes
322
+ - pnpm: yes
323
+ - yarn classic: yes
324
+ - yarn modern (+2.x): [no](https://github.com/yarnpkg/berry/pull/3981#issuecomment-1076566096)
325
+
326
+ https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#abbreviated-metadata-format
327
+
328
+ - 45c03819e: refactor: render html middleware
329
+
330
+ ### Patch Changes
331
+
332
+ - 43f32687c: fix: abbreviated headers handle quality values
333
+ - 351aeeaa8: fix(deps): @verdaccio/utils should be a prod dep of local-storage
334
+ - a610ef26b: chore: add release step to private regisry on merge changeset pr
335
+ - 34f0f1101: Enable prerelease mode with **changesets**
336
+ - f859d2b1a: fix: official package "-" cannot be synced
337
+ - 168833d85: testing changesets
338
+ - b4cc80017: fix: improve abort request search
339
+ - 68ea21214: ESLint Warnings Fixed
340
+
341
+ Related to issue #1461
342
+
343
+ - max-len: most of the sensible max-len errors are fixed
344
+ - no-unused-vars: most of these types of errors are fixed by deleting not needed declarations
345
+ - @typescript-eslint/no-unused-vars: same as above
346
+
347
+ - b849128de: fix: handle upload scoped tarball
348
+ - Updated dependencies [292c0a37f]
349
+ - Updated dependencies [dc05edfe6]
350
+ - Updated dependencies [a1986e098]
351
+ - Updated dependencies [974cd8c19]
352
+ - Updated dependencies [a828271d6]
353
+ - Updated dependencies [ef88da3b4]
354
+ - Updated dependencies [43f32687c]
355
+ - Updated dependencies [679c19c1b]
356
+ - Updated dependencies [a3a209b5e]
357
+ - Updated dependencies [459b6fa72]
358
+ - Updated dependencies [9fc2e7961]
359
+ - Updated dependencies [9943e2b18]
360
+ - Updated dependencies [ae93e039d]
361
+ - Updated dependencies [24b9be020]
362
+ - Updated dependencies [794af76c5]
363
+ - Updated dependencies [e75c0a3b9]
364
+ - Updated dependencies [351aeeaa8]
365
+ - Updated dependencies [10aeb4f13]
366
+ - Updated dependencies [1d1112805]
367
+ - Updated dependencies [631abe1ac]
368
+ - Updated dependencies [9718e0330]
369
+ - Updated dependencies [7ef599cc4]
370
+ - Updated dependencies [b702ea363]
371
+ - Updated dependencies [1b217fd34]
372
+ - Updated dependencies [e367c3f1e]
373
+ - Updated dependencies [a1da11308]
374
+ - Updated dependencies [d167f92e1]
375
+ - Updated dependencies [d2c65da9c]
376
+ - Updated dependencies [00d1d2a17]
377
+ - Updated dependencies [1810ed0d8]
378
+ - Updated dependencies [a610ef26b]
379
+ - Updated dependencies [ddb6a2239]
380
+ - Updated dependencies [648575aa4]
381
+ - Updated dependencies [b61f762d6]
382
+ - Updated dependencies [4fc21146a]
383
+ - Updated dependencies [d43894e8f]
384
+ - Updated dependencies [154b2ecd3]
385
+ - Updated dependencies [061bfcc8d]
386
+ - Updated dependencies [aa763baec]
387
+ - Updated dependencies [378e907d5]
388
+ - Updated dependencies [16e38df8a]
389
+ - Updated dependencies [34f0f1101]
390
+ - Updated dependencies [82cb0f2bf]
391
+ - Updated dependencies [dc571aabd]
392
+ - Updated dependencies [5ddfa5264]
393
+ - Updated dependencies [b78f35257]
394
+ - Updated dependencies [ce013d2fc]
395
+ - Updated dependencies [f859d2b1a]
396
+ - Updated dependencies [2c594910d]
397
+ - Updated dependencies [6c1eb021b]
398
+ - Updated dependencies [62c24b632]
399
+ - Updated dependencies [0a6412ca9]
400
+ - Updated dependencies [0a6412ca9]
401
+ - Updated dependencies [d08fe29d9]
402
+ - Updated dependencies [5167bb528]
403
+ - Updated dependencies [f86c31ed0]
404
+ - Updated dependencies [65f88b826]
405
+ - Updated dependencies [aeff267d9]
406
+ - Updated dependencies [20c9e43ed]
407
+ - Updated dependencies [b3e8438f6]
408
+ - Updated dependencies [c9d1af0e5]
409
+ - Updated dependencies [730b5d8cc]
410
+ - Updated dependencies [4b29d715b]
411
+ - Updated dependencies [b13a3fefd]
412
+ - Updated dependencies [68ea21214]
413
+ - Updated dependencies [37274e4c8]
414
+ - Updated dependencies [fa274ee44]
415
+ - Updated dependencies [8f43bf17d]
416
+ - Updated dependencies [45c03819e]
417
+ - Updated dependencies [b849128de]
418
+ - @verdaccio/auth@6.0.0
419
+ - @verdaccio/config@6.0.0
420
+ - @verdaccio/core@6.0.0
421
+ - @verdaccio/logger@6.0.0
422
+ - @verdaccio/middleware@6.0.0
423
+ - @verdaccio/store@6.0.0
424
+ - @verdaccio/utils@6.0.0
425
+
426
+ ## 6.0.0-6-next.59
427
+
428
+ ### Patch Changes
429
+
430
+ - @verdaccio/store@6.0.0-6-next.56
431
+ - @verdaccio/core@6.0.0-6-next.76
432
+ - @verdaccio/config@6.0.0-6-next.76
433
+ - @verdaccio/auth@6.0.0-6-next.55
434
+ - @verdaccio/middleware@6.0.0-6-next.55
435
+ - @verdaccio/utils@6.0.0-6-next.44
436
+ - @verdaccio/logger@6.0.0-6-next.44
437
+
3
438
  ## 6.0.0-6-next.58
4
439
 
5
440
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/api",
3
- "version": "6.0.0-6-next.58",
3
+ "version": "7.0.0-next.0",
4
4
  "description": "loaders logic",
5
5
  "main": "./build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -30,13 +30,13 @@
30
30
  },
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
- "@verdaccio/auth": "6.0.0-6-next.54",
34
- "@verdaccio/config": "6.0.0-6-next.75",
35
- "@verdaccio/core": "6.0.0-6-next.75",
36
- "@verdaccio/logger": "6.0.0-6-next.43",
37
- "@verdaccio/middleware": "6.0.0-6-next.54",
38
- "@verdaccio/store": "6.0.0-6-next.55",
39
- "@verdaccio/utils": "6.0.0-6-next.43",
33
+ "@verdaccio/auth": "7.0.0-next.0",
34
+ "@verdaccio/config": "7.0.0-next.0",
35
+ "@verdaccio/core": "7.0.0-next.0",
36
+ "@verdaccio/logger": "7.0.0-next.0",
37
+ "@verdaccio/middleware": "7.0.0-next.0",
38
+ "@verdaccio/store": "7.0.0-next.0",
39
+ "@verdaccio/utils": "7.0.0-next.0",
40
40
  "abortcontroller-polyfill": "1.7.5",
41
41
  "cookies": "0.8.0",
42
42
  "debug": "4.3.4",
@@ -47,9 +47,9 @@
47
47
  "semver": "7.5.4"
48
48
  },
49
49
  "devDependencies": {
50
- "@verdaccio/server": "6.0.0-6-next.64",
51
- "@verdaccio/types": "11.0.0-6-next.25",
52
- "@verdaccio/test-helper": "2.0.0-6-next.8",
50
+ "@verdaccio/server": "7.0.0-next.0",
51
+ "@verdaccio/types": "12.0.0-next.0",
52
+ "@verdaccio/test-helper": "3.0.0-next.0",
53
53
  "supertest": "6.3.3",
54
54
  "nock": "13.2.9",
55
55
  "mockdate": "3.0.5"