Skip to content

Commit b3419bd

Browse files
committed
feat: Add tarball URLs for dependencies
1 parent b21c8ac commit b3419bd

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/unit/server/utils/dependency-analysis.spec.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ describe('dependency-analysis', () => {
101101
optional: false,
102102
depth: 'direct' as const,
103103
path: ['test-pkg@1.0.0', 'dep-a@2.0.0'],
104+
tarballUrl: 'https://example.com/dep-a-2.0.0.tgz',
104105
},
105106
],
106107
])
@@ -127,6 +128,7 @@ describe('dependency-analysis', () => {
127128
optional: false,
128129
depth: 'root' as const,
129130
path: ['vuln-pkg@1.0.0'],
131+
tarballUrl: 'https://example.com/vuln-pkg-1.0.0.tgz',
130132
},
131133
],
132134
])
@@ -181,6 +183,7 @@ describe('dependency-analysis', () => {
181183
optional: false,
182184
depth: 'root' as const,
183185
path: ['root@1.0.0'],
186+
tarballUrl: 'https://example.com/root-1.0.0.tgz',
184187
},
185188
],
186189
[
@@ -192,6 +195,7 @@ describe('dependency-analysis', () => {
192195
optional: false,
193196
depth: 'transitive' as const,
194197
path: ['root@1.0.0', 'middle@1.5.0', 'vuln-dep@2.0.0'],
198+
tarballUrl: 'https://example.com/vuln-dep-2.0.0.tgz',
195199
},
196200
],
197201
])
@@ -231,6 +235,7 @@ describe('dependency-analysis', () => {
231235
optional: false,
232236
depth: 'root' as const,
233237
path: ['root@1.0.0'],
238+
tarballUrl: 'https://example.com/root-1.0.0.tgz',
234239
},
235240
],
236241
[
@@ -242,6 +247,7 @@ describe('dependency-analysis', () => {
242247
optional: false,
243248
depth: 'direct' as const,
244249
path: ['root@1.0.0', 'direct-dep@1.0.0'],
250+
tarballUrl: 'https://example.com/direct-dep-1.0.0.tgz',
245251
},
246252
],
247253
[
@@ -253,6 +259,7 @@ describe('dependency-analysis', () => {
253259
optional: false,
254260
depth: 'transitive' as const,
255261
path: ['root@1.0.0', 'direct-dep@1.0.0', 'transitive-dep@1.0.0'],
262+
tarballUrl: 'https://example.com/transitive-dep-1.0.0.tgz',
256263
},
257264
],
258265
])
@@ -490,6 +497,7 @@ describe('dependency-analysis', () => {
490497
optional: false,
491498
depth: 'root' as const,
492499
path: ['root@1.0.0'],
500+
tarballUrl: 'https://example.com/root-1.0.0.tgz',
493501
},
494502
],
495503
[
@@ -502,6 +510,7 @@ describe('dependency-analysis', () => {
502510
depth: 'direct' as const,
503511
path: ['root@1.0.0', 'deprecated-pkg@2.0.0'],
504512
deprecated: 'This package is deprecated. Use new-pkg instead.',
513+
tarballUrl: 'https://example.com/deprecated-pkg-2.0.0.tgz',
505514
},
506515
],
507516
])
@@ -531,6 +540,7 @@ describe('dependency-analysis', () => {
531540
optional: false,
532541
depth: 'root' as const,
533542
path: ['root@1.0.0'],
543+
tarballUrl: 'https://example.com/root-1.0.0.tgz',
534544
},
535545
],
536546
])
@@ -554,6 +564,7 @@ describe('dependency-analysis', () => {
554564
depth: 'root' as const,
555565
path: ['root@1.0.0'],
556566
deprecated: 'Root is deprecated',
567+
tarballUrl: 'https://example.com/root-1.0.0.tgz',
557568
},
558569
],
559570
[
@@ -566,6 +577,7 @@ describe('dependency-analysis', () => {
566577
depth: 'transitive' as const,
567578
path: ['root@1.0.0', 'direct-dep@1.0.0', 'transitive-dep@1.0.0'],
568579
deprecated: 'Transitive is deprecated',
580+
tarballUrl: 'https://example.com/transitive-dep-1.0.0.tgz',
569581
},
570582
],
571583
[
@@ -578,6 +590,7 @@ describe('dependency-analysis', () => {
578590
depth: 'direct' as const,
579591
path: ['root@1.0.0', 'direct-dep@1.0.0'],
580592
deprecated: 'Direct is deprecated',
593+
tarballUrl: 'https://example.com/direct-dep-1.0.0.tgz',
581594
},
582595
],
583596
])
@@ -606,6 +619,7 @@ describe('dependency-analysis', () => {
606619
optional: false,
607620
depth: 'root' as const,
608621
path: ['minimist@1.0.0'],
622+
tarballUrl: 'https://example.com/minimist-1.0.0.tgz',
609623
},
610624
],
611625
])
@@ -669,6 +683,7 @@ describe('dependency-analysis', () => {
669683
optional: false,
670684
depth: 'root' as const,
671685
path: ['next@16.0.0-beta.0'],
686+
tarballUrl: 'https://example.com/next-16.0.0-beta.0.tgz',
672687
},
673688
],
674689
])
@@ -732,6 +747,7 @@ describe('dependency-analysis', () => {
732747
optional: false,
733748
depth: 'root' as const,
734749
path: ['example@1.5.0'],
750+
tarballUrl: 'https://example.com/example-1.5.0.tgz',
735751
},
736752
],
737753
])
@@ -794,6 +810,7 @@ describe('dependency-analysis', () => {
794810
optional: false,
795811
depth: 'root' as const,
796812
path: ['example@3.4.6'],
813+
tarballUrl: 'https://example.com/example-3.4.6.tgz',
797814
},
798815
],
799816
])
@@ -904,6 +921,7 @@ describe('dependency-analysis', () => {
904921
optional: false,
905922
depth: 'root' as const,
906923
path: ['root@1.0.0'],
924+
tarballUrl: 'https://example.com/root-1.0.0.tgz',
907925
},
908926
],
909927
[
@@ -915,6 +933,7 @@ describe('dependency-analysis', () => {
915933
optional: false,
916934
depth: 'direct' as const,
917935
path: ['root@1.0.0', 'vuln-pkg@1.0.0'],
936+
tarballUrl: 'https://example.com/vuln-pkg-1.0.0.tgz',
918937
},
919938
],
920939
[
@@ -927,6 +946,7 @@ describe('dependency-analysis', () => {
927946
depth: 'direct' as const,
928947
path: ['root@1.0.0', 'deprecated-pkg@1.0.0'],
929948
deprecated: 'Use something else',
949+
tarballUrl: 'https://example.com/deprecated-pkg-1.0.0.tgz',
930950
},
931951
],
932952
])

0 commit comments

Comments
 (0)