@verdaccio/api 6.0.0-6-next.59 → 7.0.0-next.1

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