vitest 2.1.3 → 2.1.4

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 (74) hide show
  1. package/LICENSE.md +1 -209
  2. package/dist/browser.d.ts +21 -21
  3. package/dist/browser.js +7 -7
  4. package/dist/chunks/{RandomSequencer.Bh5-tlNJ.js → RandomSequencer.CMRlh2v4.js} +143 -142
  5. package/dist/chunks/{base.BO5Jx7vw.js → base.C3xNdjV6.js} +3 -3
  6. package/dist/chunks/{benchmark.C8CRJYG4.js → benchmark.Cdu9hjj4.js} +2 -2
  7. package/dist/chunks/{benchmark.JVlTzojj.d.ts → benchmark.geERunq4.d.ts} +1 -1
  8. package/dist/chunks/{cac.BSMVokHR.js → cac.DrfPaMvZ.js} +11 -10
  9. package/dist/chunks/{cli-api.btGgw3PC.js → cli-api.CKrRYkw8.js} +732 -577
  10. package/dist/chunks/{console.CfT1Wjed.js → console.BYGVloWk.js} +2 -6
  11. package/dist/chunks/{coverage.zlNdAMHK.js → coverage.BoMDb1ip.js} +1 -1
  12. package/dist/chunks/{creator.CBPphXqR.js → creator.IIqd8RWT.js} +8 -8
  13. package/dist/chunks/{execute._eQQfgI8.js → execute.2pr0rHgK.js} +8 -6
  14. package/dist/chunks/{globals.Bdzt04Qm.js → globals.Bp645TTJ.js} +8 -13
  15. package/dist/chunks/{index.BpSiYbpB.js → index.68735LiX.js} +28 -5
  16. package/dist/chunks/{index.X0nbfr6-.js → index.BJDntFik.js} +7 -7
  17. package/dist/chunks/{index.Dz2opmmU.js → index.Bn81VaWg.js} +3808 -3787
  18. package/dist/chunks/{index.CPD77dLA.js → index.CqYx2Nsr.js} +7 -7
  19. package/dist/chunks/{index.4GFF2h22.js → index.D3d79vc8.js} +6 -6
  20. package/dist/chunks/index.Dqe5k2Rk.js +54 -0
  21. package/dist/chunks/{node.Bx4JZjMG.js → node.AKq966Jp.js} +1 -5
  22. package/dist/chunks/{reporters.C4ZHgdxQ.d.ts → reporters.anwo7Y6a.d.ts} +1328 -1313
  23. package/dist/chunks/{resolveConfig.Dha6ilPI.js → resolveConfig.DPmbhVlP.js} +3193 -3175
  24. package/dist/chunks/{rpc.B7Mfb-Yf.js → rpc.C3q9uwRX.js} +2 -2
  25. package/dist/chunks/{run-once.Sxe67Wng.js → run-once.2ogXb3JV.js} +1 -1
  26. package/dist/chunks/{runBaseTests.Cx4wXyTR.js → runBaseTests.Dm-659zB.js} +21 -25
  27. package/dist/chunks/{setup-common.BKyF15v_.js → setup-common.DDmVKp6O.js} +3 -3
  28. package/dist/chunks/{suite.BMWOKiTe.d.ts → suite.B2jumIFP.d.ts} +2 -2
  29. package/dist/chunks/{utils.CY6Spixo.js → utils.BB4zjzR8.js} +2 -2
  30. package/dist/chunks/utils.C8RiOc4B.js +77 -0
  31. package/dist/chunks/{vi.BskyZC5g.js → vi.JMQoNY_Z.js} +94 -141
  32. package/dist/chunks/{vite.YH7MrecS.d.ts → vite.BdBj-UWY.d.ts} +1 -1
  33. package/dist/chunks/{vm.DB_hLchi.js → vm.jpyrB0xy.js} +5 -8
  34. package/dist/chunks/{worker.B6RjTtbk.d.ts → worker.BAlI9hII.d.ts} +12 -3
  35. package/dist/chunks/{worker.CcJLfX8w.d.ts → worker.DHnGaO2M.d.ts} +1 -1
  36. package/dist/cli.js +3 -4
  37. package/dist/config.cjs +4 -4
  38. package/dist/config.d.ts +10 -10
  39. package/dist/config.js +4 -4
  40. package/dist/coverage.d.ts +9 -9
  41. package/dist/coverage.js +8 -11
  42. package/dist/environments.d.ts +2 -2
  43. package/dist/environments.js +1 -1
  44. package/dist/execute.d.ts +53 -53
  45. package/dist/execute.js +7 -6
  46. package/dist/index.d.ts +75 -1099
  47. package/dist/index.js +7 -18
  48. package/dist/node.d.ts +43 -41
  49. package/dist/node.js +22 -28
  50. package/dist/path.js +1 -1
  51. package/dist/reporters.d.ts +10 -10
  52. package/dist/reporters.js +12 -18
  53. package/dist/runners.d.ts +12 -19
  54. package/dist/runners.js +142 -148
  55. package/dist/snapshot.js +2 -6
  56. package/dist/suite.d.ts +2 -2
  57. package/dist/suite.js +2 -6
  58. package/dist/worker.js +5 -6
  59. package/dist/workers/forks.js +9 -8
  60. package/dist/workers/runVmTests.js +16 -20
  61. package/dist/workers/threads.js +9 -8
  62. package/dist/workers/vmForks.js +9 -12
  63. package/dist/workers/vmThreads.js +9 -12
  64. package/dist/workers.d.ts +13 -13
  65. package/dist/workers.js +14 -18
  66. package/package.json +26 -26
  67. package/dist/chunks/base.DwXGwWst.js +0 -89
  68. package/dist/chunks/env.CmHVDJnw.js +0 -7
  69. package/dist/chunks/index.-d_XpZEA.js +0 -140
  70. package/dist/chunks/index.CxRxs566.js +0 -23
  71. package/dist/chunks/tasks.BZnCS9aT.js +0 -18
  72. package/dist/chunks/utils.Ck2hJTRs.js +0 -23
  73. package/dist/chunks/{environment.CzISCQ7o.d.ts → environment.LoooBwUu.d.ts} +24 -24
  74. package/dist/chunks/{index.lVXYBqEP.js → index.BMoXz_-n.js} +186 -186
