Debian Codegraph @

tap-snapshots/test/lib/commands/view.js.test.cjs

raw
1 /* IMPORTANT
2 * This snapshot file is auto-generated, but designed for humans.
3 * It should be checked into source control and tracked carefully.
4 * Re-generate by setting TAP_SNAPSHOT=1 and running tests.
5 * Make sure to inspect the output below. Do not ignore changes!
6 */
7 'use strict'
8 exports[`test/lib/commands/view.js TAP allow-git=root, package with multiple dist‑tags and no time > must match snapshot 1`] = `
9
10 [[email protected] | Proprietary | deps: none | versions: 1
11
12 dist
13 .tarball: http://gray/1.1.0.tgz
14 .shasum: b
15
16 dist-tags:
17 latest: 1.1.0
18 stable: 1.1.0
19 old: 1.0.0
20 beta: 1.2.0-beta
21 alpha: 1.2.0-alpha
22 `
23
24 exports[`test/lib/commands/view.js TAP deprecated package with license, bugs, repository and other fields > must match snapshot 1`] = `
25
26 [[email protected] | ACME | deps: 2 | versions: 2
27 green is a very important color
28
29 DEPRECATED!! - true
30
31 keywords: colors, green, crayola
32
33 bin: green
34
35 dist
36 .tarball: http://hm.green.com/1.0.0.tgz
37 .shasum: 123
38 .integrity: ---
39 .unpackedSize: 1.0 GB
40
41 dependencies:
42 red: 1.0.0, yellow: 1.0.0
43
44 maintainers:
45 - claudia <[[email protected]>
46 - isaacs <[[email protected]>
47
48 dist-tags:
49 latest: 1.0.0
50 `
51
52 exports[`test/lib/commands/view.js TAP deprecated package with unicode > must match snapshot 1`] = `
53
54 [[email protected] | ACME | deps: 2 | versions: 2
55 green is a very important color
56
57 DEPRECATED ⚠️ - true
58
59 keywords: colors, green, crayola
60
61 bin: green
62
63 dist
64 .tarball: http://hm.green.com/1.0.0.tgz
65 .shasum: 123
66 .integrity: ---
67 .unpackedSize: 1.0 GB
68
69 dependencies:
70 red: 1.0.0, yellow: 1.0.0
71
72 maintainers:
73 - claudia <[[email protected]>
74 - isaacs <[[email protected]>
75
76 dist-tags:
77 latest: 1.0.0
78 `
79
80 exports[`test/lib/commands/view.js TAP package from git > must match snapshot 1`] = `
81
82 [[email protected] | ACME | deps: 2 | versions: 2
83 green is a very important color
84
85 DEPRECATED!! - true
86
87 keywords: colors, green, crayola
88
89 bin: green
90
91 dist
92 .tarball: http://hm.green.com/1.0.0.tgz
93 .shasum: 123
94 .integrity: ---
95 .unpackedSize: 1.0 GB
96
97 dependencies:
98 red: 1.0.0, yellow: 1.0.0
99
100 maintainers:
101 - claudia <[[email protected]>
102 - isaacs <[[email protected]>
103
104 dist-tags:
105 latest: 1.0.0
106 `
107
108 exports[`test/lib/commands/view.js TAP package in cwd directory > must match snapshot 1`] = `
109
110 [[email protected] | Proprietary | deps: none | versions: 2
111
112 dist
113 .tarball: http://hm.blue.com/1.0.0.tgz
114 .shasum: 123
115
116 dist-tags:
117 latest: 1.0.0
118 z: 1.0.0
119 y: 1.0.0
120 v1: 1.0.0
121 prev: 1.0.0
122 (...and 10 more.)
123
124 published {TIME} ago
125 `
126
127 exports[`test/lib/commands/view.js TAP package in cwd non-specific version > must match snapshot 1`] = `
128
129 [[email protected] | Proprietary | deps: none | versions: 2
130
131 dist
132 .tarball: http://hm.blue.com/1.0.0.tgz
133 .shasum: 123
134
135 dist-tags:
136 latest: 1.0.0
137 z: 1.0.0
138 y: 1.0.0
139 v1: 1.0.0
140 prev: 1.0.0
141 (...and 10 more.)
142
143 published {TIME} ago
144 `
145
146 exports[`test/lib/commands/view.js TAP package in cwd specific version > must match snapshot 1`] = `
147
148 [[email protected] | Proprietary | deps: none | versions: 2
149
150 dist
151 .tarball: http://hm.blue.com/1.0.0.tgz
152 .shasum: 123
153
154 dist-tags:
155 latest: 1.0.0
156 z: 1.0.0
157 y: 1.0.0
158 v1: 1.0.0
159 prev: 1.0.0
160 (...and 10 more.)
161
162 published {TIME} ago
163 `
164
165 exports[`test/lib/commands/view.js TAP package with --json and semver range > must match snapshot 1`] = `
166 [
167 {
168 "_npmUser": "claudia <[email protected]>",
169 "name": "cyan",
170 "dist-tags": {
171 "latest": "1.0.0"
172 },
173 "versions": [
174 "1.0.0",
175 "1.0.1"
176 ],
177 "version": "1.0.0",
178 "dist": {
179 "shasum": "123",
180 "tarball": "http://hm.cyan.com/1.0.0.tgz",
181 "integrity": "---",
182 "fileCount": 1,
183 "unpackedSize": 1000000
184 }
185 },
186 {
187 "_npmUser": "claudia <[email protected]>",
188 "name": "cyan",
189 "dist-tags": {
190 "latest": "1.0.0"
191 },
192 "versions": [
193 "1.0.0",
194 "1.0.1"
195 ]
196 }
197 ]
198 `
199
200 exports[`test/lib/commands/view.js TAP package with homepage > must match snapshot 1`] = `
201
202 [[email protected] | Proprietary | deps: none | versions: 2
203 http://hm.orange.com
204
205 dist
206 .tarball: http://hm.orange.com/1.0.0.tgz
207 .shasum: 123
208 .integrity: ---
209 .unpackedSize: 1 B
210
211 dist-tags:
212 latest: 1.0.0
213 `
214
215 exports[`test/lib/commands/view.js TAP package with invalid version > must match snapshot 1`] = `
216 [ '1.0.0', '1.0.1' ]
217 `
218
219 exports[`test/lib/commands/view.js TAP package with maintainers info as object > must match snapshot 1`] = `
220
221 [[email protected] | Proprietary | deps: none | versions: 2
222
223 dist
224 .tarball: http://hm.pink.com/1.0.0.tgz
225 .shasum: 123
226 .integrity: ---
227 .unpackedSize: 1 B
228
229 dist-tags:
230 latest: 1.0.0
231 `
232
233 exports[`test/lib/commands/view.js TAP package with more than 25 deps > must match snapshot 1`] = `
234
235 [[email protected] | Proprietary | deps: 25 | versions: 2
236
237 dist
238 .tarball: http://hm.black.com/1.0.0.tgz
239 .shasum: 123
240 .integrity: ---
241 .unpackedSize: 1 B
242
243 dependencies:
244 0: 1.0.0, 1: 1.0.0, 2: 1.0.0, 3: 1.0.0, 4: 1.0.0, 5: 1.0.0, 6: 1.0.0, 7: 1.0.0, 8: 1.0.0, 9: 1.0.0, 10: 1.0.0, 11: 1.0.0, 12: 1.0.0, 13: 1.0.0, 14: 1.0.0, 15: 1.0.0, 16: 1.0.0, 17: 1.0.0, 18: 1.0.0, 19: 1.0.0, 20: 1.0.0, 21: 1.0.0, 22: 1.0.0, 23: 1.0.0
245 (...and 1 more.)
246
247 dist-tags:
248 latest: 1.0.0
249 `
250
251 exports[`test/lib/commands/view.js TAP package with no modified time > must match snapshot 1`] = `
252
253 [[email protected] | Proprietary | deps: none | versions: 2
254
255 dist
256 .tarball: http://hm.cyan.com/1.0.0.tgz
257 .shasum: 123
258 .integrity: ---
259 .unpackedSize: 1.0 MB
260
261 dist-tags:
262 latest: 1.0.0
263
264 published by claudia <[[email protected]>
265 `
266
267 exports[`test/lib/commands/view.js TAP package with no repo or homepage > must match snapshot 1`] = `
268
269 [[email protected] | Proprietary | deps: none | versions: 2
270
271 dist
272 .tarball: http://hm.blue.com/1.0.0.tgz
273 .shasum: 123
274
275 dist-tags:
276 latest: 1.0.0
277 z: 1.0.0
278 y: 1.0.0
279 v1: 1.0.0
280 prev: 1.0.0
281 (...and 10 more.)
282
283 published {TIME} ago
284 `
285
286 exports[`test/lib/commands/view.js TAP package with semver range > must match snapshot 1`] = `
287
288 [[email protected] | Proprietary | deps: none | versions: 2
289
290 dist
291 .tarball: http://hm.blue.com/1.0.0.tgz
292 .shasum: 123
293
294 dist-tags:
295 latest: 1.0.0
296 z: 1.0.0
297 y: 1.0.0
298 v1: 1.0.0
299 prev: 1.0.0
300 (...and 10 more.)
301
302 published {TIME} ago
303
304 [[email protected] | Proprietary | deps: none | versions: 2
305
306 dist
307 .tarball: http://hm.blue.com/1.0.1.tgz
308 .shasum: 124
309 .integrity: ---
310 .unpackedSize: 1.0 kB
311
312 dist-tags:
313 latest: 1.0.0
314 z: 1.0.0
315 y: 1.0.0
316 v1: 1.0.0
317 prev: 1.0.0
318 (...and 10 more.)
319
320 published {TIME} ago
321 `
322
323 exports[`test/lib/commands/view.js TAP package with single version full json > must match snapshot 1`] = `
324 {
325 "_id": "single-version",
326 "name": "single-version",
327 "dist-tags": {
328 "latest": "1.0.0"
329 },
330 "versions": [
331 "1.0.0"
332 ],
333 "version": "1.0.0",
334 "dist": {
335 "shasum": "123",
336 "tarball": "http://hm.single-version.com/1.0.0.tgz",
337 "fileCount": 1
338 }
339 }
340 `
341
342 exports[`test/lib/commands/view.js TAP specific field names array field - 1 element > must match snapshot 1`] = `
343 claudia
344 `
345
346 exports[`test/lib/commands/view.js TAP specific field names array field - 2 elements > must match snapshot 1`] = `
347 maintainers[0].name = 'claudia'
348 maintainers[1].name = 'isaacs'
349 `
350
351 exports[`test/lib/commands/view.js TAP specific field names fields with empty values > must match snapshot 1`] = `
352
353 `
354
355 exports[`test/lib/commands/view.js TAP specific field names maintainers with email > must match snapshot 1`] = `
356 maintainers = [
357 { name: 'claudia', email: '[email protected]', twitter: 'cyellow' },
358 { name: 'isaacs', email: '[email protected]', twitter: 'iyellow' }
359 ]
360 name = 'yellow'
361 `
362
363 exports[`test/lib/commands/view.js TAP specific field names maintainers with url > must match snapshot 1`] = `
364 [ 'claudia (http://c.pink.com)', 'isaacs (http://i.pink.com)' ]
365 `
366
367 exports[`test/lib/commands/view.js TAP specific field names nested field with brackets > must match snapshot 1`] = `
368 123
369 `
370
371 exports[`test/lib/commands/view.js TAP specific field names readme > must match snapshot 1`] = `
372 a very useful readme
373 `
374
375 exports[`test/lib/commands/view.js TAP specific field names several fields > must match snapshot 1`] = `
376 name = 'yellow'
377 version = '1.0.0'
378 `
379
380 exports[`test/lib/commands/view.js TAP specific field names several fields with several versions > must match snapshot 1`] = `
381 [email protected] 'claudia'
382 [email protected] 'claudia'
383 [email protected] 'claudia'
384 `
385
386 exports[`test/lib/commands/view.js TAP workspaces 404 workspaces basic > must match snapshot 1`] = `
387
388 [[email protected] | ACME | deps: 2 | versions: 2
389 green is a very important color
390
391 DEPRECATED!! - true
392
393 keywords: colors, green, crayola
394
395 bin: green
396
397 dist
398 .tarball: http://hm.green.com/1.0.0.tgz
399 .shasum: 123
400 .integrity: ---
401 .unpackedSize: 1.0 GB
402
403 dependencies:
404 red: 1.0.0, yellow: 1.0.0
405
406 maintainers:
407 - claudia <[[email protected]>
408 - isaacs <[[email protected]>
409
410 dist-tags:
411 latest: 1.0.0
412 error code E404
413 error 404 404
414 `
415
416 exports[`test/lib/commands/view.js TAP workspaces 404 workspaces json > must match snapshot 1`] = `
417 {
418 "green": {
419 "_id": "green",
420 "name": "green",
421 "dist-tags": {
422 "latest": "1.0.0"
423 },
424 "maintainers": [
425 {
426 "name": "claudia",
427 "email": "[email protected]",
428 "twitter": "cyellow"
429 },
430 {
431 "name": "isaacs",
432 "email": "[email protected]",
433 "twitter": "iyellow"
434 }
435 ],
436 "keywords": [
437 "colors",
438 "green",
439 "crayola"
440 ],
441 "versions": [
442 "1.0.0",
443 "1.0.1"
444 ],
445 "version": "1.0.0",
446 "description": "green is a very important color",
447 "bugs": {
448 "url": "http://bugs.green.com"
449 },
450 "deprecated": true,
451 "repository": {
452 "url": "http://repository.green.com"
453 },
454 "license": {
455 "type": "ACME"
456 },
457 "bin": {
458 "green": "bin/green.js"
459 },
460 "dependencies": {
461 "red": "1.0.0",
462 "yellow": "1.0.0"
463 },
464 "dist": {
465 "shasum": "123",
466 "tarball": "http://hm.green.com/1.0.0.tgz",
467 "integrity": "---",
468 "fileCount": 1,
469 "unpackedSize": 1000000000
470 }
471 },
472 "error": {
473 "missing-package": {
474 "code": "E404",
475 "summary": "404",
476 "detail": ""
477 }
478 }
479 }
480 `
481
482 exports[`test/lib/commands/view.js TAP workspaces 404 workspaces json with package named error > must match snapshot 1`] = `
483 warn overwriting existing error on json output
484 {
485 "error": {
486 "missing-package": {
487 "code": "E404",
488 "summary": "404",
489 "detail": ""
490 }
491 }
492 }
493 `
494
495 exports[`test/lib/commands/view.js TAP workspaces 404 workspaces non-404 error rejects > must match snapshot 1`] = `
496
497 [[email protected] | ACME | deps: 2 | versions: 2
498 green is a very important color
499
500 DEPRECATED!! - true
501
502 keywords: colors, green, crayola
503
504 bin: green
505
506 dist
507 .tarball: http://hm.green.com/1.0.0.tgz
508 .shasum: 123
509 .integrity: ---
510 .unpackedSize: 1.0 GB
511
512 dependencies:
513 red: 1.0.0, yellow: 1.0.0
514
515 maintainers:
516 - claudia <[[email protected]>
517 - isaacs <[[email protected]>
518
519 dist-tags:
520 latest: 1.0.0
521 error Unknown error
522 `
523
524 exports[`test/lib/commands/view.js TAP workspaces 404 workspaces non-404 error rejects with single arg > must match snapshot 1`] = `
525 green:
526 1.0.0
527 unknown-error:
528 error Unknown error
529 `
530
531 exports[`test/lib/commands/view.js TAP workspaces all workspaces --json > must match snapshot 1`] = `
532 {
533 "green": {
534 "_id": "green",
535 "name": "green",
536 "dist-tags": {
537 "latest": "1.0.0"
538 },
539 "maintainers": [
540 {
541 "name": "claudia",
542 "email": "[email protected]",
543 "twitter": "cyellow"
544 },
545 {
546 "name": "isaacs",
547 "email": "[email protected]",
548 "twitter": "iyellow"
549 }
550 ],
551 "keywords": [
552 "colors",
553 "green",
554 "crayola"
555 ],
556 "versions": [
557 "1.0.0",
558 "1.0.1"
559 ],
560 "version": "1.0.0",
561 "description": "green is a very important color",
562 "bugs": {
563 "url": "http://bugs.green.com"
564 },
565 "deprecated": true,
566 "repository": {
567 "url": "http://repository.green.com"
568 },
569 "license": {
570 "type": "ACME"
571 },
572 "bin": {
573 "green": "bin/green.js"
574 },
575 "dependencies": {
576 "red": "1.0.0",
577 "yellow": "1.0.0"
578 },
579 "dist": {
580 "shasum": "123",
581 "tarball": "http://hm.green.com/1.0.0.tgz",
582 "integrity": "---",
583 "fileCount": 1,
584 "unpackedSize": 1000000000
585 }
586 },
587 "orange": {
588 "name": "orange",
589 "dist-tags": {
590 "latest": "1.0.0"
591 },
592 "versions": [
593 "1.0.0",
594 "1.0.1"
595 ],
596 "version": "1.0.0",
597 "homepage": "http://hm.orange.com",
598 "license": {},
599 "dist": {
600 "shasum": "123",
601 "tarball": "http://hm.orange.com/1.0.0.tgz",
602 "integrity": "---",
603 "fileCount": 1,
604 "unpackedSize": 1
605 }
606 }
607 }
608 `
609
610 exports[`test/lib/commands/view.js TAP workspaces all workspaces > must match snapshot 1`] = `
611
612 [[email protected] | ACME | deps: 2 | versions: 2
613 green is a very important color
614
615 DEPRECATED!! - true
616
617 keywords: colors, green, crayola
618
619 bin: green
620
621 dist
622 .tarball: http://hm.green.com/1.0.0.tgz
623 .shasum: 123
624 .integrity: ---
625 .unpackedSize: 1.0 GB
626
627 dependencies:
628 red: 1.0.0, yellow: 1.0.0
629
630 maintainers:
631 - claudia <[[email protected]>
632 - isaacs <[[email protected]>
633
634 dist-tags:
635 latest: 1.0.0
636
637 [[email protected] | Proprietary | deps: none | versions: 2
638 http://hm.orange.com
639
640 dist
641 .tarball: http://hm.orange.com/1.0.0.tgz
642 .shasum: 123
643 .integrity: ---
644 .unpackedSize: 1 B
645
646 dist-tags:
647 latest: 1.0.0
648 `
649
650 exports[`test/lib/commands/view.js TAP workspaces all workspaces nonexistent field --json > must match snapshot 1`] = `
651
652 `
653
654 exports[`test/lib/commands/view.js TAP workspaces all workspaces nonexistent field > must match snapshot 1`] = `
655 green:
656 orange:
657 `
658
659 exports[`test/lib/commands/view.js TAP workspaces all workspaces single field --json > must match snapshot 1`] = `
660 {
661 "green": "green",
662 "orange": "orange"
663 }
664 `
665
666 exports[`test/lib/commands/view.js TAP workspaces all workspaces single field > must match snapshot 1`] = `
667 green:
668 green
669 orange:
670 orange
671 `
672
673 exports[`test/lib/commands/view.js TAP workspaces one specific workspace > must match snapshot 1`] = `
674
675 [[email protected] | ACME | deps: 2 | versions: 2
676 green is a very important color
677
678 DEPRECATED!! - true
679
680 keywords: colors, green, crayola
681
682 bin: green
683
684 dist
685 .tarball: http://hm.green.com/1.0.0.tgz
686 .shasum: 123
687 .integrity: ---
688 .unpackedSize: 1.0 GB
689
690 dependencies:
691 red: 1.0.0, yellow: 1.0.0
692
693 maintainers:
694 - claudia <[[email protected]>
695 - isaacs <[[email protected]>
696
697 dist-tags:
698 latest: 1.0.0
699 `
700
701 exports[`test/lib/commands/view.js TAP workspaces remote package name > must match snapshot 1`] = `
702
703 [[email protected] | Proprietary | deps: none | versions: 2
704
705 dist
706 .tarball: http://hm.pink.com/1.0.0.tgz
707 .shasum: 123
708 .integrity: ---
709 .unpackedSize: 1 B
710
711 dist-tags:
712 latest: 1.0.0
713 `
714
715 exports[`test/lib/commands/view.js TAP workspaces remote package name > should have warning of ignoring workspaces 1`] = `
716 Array [
717 "\\u001b[94mIgnoring workspaces for specified package(s)\\u001b[39m",
718 ]
719 `
720
721 exports[`test/lib/commands/view.js TAP workspaces single workspace --json > must match snapshot 1`] = `
722 {
723 "green": {
724 "_id": "green",
725 "name": "green",
726 "dist-tags": {
727 "latest": "1.0.0"
728 },
729 "maintainers": [
730 {
731 "name": "claudia",
732 "email": "[email protected]",
733 "twitter": "cyellow"
734 },
735 {
736 "name": "isaacs",
737 "email": "[email protected]",
738 "twitter": "iyellow"
739 }
740 ],
741 "keywords": [
742 "colors",
743 "green",
744 "crayola"
745 ],
746 "versions": [
747 "1.0.0",
748 "1.0.1"
749 ],
750 "version": "1.0.0",
751 "description": "green is a very important color",
752 "bugs": {
753 "url": "http://bugs.green.com"
754 },
755 "deprecated": true,
756 "repository": {
757 "url": "http://repository.green.com"
758 },
759 "license": {
760 "type": "ACME"
761 },
762 "bin": {
763 "green": "bin/green.js"
764 },
765 "dependencies": {
766 "red": "1.0.0",
767 "yellow": "1.0.0"
768 },
769 "dist": {
770 "shasum": "123",
771 "tarball": "http://hm.green.com/1.0.0.tgz",
772 "integrity": "---",
773 "fileCount": 1,
774 "unpackedSize": 1000000000
775 }
776 }
777 }
778 `