@verdaccio/tarball 11.0.0-6-next.45 → 12.0.0-next-7.8

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,214 @@
1
1
  # Change Log
2
2
 
3
+ ## 12.0.0-next-7.8
4
+
5
+ ### Patch Changes
6
+
7
+ - @verdaccio/core@7.0.0-next-7.8
8
+ - @verdaccio/url@12.0.0-next-7.8
9
+ - @verdaccio/utils@7.0.0-next-7.8
10
+
11
+ ## 12.0.0-next-7.7
12
+
13
+ ### Patch Changes
14
+
15
+ - @verdaccio/core@7.0.0-next-7.7
16
+ - @verdaccio/url@12.0.0-next-7.7
17
+ - @verdaccio/utils@7.0.0-next-7.7
18
+
19
+ ## 12.0.0-next.6
20
+
21
+ ### Patch Changes
22
+
23
+ - e14b064: - Fixes polynomial regular expression when determining the file name of tarball
24
+ - Add tests for extracting tarball name
25
+ - @verdaccio/core@7.0.0-next.6
26
+ - @verdaccio/url@12.0.0-next.6
27
+ - @verdaccio/utils@7.0.0-next.6
28
+
29
+ ## 12.0.0-next.5
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies [f047cc8]
34
+ - @verdaccio/core@7.0.0-next.5
35
+ - @verdaccio/url@12.0.0-next.5
36
+ - @verdaccio/utils@7.0.0-next.5
37
+
38
+ ## 12.0.0-next.4
39
+
40
+ ### Patch Changes
41
+
42
+ - @verdaccio/core@7.0.0-next.4
43
+ - @verdaccio/url@12.0.0-next.4
44
+ - @verdaccio/utils@7.0.0-next.4
45
+
46
+ ## 12.0.0-next.3
47
+
48
+ ### Major Changes
49
+
50
+ - e7ebccb61: update major dependencies, remove old nodejs support
51
+
52
+ ### Minor Changes
53
+
54
+ - daceb6d87: restore legacy support
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [daceb6d87]
59
+ - Updated dependencies [e7ebccb61]
60
+ - @verdaccio/core@7.0.0-next.3
61
+ - @verdaccio/url@12.0.0-next.3
62
+ - @verdaccio/utils@7.0.0-next.3
63
+
64
+ ## 12.0.0-next.2
65
+
66
+ ### Patch Changes
67
+
68
+ - @verdaccio/core@7.0.0-next.2
69
+ - @verdaccio/url@12.0.0-next.2
70
+ - @verdaccio/utils@7.0.0-next.2
71
+
72
+ ## 12.0.0-next.1
73
+
74
+ ### Patch Changes
75
+
76
+ - @verdaccio/core@7.0.0-next.1
77
+ - @verdaccio/url@12.0.0-next.1
78
+ - @verdaccio/utils@7.0.0-next.1
79
+
80
+ ## 12.0.0-next.0
81
+
82
+ ### Major Changes
83
+
84
+ - feat!: bump to v7
85
+
86
+ ### Patch Changes
87
+
88
+ - Updated dependencies
89
+ - @verdaccio/core@7.0.0-next.0
90
+ - @verdaccio/url@12.0.0-next.0
91
+ - @verdaccio/utils@7.0.0-next.0
92
+
93
+ ## 11.0.0
94
+
95
+ ### Major Changes
96
+
97
+ - 292c0a37f: feat!: replace deprecated request dependency by got
98
+
99
+ 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.
100
+
101
+ ## Notes
102
+
103
+ - Remove deprecated `request` by other `got`, retry improved, custom Agent ( got does not include it built-in)
104
+ - Remove `async` dependency from storage (used by core) it was linked with proxy somehow safe to remove now
105
+ - Refactor with promises instead callback wherever is possible
106
+ - ~Document the API~
107
+ - Improve testing, integration tests
108
+ - Bugfix
109
+ - Clean up old validations
110
+ - Improve performance
111
+
112
+ ## 💥 Breaking changes
113
+
114
+ - Plugin API methods were callbacks based are returning promises, this will break current storage plugins, check documentation for upgrade.
115
+ - 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));`
116
+ - `@verdaccio/streams` stream abort support is legacy is being deprecated removed
117
+ - Remove AWS and Google Cloud packages for future refactoring [#2574](https://github.com/verdaccio/verdaccio/pull/2574).
118
+
119
+ - a828271d6: refactor: download manifest endpoint and integrate fastify
120
+
121
+ Much simpler API for fetching a package
122
+
123
+ ```
124
+ const manifest = await storage.getPackageNext({
125
+ name,
126
+ uplinksLook: true,
127
+ req,
128
+ version: queryVersion,
129
+ requestOptions,
130
+ });
131
+ ```
132
+
133
+ > 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.
134
+
135
+ ### Details
136
+
137
+ - `async/await` sugar for getPackage()
138
+ - Improve and reuse code between current implementation and new fastify endpoint (add scaffolding for request manifest)
139
+ - Improve performance
140
+ - Add new tests
141
+
142
+ ### Breaking changes
143
+
144
+ 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
145
+
146
+ - 794af76c5: Remove Node 12 support
147
+
148
+ - We need move to the new `undici` and does not support Node.js 12
149
+
150
+ ### Minor Changes
151
+
152
+ - ef88da3b4: feat: improve support for fs promises older nodejs
153
+ - 24b9be020: refactor: improve docker image build with strict dependencies and prod build
154
+ - 154b2ecd3: refactor: remove @verdaccio/commons-api in favor @verdaccio/core and remove duplications
155
+
156
+ ### Patch Changes
157
+
158
+ - 351aeeaa8: fix(deps): @verdaccio/utils should be a prod dep of local-storage
159
+ - 9718e0330: fix: build targets for 5x modules
160
+ - 648575aa4: Bug Fixes
161
+
162
+ - fix escaped slash in namespaced packages
163
+
164
+ #### Related tickets
165
+
166
+ https://github.com/verdaccio/verdaccio/pull/2193
167
+
168
+ - Updated dependencies [292c0a37f]
169
+ - Updated dependencies [dc05edfe6]
170
+ - Updated dependencies [a1986e098]
171
+ - Updated dependencies [974cd8c19]
172
+ - Updated dependencies [a828271d6]
173
+ - Updated dependencies [ef88da3b4]
174
+ - Updated dependencies [43f32687c]
175
+ - Updated dependencies [a3a209b5e]
176
+ - Updated dependencies [459b6fa72]
177
+ - Updated dependencies [24b9be020]
178
+ - Updated dependencies [794af76c5]
179
+ - Updated dependencies [351aeeaa8]
180
+ - Updated dependencies [10aeb4f13]
181
+ - Updated dependencies [9718e0330]
182
+ - Updated dependencies [e367c3f1e]
183
+ - Updated dependencies [a1da11308]
184
+ - Updated dependencies [d2c65da9c]
185
+ - Updated dependencies [00d1d2a17]
186
+ - Updated dependencies [a610ef26b]
187
+ - Updated dependencies [648575aa4]
188
+ - Updated dependencies [b61f762d6]
189
+ - Updated dependencies [154b2ecd3]
190
+ - Updated dependencies [aa763baec]
191
+ - Updated dependencies [378e907d5]
192
+ - Updated dependencies [16e38df8a]
193
+ - Updated dependencies [34f0f1101]
194
+ - Updated dependencies [82cb0f2bf]
195
+ - Updated dependencies [dc571aabd]
196
+ - Updated dependencies [ce013d2fc]
197
+ - Updated dependencies [f859d2b1a]
198
+ - Updated dependencies [6c1eb021b]
199
+ - Updated dependencies [62c24b632]
200
+ - Updated dependencies [0a6412ca9]
201
+ - Updated dependencies [5167bb528]
202
+ - Updated dependencies [f86c31ed0]
203
+ - Updated dependencies [c9d1af0e5]
204
+ - Updated dependencies [4b29d715b]
205
+ - Updated dependencies [b13a3fefd]
206
+ - Updated dependencies [68ea21214]
207
+ - Updated dependencies [b849128de]
208
+ - @verdaccio/core@6.0.0
209
+ - @verdaccio/url@11.0.0
210
+ - @verdaccio/utils@6.0.0
211
+
3
212
  ## 11.0.0-6-next.45
4
213
 
5
214
  ### Patch Changes
package/build/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import { RequestOptions } from '@verdaccio/url';
2
2
  export { convertDistRemoteToLocalTarballUrls, convertDistVersionToLocalTarballsUrl, } from './convertDistRemoteToLocalTarballUrls';
3
- export { getLocalRegistryTarballUri } from './getLocalRegistryTarballUri';
3
+ export { extractTarballFromUrl, getLocalRegistryTarballUri } from './getLocalRegistryTarballUri';
4
4
  export { RequestOptions };
package/build/index.js CHANGED
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "convertDistVersionToLocalTarballsUrl", {
21
21
  return _convertDistRemoteToLocalTarballUrls.convertDistVersionToLocalTarballsUrl;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "extractTarballFromUrl", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _getLocalRegistryTarballUri.extractTarballFromUrl;
28
+ }
29
+ });
24
30
  Object.defineProperty(exports, "getLocalRegistryTarballUri", {
25
31
  enumerable: true,
26
32
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_url","require","_convertDistRemoteToLocalTarballUrls","_getLocalRegistryTarballUri"],"sources":["../src/index.ts"],"sourcesContent":["import { RequestOptions } from '@verdaccio/url';\n\nexport {\n convertDistRemoteToLocalTarballUrls,\n convertDistVersionToLocalTarballsUrl,\n} from './convertDistRemoteToLocalTarballUrls';\nexport { getLocalRegistryTarballUri } from './getLocalRegistryTarballUri';\n\nexport { RequestOptions };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AAEA,IAAAC,oCAAA,GAAAD,OAAA;AAIA,IAAAE,2BAAA,GAAAF,OAAA"}
1
+ {"version":3,"file":"index.js","names":["_url","require","_convertDistRemoteToLocalTarballUrls","_getLocalRegistryTarballUri"],"sources":["../src/index.ts"],"sourcesContent":["import { RequestOptions } from '@verdaccio/url';\n\nexport {\n convertDistRemoteToLocalTarballUrls,\n convertDistVersionToLocalTarballsUrl,\n} from './convertDistRemoteToLocalTarballUrls';\nexport { extractTarballFromUrl, getLocalRegistryTarballUri } from './getLocalRegistryTarballUri';\n\nexport { RequestOptions };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AAEA,IAAAC,oCAAA,GAAAD,OAAA;AAIA,IAAAE,2BAAA,GAAAF,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/tarball",
3
- "version": "11.0.0-6-next.45",
3
+ "version": "12.0.0-next-7.8",
4
4
  "description": "tarball utilities resolver",
5
5
  "keywords": [
6
6
  "private",
@@ -34,14 +34,14 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "debug": "4.3.4",
37
- "@verdaccio/core": "6.0.0-6-next.76",
38
- "@verdaccio/url": "11.0.0-6-next.42",
39
- "@verdaccio/utils": "6.0.0-6-next.44",
37
+ "@verdaccio/core": "7.0.0-next-7.8",
38
+ "@verdaccio/url": "12.0.0-next-7.8",
39
+ "@verdaccio/utils": "7.0.0-next-7.8",
40
40
  "lodash": "4.17.21"
41
41
  },
42
42
  "devDependencies": {
43
- "@verdaccio/types": "11.0.0-6-next.25",
44
- "node-mocks-http": "1.13.0"
43
+ "@verdaccio/types": "12.0.0-next.2",
44
+ "node-mocks-http": "1.14.1"
45
45
  },
46
46
  "funding": {
47
47
  "type": "opencollective",
package/src/index.ts CHANGED
@@ -4,6 +4,6 @@ export {
4
4
  convertDistRemoteToLocalTarballUrls,
5
5
  convertDistVersionToLocalTarballsUrl,
6
6
  } from './convertDistRemoteToLocalTarballUrls';
7
- export { getLocalRegistryTarballUri } from './getLocalRegistryTarballUri';
7
+ export { extractTarballFromUrl, getLocalRegistryTarballUri } from './getLocalRegistryTarballUri';
8
8
 
9
9
  export { RequestOptions };
@@ -0,0 +1,36 @@
1
+ import { extractTarballFromUrl } from '../src';
2
+
3
+ describe('extractTarballFromUrl', () => {
4
+ const metadata: any = {
5
+ name: 'npm_test',
6
+ versions: {
7
+ '1.0.0': {
8
+ dist: {
9
+ tarball: 'http://registry.org/npm_test/-/npm_test-1.0.0.tgz',
10
+ },
11
+ },
12
+ '1.0.1': {
13
+ dist: {
14
+ tarball: 'npm_test-1.0.1.tgz',
15
+ },
16
+ },
17
+ '1.0.2': {
18
+ dist: {
19
+ tarball: 'https://localhost/npm_test-1.0.2.tgz',
20
+ },
21
+ },
22
+ },
23
+ };
24
+
25
+ test('should return only name of tarball', () => {
26
+ expect(extractTarballFromUrl(metadata.versions['1.0.0'].dist.tarball)).toEqual(
27
+ 'npm_test-1.0.0.tgz'
28
+ );
29
+ expect(extractTarballFromUrl(metadata.versions['1.0.1'].dist.tarball)).toEqual(
30
+ 'npm_test-1.0.1.tgz'
31
+ );
32
+ expect(extractTarballFromUrl(metadata.versions['1.0.2'].dist.tarball)).toEqual(
33
+ 'npm_test-1.0.2.tgz'
34
+ );
35
+ });
36
+ });