package/LICENSE.md CHANGED
@@ -25,7 +25,7 @@ SOFTWARE.
25
25
 
26
26
  # Licenses of bundled dependencies
27
27
  The published Vitest artifact additionally contains code with the following licenses:
28
- Apache-2.0, BSD-3-Clause, ISC, MIT
28
+ BSD-3-Clause, ISC, MIT
29
29
 
30
30
  # Bundled dependencies:
31
31
  ## @antfu/install-pkg
@@ -461,214 +461,6 @@ Repository: https://github.com/mathiasbynens/emoji-regex.git
461
461
 
462
462
  ---------------------------------------
463
463
 
464
- ## expect-type
465
- License: Apache-2.0
466
- Repository: https://github.com/mmkal/expect-type.git
467
-
468
- > Apache License
469
- > Version 2.0, January 2004
470
- > http://www.apache.org/licenses/
471
- >
472
- > TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
473
- >
474
- > 1. Definitions.
475
- >
476
- > "License" shall mean the terms and conditions for use, reproduction,
477
- > and distribution as defined by Sections 1 through 9 of this document.
478
- >
479
- > "Licensor" shall mean the copyright owner or entity authorized by
480
- > the copyright owner that is granting the License.
481
- >
482
- > "Legal Entity" shall mean the union of the acting entity and all
483
- > other entities that control, are controlled by, or are under common
484
- > control with that entity. For the purposes of this definition,
485
- > "control" means (i) the power, direct or indirect, to cause the
486
- > direction or management of such entity, whether by contract or
487
- > otherwise, or (ii) ownership of fifty percent (50%) or more of the
488
- > outstanding shares, or (iii) beneficial ownership of such entity.
489
- >
490
- > "You" (or "Your") shall mean an individual or Legal Entity
491
- > exercising permissions granted by this License.
492
- >
493
- > "Source" form shall mean the preferred form for making modifications,
494
- > including but not limited to software source code, documentation
495
- > source, and configuration files.
496
- >
497
- > "Object" form shall mean any form resulting from mechanical
498
- > transformation or translation of a Source form, including but
499
- > not limited to compiled object code, generated documentation,
500
- > and conversions to other media types.
501
- >
502
- > "Work" shall mean the work of authorship, whether in Source or
503
- > Object form, made available under the License, as indicated by a
504
- > copyright notice that is included in or attached to the work
505
- > (an example is provided in the Appendix below).
506
- >
507
- > "Derivative Works" shall mean any work, whether in Source or Object
508
- > form, that is based on (or derived from) the Work and for which the
509
- > editorial revisions, annotations, elaborations, or other modifications
510
- > represent, as a whole, an original work of authorship. For the purposes
511
- > of this License, Derivative Works shall not include works that remain
512
- > separable from, or merely link (or bind by name) to the interfaces of,
513
- > the Work and Derivative Works thereof.
514
- >
515
- > "Contribution" shall mean any work of authorship, including
516
- > the original version of the Work and any modifications or additions
517
- > to that Work or Derivative Works thereof, that is intentionally
518
- > submitted to Licensor for inclusion in the Work by the copyright owner
519
- > or by an individual or Legal Entity authorized to submit on behalf of
520
- > the copyright owner. For the purposes of this definition, "submitted"
521
- > means any form of electronic, verbal, or written communication sent
522
- > to the Licensor or its representatives, including but not limited to
523
- > communication on electronic mailing lists, source code control systems,
524
- > and issue tracking systems that are managed by, or on behalf of, the
525
- > Licensor for the purpose of discussing and improving the Work, but
526
- > excluding communication that is conspicuously marked or otherwise
527
- > designated in writing by the copyright owner as "Not a Contribution."
528
- >
529
- > "Contributor" shall mean Licensor and any individual or Legal Entity
530
- > on behalf of whom a Contribution has been received by Licensor and
531
- > subsequently incorporated within the Work.
532
- >
533
- > 2. Grant of Copyright License. Subject to the terms and conditions of
534
- > this License, each Contributor hereby grants to You a perpetual,
535
- > worldwide, non-exclusive, no-charge, royalty-free, irrevocable
536
- > copyright license to reproduce, prepare Derivative Works of,
537
- > publicly display, publicly perform, sublicense, and distribute the
538
- > Work and such Derivative Works in Source or Object form.
539
- >
540
- > 3. Grant of Patent License. Subject to the terms and conditions of
541
- > this License, each Contributor hereby grants to You a perpetual,
542
- > worldwide, non-exclusive, no-charge, royalty-free, irrevocable
543
- > (except as stated in this section) patent license to make, have made,
544
- > use, offer to sell, sell, import, and otherwise transfer the Work,
545
- > where such license applies only to those patent claims licensable
546
- > by such Contributor that are necessarily infringed by their
547
- > Contribution(s) alone or by combination of their Contribution(s)
548
- > with the Work to which such Contribution(s) was submitted. If You
549
- > institute patent litigation against any entity (including a
550
- > cross-claim or counterclaim in a lawsuit) alleging that the Work
551
- > or a Contribution incorporated within the Work constitutes direct
552
- > or contributory patent infringement, then any patent licenses
553
- > granted to You under this License for that Work shall terminate
554
- > as of the date such litigation is filed.
555
- >
556
- > 4. Redistribution. You may reproduce and distribute copies of the
557
- > Work or Derivative Works thereof in any medium, with or without
558
- > modifications, and in Source or Object form, provided that You
559
- > meet the following conditions:
560
- >
561
- > (a) You must give any other recipients of the Work or
562
- > Derivative Works a copy of this License; and
563
- >
564
- > (b) You must cause any modified files to carry prominent notices
565
- > stating that You changed the files; and
566
- >
567
- > (c) You must retain, in the Source form of any Derivative Works
568
- > that You distribute, all copyright, patent, trademark, and
569
- > attribution notices from the Source form of the Work,
570
- > excluding those notices that do not pertain to any part of
571
- > the Derivative Works; and
572
- >
573
- > (d) If the Work includes a "NOTICE" text file as part of its
574
- > distribution, then any Derivative Works that You distribute must
575
- > include a readable copy of the attribution notices contained
576
- > within such NOTICE file, excluding those notices that do not
577
- > pertain to any part of the Derivative Works, in at least one
578
- > of the following places: within a NOTICE text file distributed
579
- > as part of the Derivative Works; within the Source form or
580
- > documentation, if provided along with the Derivative Works; or,
581
- > within a display generated by the Derivative Works, if and
582
- > wherever such third-party notices normally appear. The contents
583
- > of the NOTICE file are for informational purposes only and
584
- > do not modify the License. You may add Your own attribution
585
- > notices within Derivative Works that You distribute, alongside
586
- > or as an addendum to the NOTICE text from the Work, provided
587
- > that such additional attribution notices cannot be construed
588
- > as modifying the License.
589
- >
590
- > You may add Your own copyright statement to Your modifications and
591
- > may provide additional or different license terms and conditions
592
- > for use, reproduction, or distribution of Your modifications, or
593
- > for any such Derivative Works as a whole, provided Your use,
594
- > reproduction, and distribution of the Work otherwise complies with
595
- > the conditions stated in this License.
596
- >
597
- > 5. Submission of Contributions. Unless You explicitly state otherwise,
598
- > any Contribution intentionally submitted for inclusion in the Work
599
- > by You to the Licensor shall be under the terms and conditions of
600
- > this License, without any additional terms or conditions.
601
- > Notwithstanding the above, nothing herein shall supersede or modify
602
- > the terms of any separate license agreement you may have executed
603
- > with Licensor regarding such Contributions.
604
- >
605
- > 6. Trademarks. This License does not grant permission to use the trade
606
- > names, trademarks, service marks, or product names of the Licensor,
607
- > except as required for reasonable and customary use in describing the
608
- > origin of the Work and reproducing the content of the NOTICE file.
609
- >
610
- > 7. Disclaimer of Warranty. Unless required by applicable law or
611
- > agreed to in writing, Licensor provides the Work (and each
612
- > Contributor provides its Contributions) on an "AS IS" BASIS,
613
- > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
614
- > implied, including, without limitation, any warranties or conditions
615
- > of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
616
- > PARTICULAR PURPOSE. You are solely responsible for determining the
617
- > appropriateness of using or redistributing the Work and assume any
618
- > risks associated with Your exercise of permissions under this License.
619
- >
620
- > 8. Limitation of Liability. In no event and under no legal theory,
621
- > whether in tort (including negligence), contract, or otherwise,
622
- > unless required by applicable law (such as deliberate and grossly
623
- > negligent acts) or agreed to in writing, shall any Contributor be
624
- > liable to You for damages, including any direct, indirect, special,
625
- > incidental, or consequential damages of any character arising as a
626
- > result of this License or out of the use or inability to use the
627
- > Work (including but not limited to damages for loss of goodwill,
628
- > work stoppage, computer failure or malfunction, or any and all
629
- > other commercial damages or losses), even if such Contributor
630
- > has been advised of the possibility of such damages.
631
- >
632
- > 9. Accepting Warranty or Additional Liability. While redistributing
633
- > the Work or Derivative Works thereof, You may choose to offer,
634
- > and charge a fee for, acceptance of support, warranty, indemnity,
635
- > or other liability obligations and/or rights consistent with this
636
- > License. However, in accepting such obligations, You may act only
637
- > on Your own behalf and on Your sole responsibility, not on behalf
638
- > of any other Contributor, and only if You agree to indemnify,
639
- > defend, and hold each Contributor harmless for any liability
640
- > incurred by, or claims asserted against, such Contributor by reason
641
- > of your accepting any such warranty or additional liability.
642
- >
643
- > END OF TERMS AND CONDITIONS
644
- >
645
- > APPENDIX: How to apply the Apache License to your work.
646
- >
647
- > To apply the Apache License to your work, attach the following
648
- > boilerplate notice, with the fields enclosed by brackets "[]"
649
- > replaced with your own identifying information. (Don't include
650
- > the brackets!) The text should be enclosed in the appropriate
651
- > comment syntax for the file format. We also recommend that a
652
- > file or class name and description of purpose be included on the
653
- > same "printed page" as the copyright notice for easier
654
- > identification within third-party archives.
655
- >
656
- > Copyright [yyyy] [name of copyright owner]
657
- >
658
- > Licensed under the Apache License, Version 2.0 (the "License");
659
- > you may not use this file except in compliance with the License.
660
- > You may obtain a copy of the License at
661
- >
662
- > http://www.apache.org/licenses/LICENSE-2.0
663
- >
664
- > Unless required by applicable law or agreed to in writing, software
665
- > distributed under the License is distributed on an "AS IS" BASIS,
666
- > WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
667
- > See the License for the specific language governing permissions and
668
- > limitations under the License.
669
-
670
- ---------------------------------------
671
-
672
464
  ## fast-glob
