File tree 8 files changed +224
-492
lines changed
packages/vitest/src/node/plugins
8 files changed +224
-492
lines changed Original file line number Diff line number Diff line change 11
11
12
12
steps :
13
13
- name : Install pnpm
14
- uses : pnpm/action-setup@v2
14
+ uses : pnpm/action-setup@v4
15
15
16
16
- name : Set node version to ${{ inputs.node-version }}
17
17
uses : actions/setup-node@v4
Original file line number Diff line number Diff line change 14
14
- uses : actions/checkout@v4
15
15
16
16
- name : Install pnpm
17
- uses : pnpm/action-setup@v2
17
+ uses : pnpm/action-setup@v4
18
18
19
19
- name : Install node
20
20
uses : actions/setup-node@v4
Original file line number Diff line number Diff line change 20
20
fetch-depth : 0
21
21
22
22
- name : Install pnpm
23
- uses : pnpm/action-setup@v3
23
+ uses : pnpm/action-setup@v4
24
24
25
25
- name : Set node version to 20
26
26
uses : actions/setup-node@v4
Original file line number Diff line number Diff line change 63
63
"simple-git-hooks" : " ^2.11.1" ,
64
64
"tsx" : " ^4.16.0" ,
65
65
"typescript" : " ^5.5.2" ,
66
- "vite" : " ^5.2.6 " ,
66
+ "vite" : " ^5.3.3 " ,
67
67
"vitest" : " workspace:*" ,
68
68
"zx" : " ^8.1.3"
69
69
},
Original file line number Diff line number Diff line change @@ -81,8 +81,9 @@ export async function VitestPlugin(
81
81
viteConfig . esbuild === false
82
82
? false
83
83
: {
84
+ // Lowest target Vitest supports is Node18
85
+ target : viteConfig . esbuild ?. target || 'node18' ,
84
86
sourcemap : 'external' ,
85
-
86
87
// Enables using ignore hint for coverage providers with @preserve keyword
87
88
legalComments : 'inline' ,
88
89
} ,
Original file line number Diff line number Diff line change @@ -70,12 +70,15 @@ export function WorkspaceVitestPlugin(
70
70
alias : testConfig . alias ,
71
71
conditions : [ 'node' ] ,
72
72
} ,
73
- esbuild : {
74
- sourcemap : 'external' ,
75
-
76
- // Enables using ignore hint for coverage providers with @preserve keyword
77
- legalComments : 'inline' ,
78
- } ,
73
+ esbuild : viteConfig . esbuild === false
74
+ ? false
75
+ : {
76
+ // Lowest target Vitest supports is Node18
77
+ target : viteConfig . esbuild ?. target || 'node18' ,
78
+ sourcemap : 'external' ,
79
+ // Enables using ignore hint for coverage providers with @preserve keyword
80
+ legalComments : 'inline' ,
81
+ } ,
79
82
server : {
80
83
// disable watch mode in workspaces,
81
84
// because it is handled by the top-level watcher
You can’t perform that action at this time.
0 commit comments