@verdaccio/types 11.0.0-6-next.13 → 11.0.0-6-next.14

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Change Log
2
2
 
3
+ ## 11.0.0-6-next.14
4
+
5
+ ### Minor Changes
6
+
7
+ - 37274e4c: feat: implement abbreviated manifest
8
+
9
+ Enable abbreviated manifest data by adding the header:
10
+
11
+ ```
12
+ curl -H "Accept: application/vnd.npm.install-v1+json" https://registry.npmjs.org/verdaccio
13
+ ```
14
+
15
+ It returns a filtered manifest, additionally includes the [time](https://github.com/pnpm/rfcs/pull/2) field by request.
16
+
17
+ Current support for packages managers:
18
+
19
+ - npm: yes
20
+ - pnpm: yes
21
+ - yarn classic: yes
22
+ - yarn modern (+2.x): [no](https://github.com/yarnpkg/berry/pull/3981#issuecomment-1076566096)
23
+
24
+ https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md#abbreviated-metadata-format
25
+
3
26
  ## 11.0.0-6-next.13
4
27
 
5
28
  ### Major Changes
@@ -76,7 +76,6 @@ export interface Tags {
76
76
  export interface Version {
77
77
  name: string;
78
78
  version: string;
79
- devDependencies?: string;
80
79
  directories?: any;
81
80
  dist: Dist;
82
81
  author: string | Author;
@@ -97,7 +96,11 @@ export interface Version {
97
96
  scripts?: any;
98
97
  homepage?: string;
99
98
  etag?: string;
100
- dependencies: any;
99
+ dependencies?: Dependencies;
100
+ peerDependencies?: Dependencies;
101
+ devDependencies?: Dependencies;
102
+ optionalDependencies?: Dependencies;
103
+ bundleDependencies?: Dependencies;
101
104
  keywords?: string | string[];
102
105
  nodeVersion?: string;
103
106
  _id: string;
@@ -105,6 +108,18 @@ export interface Version {
105
108
  _npmUser: Author;
106
109
  _hasShrinkwrap?: boolean;
107
110
  deprecated?: string;
111
+ funding?: {
112
+ type: string;
113
+ url: string;
114
+ };
115
+ engines?: Engines;
116
+ hasInstallScript?: boolean;
117
+ }
118
+ export interface Dependencies {
119
+ [key: string]: string;
120
+ }
121
+ export interface Engines {
122
+ [key: string]: string;
108
123
  }
109
124
  export interface Versions {
110
125
  [key: string]: Version;
@@ -178,6 +193,17 @@ export interface Manifest extends FullRemoteManifest, PublishManifest {
178
193
  */
179
194
  _rev: string;
180
195
  }
196
+ export declare type AbbreviatedVersion = Pick<Version, 'name' | 'version' | 'description' | 'dependencies' | 'devDependencies' | 'bin' | 'dist' | 'engines' | 'funding' | 'peerDependencies'>;
197
+ export interface AbbreviatedVersions {
198
+ [key: string]: AbbreviatedVersion;
199
+ }
200
+ /**
201
+ *
202
+ */
203
+ export declare type AbbreviatedManifest = Pick<Manifest, 'name' | 'dist-tags' | 'time'> & {
204
+ modified: string;
205
+ versions: AbbreviatedVersions;
206
+ };
181
207
  export interface PublishManifest {
182
208
  /**
183
209
  * The `_attachments` object has different usages:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/types",
3
- "version": "11.0.0-6-next.13",
3
+ "version": "11.0.0-6-next.14",
4
4
  "description": "verdaccio types definitions",
5
5
  "keywords": [
6
6
  "private",
@@ -34,7 +34,7 @@
34
34
  "main": "build/types.d.ts",
35
35
  "types": "build/types.d.ts",
36
36
  "devDependencies": {
37
- "@types/node": "16.11.47",
37
+ "@types/node": "16.11.51",
38
38
  "typedoc": "beta",
39
39
  "typedoc-plugin-missing-exports": "1.0.0"
40
40
  },
package/src/manifest.ts CHANGED
@@ -92,7 +92,6 @@ export interface Tags {
92
92
  export interface Version {
93
93
  name: string;
94
94
  version: string;
95
- devDependencies?: string;
96
95
  directories?: any;
97
96
  dist: Dist;
98
97
  author: string | Author;
@@ -113,7 +112,11 @@ export interface Version {
113
112
  scripts?: any;
114
113
  homepage?: string;
115
114
  etag?: string;
116
- dependencies: any;
115
+ dependencies?: Dependencies;
116
+ peerDependencies?: Dependencies;
117
+ devDependencies?: Dependencies;
118
+ optionalDependencies?: Dependencies;
119
+ bundleDependencies?: Dependencies;
117
120
  keywords?: string | string[];
118
121
  nodeVersion?: string;
119
122
  _id: string;
@@ -121,6 +124,17 @@ export interface Version {
121
124
  _npmUser: Author;
122
125
  _hasShrinkwrap?: boolean;
123
126
  deprecated?: string;
127
+ funding?: { type: string; url: string };
128
+ engines?: Engines;
129
+ hasInstallScript?: boolean;
130
+ }
131
+
132
+ export interface Dependencies {
133
+ [key: string]: string;
134
+ }
135
+
136
+ export interface Engines {
137
+ [key: string]: string;
124
138
  }
125
139
 
126
140
  export interface Versions {
@@ -194,6 +208,32 @@ export interface Manifest extends FullRemoteManifest, PublishManifest {
194
208
  */
195
209
  _rev: string;
196
210
  }
211
+
212
+ export type AbbreviatedVersion = Pick<
213
+ Version,
214
+ | 'name'
215
+ | 'version'
216
+ | 'description'
217
+ | 'dependencies'
218
+ | 'devDependencies'
219
+ | 'bin'
220
+ | 'dist'
221
+ | 'engines'
222
+ | 'funding'
223
+ | 'peerDependencies'
224
+ >;
225
+
226
+ export interface AbbreviatedVersions {
227
+ [key: string]: AbbreviatedVersion;
228
+ }
229
+ /**
230
+ *
231
+ */
232
+ export type AbbreviatedManifest = Pick<Manifest, 'name' | 'dist-tags' | 'time'> & {
233
+ modified: string;
234
+ versions: AbbreviatedVersions;
235
+ };
236
+
197
237
  export interface PublishManifest {
198
238
  /**
199
239
  * The `_attachments` object has different usages: