Skip to content

Commit 4703cf8

Browse files
authored
fix!: remove deprecated internal helpers and environment exports (#8198)
1 parent dc8486d commit 4703cf8

File tree

3 files changed

+2
-45
lines changed

3 files changed

+2
-45
lines changed

packages/vitest/src/public/index.ts

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ import type {
22
Custom as Custom_,
33
DoneCallback as DoneCallback_,
44
File as File_,
5-
RuntimeContext as RuntimeContext_,
65
Suite as Suite_,
7-
SuiteHooks as SuiteHooks_,
86
Task as Task_,
97
TaskBase as TaskBase_,
108
TaskResult as TaskResult_,
@@ -63,20 +61,6 @@ import type {
6361
RootAndTarget as RootAndTarget_,
6462
TscErrorInfo as TscErrorInfo_,
6563
} from '../typecheck/types'
66-
import type {
67-
Environment as Environment_,
68-
EnvironmentReturn as EnvironmentReturn_,
69-
ResolvedTestEnvironment as ResolvedTestEnvironment_,
70-
VmEnvironmentReturn as VmEnvironmentReturn_,
71-
} from '../types/environment'
72-
import type {
73-
ArgumentsType as ArgumentsType_,
74-
Arrayable as Arrayable_,
75-
Awaitable as Awaitable_,
76-
Constructable as Constructable_,
77-
MutableArray as MutableArray_,
78-
Nullable as Nullable_,
79-
} from '../types/general'
8064
import type {
8165
WorkerRPC as WorkerRPC_,
8266
} from '../types/worker'
@@ -149,11 +133,6 @@ export type TaskResultPack = TaskResultPack_
149133
/** @deprecated don't use `DoneCallback` since it's not supported */
150134
export type DoneCallback = DoneCallback_
151135

152-
/** @deprecated internal type, don't use it */
153-
export type RuntimeContext = RuntimeContext_
154-
/** @deprecated internal type, don't use it */
155-
export type SuiteHooks = SuiteHooks_
156-
157136
export type { AssertType } from '../typecheck/assertType'
158137
export { expectTypeOf } from '../typecheck/expectTypeOf'
159138
export type { ExpectTypeOf } from '../typecheck/expectTypeOf'
@@ -175,35 +154,13 @@ export type {
175154
UserConsoleLog,
176155
} from '../types/general'
177156

178-
/** @deprecated do not use, internal helper */
179-
export type Awaitable<T> = Awaitable_<T>
180-
/** @deprecated do not use, internal helper */
181-
export type Nullable<T> = Nullable_<T>
182-
/** @deprecated do not use, internal helper */
183-
export type Arrayable<T> = Arrayable_<T>
184-
/** @deprecated do not use, internal helper */
185-
export type ArgumentsType<T> = ArgumentsType_<T>
186-
/** @deprecated do not use, internal helper */
187-
export type MutableArray<T extends readonly any[]> = MutableArray_<T>
188-
/** @deprecated do not use, internal helper */
189-
export type Constructable = Constructable_
190-
191157
export type {
192158
RunnerRPC,
193159
RuntimeRPC,
194160
} from '../types/rpc'
195161

196162
export type { BrowserUI } from '../types/ui'
197163

198-
/** @deprecated import from `vitest/environments` instead */
199-
export type EnvironmentReturn = EnvironmentReturn_
200-
/** @deprecated import from `vitest/environments` instead */
201-
export type VmEnvironmentReturn = VmEnvironmentReturn_
202-
/** @deprecated import from `vitest/environments` instead */
203-
export type Environment = Environment_
204-
/** @deprecated do not use it */
205-
export type ResolvedTestEnvironment = ResolvedTestEnvironment_
206-
207164
export type {
208165
ContextRPC,
209166
ContextTestEnvironment,

test/cli/custom.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Environment } from 'vitest'
1+
import type { Environment } from 'vitest/environments'
22
import vm from 'node:vm'
33
import debug from 'debug'
44

test/core/vitest-environment-custom/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Environment } from 'vitest'
1+
import type { Environment } from 'vitest/environments'
22
import vm from 'node:vm'
33
import debug from 'debug'
44

0 commit comments

Comments
 (0)