···316316317317---------------------------------------
318318319319+## convert-source-map
320320+License: MIT
321321+By: Thorsten Lorenz
322322+Repository: git://github.com/thlorenz/convert-source-map.git
323323+324324+> Copyright 2013 Thorsten Lorenz.
325325+> All rights reserved.
326326+>
327327+> Permission is hereby granted, free of charge, to any person
328328+> obtaining a copy of this software and associated documentation
329329+> files (the "Software"), to deal in the Software without
330330+> restriction, including without limitation the rights to use,
331331+> copy, modify, merge, publish, distribute, sublicense, and/or sell
332332+> copies of the Software, and to permit persons to whom the
333333+> Software is furnished to do so, subject to the following
334334+> conditions:
335335+>
336336+> The above copyright notice and this permission notice shall be
337337+> included in all copies or substantial portions of the Software.
338338+>
339339+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
340340+> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
341341+> OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
342342+> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
343343+> HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
344344+> WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
345345+> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
346346+> OTHER DEALINGS IN THE SOFTWARE.
347347+348348+---------------------------------------
349349+350350+## diff-sequences
351351+License: MIT
352352+Repository: https://github.com/jestjs/jest.git
353353+354354+> MIT License
355355+>
356356+> Copyright (c) Meta Platforms, Inc. and affiliates.
357357+>
358358+> Permission is hereby granted, free of charge, to any person obtaining a copy
359359+> of this software and associated documentation files (the "Software"), to deal
360360+> in the Software without restriction, including without limitation the rights
361361+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
362362+> copies of the Software, and to permit persons to whom the Software is
363363+> furnished to do so, subject to the following conditions:
364364+>
365365+> The above copyright notice and this permission notice shall be included in all
366366+> copies or substantial portions of the Software.
367367+>
368368+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
369369+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
370370+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
371371+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
372372+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
373373+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
374374+> SOFTWARE.
375375+376376+---------------------------------------
377377+319378## flatted
320379License: ISC
321380By: Andrea Giammarchi
···519578520579---------------------------------------
521580581581+## pathe
582582+License: MIT
583583+Repository: unjs/pathe
584584+585585+> MIT License
586586+>
587587+> Copyright (c) Pooya Parsa <pooya@pi0.io> - Daniel Roe <daniel@roe.dev>
588588+>
589589+> Permission is hereby granted, free of charge, to any person obtaining a copy
590590+> of this software and associated documentation files (the "Software"), to deal
591591+> in the Software without restriction, including without limitation the rights
592592+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
593593+> copies of the Software, and to permit persons to whom the Software is
594594+> furnished to do so, subject to the following conditions:
595595+>
596596+> The above copyright notice and this permission notice shall be included in all
597597+> copies or substantial portions of the Software.
598598+>
599599+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
600600+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
601601+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
602602+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
603603+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
604604+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
605605+> SOFTWARE.
606606+>
607607+> ---
608608+>
609609+> Copyright Joyent, Inc. and other Node contributors.
610610+>
611611+> Permission is hereby granted, free of charge, to any person obtaining a
612612+> copy of this software and associated documentation files (the
613613+> "Software"), to deal in the Software without restriction, including
614614+> without limitation the rights to use, copy, modify, merge, publish,
615615+> distribute, sublicense, and/or sell copies of the Software, and to permit
616616+> persons to whom the Software is furnished to do so, subject to the
617617+> following conditions:
618618+>
619619+> The above copyright notice and this permission notice shall be included
620620+> in all copies or substantial portions of the Software.
621621+>
622622+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
623623+> OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
624624+> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
625625+> NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
626626+> DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
627627+> OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
628628+> USE OR OTHER DEALINGS IN THE SOFTWARE.
629629+>
630630+> ---
631631+>
632632+> Bundled zeptomatch (https://github.com/fabiospampinato/zeptomatch)
633633+>
634634+> The MIT License (MIT)
635635+>
636636+> Copyright (c) 2023-present Fabio Spampinato
637637+>
638638+> Permission is hereby granted, free of charge, to any person obtaining a
639639+> copy of this software and associated documentation files (the "Software"),
640640+> to deal in the Software without restriction, including without limitation
641641+> the rights to use, copy, modify, merge, publish, distribute, sublicense,
642642+> and/or sell copies of the Software, and to permit persons to whom the
643643+> Software is furnished to do so, subject to the following conditions:
644644+>
645645+> The above copyright notice and this permission notice shall be included in
646646+> all copies or substantial portions of the Software.
647647+>
648648+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
649649+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
650650+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
651651+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
652652+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
653653+> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
654654+> DEALINGS IN THE SOFTWARE.
655655+656656+---------------------------------------
657657+522658## prompts
523659License: MIT
524660By: Terkel Gjervig
···716852> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
717853> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
718854> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
855855+856856+---------------------------------------
857857+858858+## tinyrainbow
859859+License: MIT
860860+Repository: git+https://github.com/tinylibs/tinyrainbow.git
861861+862862+> MIT License
863863+>
864864+> Copyright (c) 2022 Tinylibs
865865+>
866866+> Permission is hereby granted, free of charge, to any person obtaining a copy
867867+> of this software and associated documentation files (the "Software"), to deal
868868+> in the Software without restriction, including without limitation the rights
869869+> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
870870+> copies of the Software, and to permit persons to whom the Software is
871871+> furnished to do so, subject to the following conditions:
872872+>
873873+> The above copyright notice and this permission notice shall be included in all
874874+> copies or substantial portions of the Software.
875875+>
876876+> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
877877+> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
878878+> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
879879+> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
880880+> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
881881+> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
882882+> SOFTWARE.
719883720884---------------------------------------
721885
···7171 'vitest/optional-types.js',
7272 'vitest/browser',
7373 'vite/module-runner',
7474- '@vitest/utils/diff',
7575- '@vitest/utils/error',
7676- '@vitest/utils/source-map',
7777- /@vitest\/utils\/\w+/,
7874 /@vitest\/mocker\/\w+/,
79758076 '#module-evaluator',
···116112 dir: 'dist',
117113 format: 'esm',
118114 chunkFileNames: 'chunks/[name].[hash].js',
115115+ manualChunks(id) {
116116+ // `tinyrainbow`'s default export is a single mutable color object whose
117117+ // `isColorSupported` flag and formatters are toggled at runtime (e.g.
118118+ // `disableDefaultColors()`). If it is inlined into several chunks each
119119+ // copy has its own object, so disabling colors on one no longer affects
120120+ // the others. Pin it to ONE shared chunk so every consumer in a process
121121+ // mutates the same instance.
122122+ if (/[\\/]tinyrainbow[\\/]/.test(id)) {
123123+ return 'tinyrainbow'
124124+ }
125125+ },
119126 },
120127 external,
121128 moduleContext: (id) => {
···153160 },
154161 watch: false,
155162 external,
156156- plugins: dtsUtils.dts(),
163163+ plugins: [
164164+ ...dtsUtils.dts(),
165165+ {
166166+ name: 'vitest-bundle-optional-types',
167167+ resolveId(source) {
168168+ if (source === '@vitest/spy/optional-types.js') {
169169+ return 'vitest/optional-runtime-types.js'
170170+ }
171171+ },
172172+ },
173173+ ],
157174 },
158175 ])
159176
+5-4
test/test-utils/index.ts
···1919import { inspect, stripVTControlCharacters } from 'node:util'
2020import { dirname, relative, resolve } from 'pathe'
2121import { x } from 'tinyexec'
2222-import * as tinyrainbow from 'tinyrainbow'
2322import { afterEach, onTestFinished, TestRunner } from 'vitest'
2424-import { Logger, PluginHarness, resolveConfig, startVitest } from 'vitest/node'
2323+import { disableDefaultColors, Logger, PluginHarness, resolveConfig, startVitest } from 'vitest/node'
2524import { Cli } from './cli'
26252727-// override default colors to disable them in tests
2828-Object.assign(tinyrainbow.default, tinyrainbow.getDefaultColors())
2626+// Vitest bundles its own `tinyrainbow` instance (see rollup `manualChunks`), which
2727+// is a different object than the one imported above. Disable colors on it too so
2828+// reporter output captured in tests is deterministic regardless of `CI`/`FORCE_COLOR`.
2929+disableDefaultColors()
29303031export interface VitestRunnerCLIOptions {
3132 std?: 'inherit'
···191191 RunnerTestSuite,
192192} from './index'
193193export type { SerializedError } from '@vitest/utils'
194194+// Re-exported from Vitest's own bundled `tinyrainbow` instance. Vitest inlines
195195+// `tinyrainbow` into its dist, so importing the package directly gives a different
196196+// object than the one the reporters use; this export lets programmatic consumers
197197+// (e.g. the test suite) disable ANSI colors on the instance Vitest actually renders
198198+// with.
199199+export { disableDefaultColors } from 'tinyrainbow'
194200195201export {
196202 esbuildVersion,
+3-1
packages/vitest/src/runtime/workers/base.ts
···77import * as spyModule from '@vitest/spy'
88import { setupChaiConfig } from '../../integrations/chai/config'
99import { loadEnvironment } from '../../integrations/env/loader'
1010-import { NativeModuleRunner } from '../../utils/nativeModuleRunner'
1110import { Traces } from '../../utils/traces'
1211import { emitModuleRunner } from '../listeners'
1312import { listenForErrors } from '../moduleRunner/errorCatcher'
···5554 spyModule,
5655 })
5756 }
5757+ // imported lazily (pulls in `local-pkg`) so it stays out of the default
5858+ // worker startup graph; only the `viteModuleRunner: false` path needs it
5959+ const { NativeModuleRunner } = await import('../../utils/nativeModuleRunner')
5860 _moduleRunner = new NativeModuleRunner(
5961 root,
6062 mocker,