@verdaccio/store 6.0.0-6-next.56 → 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 +378 -0
  2. package/package.json +13 -13
package/CHANGELOG.md CHANGED
@@ -1,5 +1,383 @@
1
1
  # @verdaccio/store
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/config@7.0.0-next.0
13
+ - @verdaccio/core@7.0.0-next.0
14
+ - @verdaccio/tarball@12.0.0-next.0
15
+ - @verdaccio/url@12.0.0-next.0
16
+ - @verdaccio/hooks@7.0.0-next.0
17
+ - @verdaccio/loaders@7.0.0-next.0
18
+ - @verdaccio/logger@7.0.0-next.0
19
+ - @verdaccio/local-storage@12.0.0-next.0
20
+ - @verdaccio/proxy@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
+ - dc05edfe6: # async storage plugin bootstrap
50
+
51
+ Gives a storage plugin the ability to perform asynchronous tasks on initialization
52
+
53
+ ## Breaking change
54
+
55
+ Plugin must have an init method in which asynchronous tasks can be executed
56
+
57
+ ```js
58
+ public async init(): Promise<void> {
59
+ this.data = await this._fetchLocalPackages();
60
+ this._sync();
61
+ }
62
+ ```
63
+
64
+ - a828271d6: refactor: download manifest endpoint and integrate fastify
65
+
66
+ Much simpler API for fetching a package
67
+
68
+ ```
69
+ const manifest = await storage.getPackageNext({
70
+ name,
71
+ uplinksLook: true,
72
+ req,
73
+ version: queryVersion,
74
+ requestOptions,
75
+ });
76
+ ```
77
+
78
+ > 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.
79
+
80
+ ### Details
81
+
82
+ - `async/await` sugar for getPackage()
83
+ - Improve and reuse code between current implementation and new fastify endpoint (add scaffolding for request manifest)
84
+ - Improve performance
85
+ - Add new tests
86
+
87
+ ### Breaking changes
88
+
89
+ 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
90
+
91
+ - 459b6fa72: refactor: search v1 endpoint and local-database
92
+
93
+ - refactor search `api v1` endpoint, improve performance
94
+ - remove usage of `async` dependency https://github.com/verdaccio/verdaccio/issues/1225
95
+ - refactor method storage class
96
+ - create new module `core` to reduce the ammount of modules with utilities
97
+ - use `undici` instead `node-fetch`
98
+ - use `fastify` instead `express` for functional test
99
+
100
+ ### Breaking changes
101
+
102
+ - plugin storage API changes
103
+ - remove old search endpoint (return 404)
104
+ - filter local private packages at plugin level
105
+
106
+ 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.
107
+
108
+ ```ts
109
+ export interface IPluginStorage<T> extends IPlugin {
110
+ add(name: string): Promise<void>;
111
+ remove(name: string): Promise<void>;
112
+ get(): Promise<any>;
113
+ init(): Promise<void>;
114
+ getSecret(): Promise<string>;
115
+ setSecret(secret: string): Promise<any>;
116
+ getPackageStorage(packageInfo: string): IPackageStorage;
117
+ search(query: searchUtils.SearchQuery): Promise<searchUtils.SearchItem[]>;
118
+ saveToken(token: Token): Promise<any>;
119
+ deleteToken(user: string, tokenKey: string): Promise<any>;
120
+ readTokens(filter: TokenFilter): Promise<Token[]>;
121
+ }
122
+ ```
123
+
124
+ - 9fc2e7961: feat(plugins): improve plugin loader
125
+
126
+ ### Changes
127
+
128
+ - Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227
129
+ - Avoid config collisions https://github.com/verdaccio/verdaccio/issues/928
130
+ - https://github.com/verdaccio/verdaccio/issues/1394
131
+ - `config.plugins` plugin path validations
132
+ - Updated algorithm for plugin loader.
133
+ - improved documentation (included dev)
134
+
135
+ ## Features
136
+
137
+ - Add scope plugin support to 6.x https://github.com/verdaccio/verdaccio/pull/3227
138
+ - Custom prefix:
139
+
140
+ ```
141
+ // config.yaml
142
+ server:
143
+ pluginPrefix: mycompany
144
+ middleware:
145
+ audit:
146
+ foo: 1
147
+ ```
148
+
149
+ This configuration will look up for `mycompany-audit` instead `Verdaccio-audit`.
150
+
151
+ ## Breaking Changes
152
+
153
+ ### sinopia plugins
154
+
155
+ - `sinopia` fallback support is removed, but can be restored using `pluginPrefix`
156
+
157
+ ### plugin filter
158
+
159
+ - method rename `filter_metadata`->`filterMetadata`
160
+
161
+ ### Plugin constructor does not merge configs anymore https://github.com/verdaccio/verdaccio/issues/928
162
+
163
+ The plugin receives as first argument `config`, which represents the config of the plugin. Example:
164
+
165
+ ```
166
+ // config.yaml
167
+ auth:
168
+ plugin:
169
+ foo: 1
170
+ bar: 2
171
+
172
+ export class Plugin<T> {
173
+ public constructor(config: T, options: PluginOptions) {
174
+ console.log(config);
175
+ // {foo:1, bar: 2}
176
+ }
177
+ }
178
+ ```
179
+
180
+ - 794af76c5: Remove Node 12 support
181
+
182
+ - We need move to the new `undici` and does not support Node.js 12
183
+
184
+ - 10aeb4f13: feat!: experiments config renamed to flags
185
+
186
+ - The `experiments` configuration is renamed to `flags`. The functionality is exactly the same.
187
+
188
+ ```js
189
+ flags: token: false;
190
+ search: false;
191
+ ```
192
+
193
+ - The `self_path` property from the config file is being removed in favor of `config_file` full path.
194
+ - Refactor `config` module, better types and utilities
195
+
196
+ - e367c3f1e: - Replace signature handler for legacy tokens by removing deprecated crypto.createDecipher by createCipheriv
197
+
198
+ - Introduce environment variables for legacy tokens
199
+
200
+ ### Code Improvements
201
+
202
+ - Add debug library for improve developer experience
203
+
204
+ ### Breaking change
205
+
206
+ - The new signature invalidates all previous tokens generated by Verdaccio 4 or previous versions.
207
+ - The secret key must have 32 characters long.
208
+
209
+ ### New environment variables
210
+
211
+ - `VERDACCIO_LEGACY_ALGORITHM`: Allows to define the specific algorithm for the token signature which by default is `aes-256-ctr`
212
+ - `VERDACCIO_LEGACY_ENCRYPTION_KEY`: By default, the token stores in the database, but using this variable allows to get it from memory
213
+
214
+ ### Minor Changes
215
+
216
+ - 631abe1ac: feat: refactor logger
217
+ - b702ea363: abort search request support for proxy
218
+ - b61f762d6: feat: add server rate limit protection to all request
219
+
220
+ To modify custom values, use the server settings property.
221
+
222
+ ```markdown
223
+ server:
224
+
225
+ ## https://www.npmjs.com/package/express-rate-limit#configuration-options
226
+
227
+ rateLimit:
228
+ windowMs: 1000
229
+ max: 10000
230
+ ```
231
+
232
+ The values are intended to be high, if you want to improve security of your server consider
233
+ using different values.
234
+
235
+ - 154b2ecd3: refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplications
236
+ - aa763baec: feat: add typescript project references settings
237
+
238
+ 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.
239
+
240
+ It allows to navigate (IDE) trough the packages without need compile the packages.
241
+
242
+ 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).
243
+
244
+ - 16e38df8a: feat: trustProxy property
245
+ - ce013d2fc: refactor: npm star command support reimplemented
246
+ - 62c24b632: feat: add passwordValidationRegex property
247
+ - 0a6412ca9: feat: refactor proxy with got v12
248
+ - 5167bb528: feat: ui search support for remote, local and private packages
249
+
250
+ The command `npm search` search globally and return all matches, with this improvement the user interface
251
+ is powered with the same capabilities.
252
+
253
+ The UI also tag where is the origin the package with a tag, also provide the latest version and description of the package.
254
+
255
+ - f86c31ed0: feat: migrate web sidebar endpoint to fastify
256
+
257
+ reuse utils methods between packages
258
+
259
+ - b13a3fefd: refactor: improve versions and dist-tag filters
260
+ - 37274e4c8: feat: implement abbreviated manifest
261
+
262
+ Enable abbreviated manifest data by adding the header:
263
+
264
+ ```
265
+ curl -H "Accept: application/vnd.npm.install-v1+json" https://registry.npmjs.org/verdaccio
266
+ ```
267
+
268
+ It returns a filtered manifest, additionally includes the [time](https://github.com/pnpm/rfcs/pull/2) field by request.
269
+
270
+ Current support for packages managers:
271
+
272
+ - npm: yes
273
+ - pnpm: yes
274
+ - yarn classic: yes
275
+ - yarn modern (+2.x): [no](https://github.com/yarnpkg/berry/pull/3981#issuecomment-1076566096)
276
+
277
+ https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#abbreviated-metadata-format
278
+
279
+ - 45c03819e: refactor: render html middleware
280
+
281
+ ### Patch Changes
282
+
283
+ - 43f32687c: fix: abbreviated headers handle quality values
284
+ - 351aeeaa8: fix(deps): @verdaccio/utils should be a prod dep of local-storage
285
+ - 9718e0330: fix: build targets for 5x modules
286
+ - a610ef26b: chore: add release step to private regisry on merge changeset pr
287
+ - 34f0f1101: Enable prerelease mode with **changesets**
288
+ - 5ddfa5264: Fix the search by exact name of the package
289
+
290
+ Full package name queries was not finding anithing. It was happening
291
+ becouse of stemmer of [lunr.js](https://lunrjs.com/).
292
+
293
+ To fix this, the stemmer of [lunr.js](https://lunrjs.com/) was removed from search pipeline.
294
+
295
+ - 0a6412ca9: refactor: got instead undici
296
+ - 68ea21214: ESLint Warnings Fixed
297
+
298
+ Related to issue #1461
299
+
300
+ - max-len: most of the sensible max-len errors are fixed
301
+ - no-unused-vars: most of these types of errors are fixed by deleting not needed declarations
302
+ - @typescript-eslint/no-unused-vars: same as above
303
+
304
+ - b849128de: fix: handle upload scoped tarball
305
+ - Updated dependencies [292c0a37f]
306
+ - Updated dependencies [dc05edfe6]
307
+ - Updated dependencies [a1986e098]
308
+ - Updated dependencies [974cd8c19]
309
+ - Updated dependencies [a828271d6]
310
+ - Updated dependencies [ef88da3b4]
311
+ - Updated dependencies [43f32687c]
312
+ - Updated dependencies [679c19c1b]
313
+ - Updated dependencies [a3a209b5e]
314
+ - Updated dependencies [459b6fa72]
315
+ - Updated dependencies [9fc2e7961]
316
+ - Updated dependencies [24b9be020]
317
+ - Updated dependencies [794af76c5]
318
+ - Updated dependencies [e75c0a3b9]
319
+ - Updated dependencies [351aeeaa8]
320
+ - Updated dependencies [10aeb4f13]
321
+ - Updated dependencies [631abe1ac]
322
+ - Updated dependencies [9718e0330]
323
+ - Updated dependencies [b702ea363]
324
+ - Updated dependencies [1b217fd34]
325
+ - Updated dependencies [e367c3f1e]
326
+ - Updated dependencies [a1da11308]
327
+ - Updated dependencies [d167f92e1]
328
+ - Updated dependencies [d2c65da9c]
329
+ - Updated dependencies [00d1d2a17]
330
+ - Updated dependencies [1810ed0d8]
331
+ - Updated dependencies [a610ef26b]
332
+ - Updated dependencies [ddb6a2239]
333
+ - Updated dependencies [e54ec4b5d]
334
+ - Updated dependencies [65cb26cf3]
335
+ - Updated dependencies [31d661c7b]
336
+ - Updated dependencies [648575aa4]
337
+ - Updated dependencies [e381e4845]
338
+ - Updated dependencies [b61f762d6]
339
+ - Updated dependencies [d43894e8f]
340
+ - Updated dependencies [154b2ecd3]
341
+ - Updated dependencies [aa763baec]
342
+ - Updated dependencies [378e907d5]
343
+ - Updated dependencies [16e38df8a]
344
+ - Updated dependencies [34f0f1101]
345
+ - Updated dependencies [df0da3d69]
346
+ - Updated dependencies [82cb0f2bf]
347
+ - Updated dependencies [dc571aabd]
348
+ - Updated dependencies [b78f35257]
349
+ - Updated dependencies [ce013d2fc]
350
+ - Updated dependencies [f859d2b1a]
351
+ - Updated dependencies [2c594910d]
352
+ - Updated dependencies [6c1eb021b]
353
+ - Updated dependencies [62c24b632]
354
+ - Updated dependencies [0a6412ca9]
355
+ - Updated dependencies [0a6412ca9]
356
+ - Updated dependencies [d08fe29d9]
357
+ - Updated dependencies [5167bb528]
358
+ - Updated dependencies [f86c31ed0]
359
+ - Updated dependencies [65f88b826]
360
+ - Updated dependencies [b3e8438f6]
361
+ - Updated dependencies [c9d1af0e5]
362
+ - Updated dependencies [730b5d8cc]
363
+ - Updated dependencies [4b29d715b]
364
+ - Updated dependencies [b13a3fefd]
365
+ - Updated dependencies [68ea21214]
366
+ - Updated dependencies [37274e4c8]
367
+ - Updated dependencies [8f43bf17d]
368
+ - Updated dependencies [45c03819e]
369
+ - Updated dependencies [b849128de]
370
+ - @verdaccio/config@6.0.0
371
+ - @verdaccio/core@6.0.0
372
+ - @verdaccio/tarball@11.0.0
373
+ - @verdaccio/url@11.0.0
374
+ - @verdaccio/hooks@6.0.0
375
+ - @verdaccio/loaders@6.0.0
376
+ - @verdaccio/logger@6.0.0
377
+ - @verdaccio/local-storage@11.0.0
378
+ - @verdaccio/proxy@6.0.0
379
+ - @verdaccio/utils@6.0.0
380
+
3
381
  ## 6.0.0-6-next.56
4
382
 
5
383
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/store",
3
- "version": "6.0.0-6-next.56",
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,16 +30,16 @@
30
30
  "npm": ">=6"
31
31
  },
32
32
  "dependencies": {
33
- "@verdaccio/config": "6.0.0-6-next.76",
34
- "@verdaccio/core": "6.0.0-6-next.76",
35
- "@verdaccio/hooks": "6.0.0-6-next.46",
36
- "@verdaccio/loaders": "6.0.0-6-next.45",
37
- "@verdaccio/local-storage": "11.0.0-6-next.46",
38
- "@verdaccio/logger": "6.0.0-6-next.44",
39
- "@verdaccio/proxy": "6.0.0-6-next.54",
40
- "@verdaccio/url": "11.0.0-6-next.42",
41
- "@verdaccio/utils": "6.0.0-6-next.44",
42
- "@verdaccio/tarball": "11.0.0-6-next.45",
33
+ "@verdaccio/config": "7.0.0-next.0",
34
+ "@verdaccio/core": "7.0.0-next.0",
35
+ "@verdaccio/hooks": "7.0.0-next.0",
36
+ "@verdaccio/loaders": "7.0.0-next.0",
37
+ "@verdaccio/local-storage": "12.0.0-next.0",
38
+ "@verdaccio/logger": "7.0.0-next.0",
39
+ "@verdaccio/proxy": "7.0.0-next.0",
40
+ "@verdaccio/url": "12.0.0-next.0",
41
+ "@verdaccio/utils": "7.0.0-next.0",
42
+ "@verdaccio/tarball": "12.0.0-next.0",
43
43
  "JSONStream": "1.3.5",
44
44
  "debug": "4.3.4",
45
45
  "lodash": "4.17.21",
@@ -47,8 +47,8 @@
47
47
  "semver": "7.5.4"
48
48
  },
49
49
  "devDependencies": {
50
- "@verdaccio/types": "11.0.0-6-next.25",
51
- "@verdaccio/test-helper": "2.0.0-6-next.8",
50
+ "@verdaccio/types": "12.0.0-next.0",
51
+ "@verdaccio/test-helper": "3.0.0-next.0",
52
52
  "nock": "13.2.9",
53
53
  "node-mocks-http": "1.13.0",
54
54
  "mockdate": "3.0.5"