673
465
  License: MIT
674
466
  By: Denis Malinochkin
package/dist/browser.d.ts CHANGED
@@ -1,30 +1,30 @@
1
- export { collectTests, processError, startTests } from '@vitest/runner';
1
+ import { C as CoverageProvider, b as CoverageProviderModule } from './chunks/reporters.anwo7Y6a.js';
2
+ import { a as SerializedCoverageConfig, S as SerializedConfig } from './chunks/config.Crbj2GAb.js';
3
+ import * as spy$1 from '@vitest/spy';
2
4
  import { DiffOptions } from '@vitest/expect';
3
5
  import { VitestExecutor } from './execute.js';
4
- import { S as SerializedConfig, a as SerializedCoverageConfig } from './chunks/config.Crbj2GAb.js';
5
- import { C as CoverageProvider, b as CoverageProviderModule } from './chunks/reporters.C4ZHgdxQ.js';
6
- import * as spy$1 from '@vitest/spy';
7
- import 'node:vm';
8
- import 'vite-node/client';
9
- import 'vite-node';
10
- import './chunks/worker.B6RjTtbk.js';
11
- import '@vitest/snapshot';
12
- import './chunks/environment.CzISCQ7o.js';
13
- import '@vitest/mocker';
14
- import './chunks/mocker.cRtM890J.js';
6
+ export { collectTests, processError, startTests } from '@vitest/runner';
15
7
  import '@vitest/pretty-format';
16
- import '@vitest/snapshot/environment';
8
+ import '@vitest/snapshot';
17
9
  import 'vite';
10
+ import 'vite-node';
11
+ import 'chai';
12
+ import './chunks/environment.LoooBwUu.js';
18
13
  import 'node:stream';
19
- import '@vitest/snapshot/manager';
20
- import 'vite-node/server';
21
14
  import '@vitest/utils';
22
15
  import '@vitest/utils/source-map';
16
+ import 'vite-node/client';
17
+ import 'vite-node/server';
18
+ import '@vitest/snapshot/manager';
23
19
  import 'node:fs';
24
- import 'chai';
25
- import './chunks/benchmark.JVlTzojj.js';
20
+ import './chunks/benchmark.geERunq4.js';
26
21
  import '@vitest/runner/utils';
27
22
  import 'tinybench';
23
+ import '@vitest/snapshot/environment';
24
+ import './chunks/worker.BAlI9hII.js';
25
+ import 'node:vm';
26
+ import '@vitest/mocker';
27
+ import './chunks/mocker.cRtM890J.js';
28
28
 
29
29
  function _mergeNamespaces(n, m) {
30
30
  m.forEach(function (e) {
@@ -45,10 +45,6 @@ var spy = /*#__PURE__*/_mergeNamespaces({
45
45
  __proto__: null
46
46
  }, [spy$1]);
47
47
 
48
- declare function setupCommonEnv(config: SerializedConfig): Promise<void>;
49
- declare function loadDiffConfig(config: SerializedConfig, executor: VitestExecutor): Promise<DiffOptions | undefined>;
50
- declare function loadSnapshotSerializers(config: SerializedConfig, executor: VitestExecutor): Promise<void>;
51
-
52
48
  interface Loader {
53
49
  executeId: (id: string) => Promise<{
54
50
  default: CoverageProviderModule;
@@ -60,4 +56,8 @@ declare function startCoverageInsideWorker(options: SerializedCoverageConfig | u
60
56
  declare function takeCoverageInsideWorker(options: SerializedCoverageConfig | undefined, loader: Loader): Promise<unknown>;
61
57
  declare function stopCoverageInsideWorker(options: SerializedCoverageConfig | undefined, loader: Loader): Promise<unknown>;
62
58
 
59
+ declare function setupCommonEnv(config: SerializedConfig): Promise<void>;
60
+ declare function loadDiffConfig(config: SerializedConfig, executor: VitestExecutor): Promise<DiffOptions | undefined>;
61
+ declare function loadSnapshotSerializers(config: SerializedConfig, executor: VitestExecutor): Promise<void>;
62
+
63
63
  export { spy as SpyModule, getCoverageProvider, loadDiffConfig, loadSnapshotSerializers, setupCommonEnv, startCoverageInsideWorker, stopCoverageInsideWorker, takeCoverageInsideWorker };
package/dist/browser.js CHANGED
@@ -1,9 +1,9 @@
1
- export { collectTests, processError, startTests } from '@vitest/runner';
2
- export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './chunks/setup-common.BKyF15v_.js';
3
- export { g as getCoverageProvider, a as startCoverageInsideWorker, s as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/coverage.zlNdAMHK.js';
1
+ export { g as getCoverageProvider, s as startCoverageInsideWorker, a as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/coverage.BoMDb1ip.js';
4
2
  export { s as SpyModule } from './chunks/spy.Cf_4R5Oe.js';
5
- import '@vitest/utils';
6
- import '@vitest/snapshot';
7
- import './chunks/run-once.Sxe67Wng.js';
8
- import './chunks/utils.Ck2hJTRs.js';
3
+ export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './chunks/setup-common.DDmVKp6O.js';
4
+ export { collectTests, processError, startTests } from '@vitest/runner';
9
5
  import '@vitest/spy';
6
+ import '@vitest/snapshot';
7
+ import '@vitest/utils';
8
+ import './chunks/run-once.2ogXb3JV.js';
9
+ import './chunks/utils.C8RiOc4B.js';