@@ -3,25 +3,9 @@ import * as fs from 'fs';
3
3
4
4
const CURRENT_NODE_VERSION = process . version . replace ( 'v' , '' ) . split ( '.' ) [ 0 ] ;
5
5
6
- // We run ember tests in their own job.
7
- const DEFAULT_SKIP_TESTS_PACKAGES = [ '@sentry/ember' ] ;
8
-
9
- // These packages don't support Node 8 for syntax or dependency reasons.
10
- const NODE_8_SKIP_TESTS_PACKAGES = [
6
+ const DEFAULT_SKIP_TESTS_PACKAGES = [
11
7
'@sentry-internal/eslint-plugin-sdk' ,
12
- '@sentry/react' ,
13
- '@sentry/wasm' ,
14
- '@sentry/gatsby' ,
15
- '@sentry/serverless' ,
16
- '@sentry/nextjs' ,
17
- '@sentry/angular' ,
18
- '@sentry/remix' ,
19
- '@sentry/svelte' , // svelte testing library requires Node >= 10
20
- '@sentry/replay' ,
21
- ] ;
22
-
23
- // These can be skipped when running tests in different Node environments.
24
- const SKIP_BROWSER_TESTS_PACKAGES = [
8
+ '@sentry/ember' ,
25
9
'@sentry/browser' ,
26
10
'@sentry/vue' ,
27
11
'@sentry/react' ,
@@ -31,15 +15,8 @@ const SKIP_BROWSER_TESTS_PACKAGES = [
31
15
'@sentry/wasm' ,
32
16
] ;
33
17
34
- // These can be skipped when running tests independently of the Node version.
35
- const SKIP_NODE_TESTS_PACKAGES = [
36
- '@sentry/node' ,
37
- '@sentry/opentelemetry-node' ,
38
- '@sentry/serverless' ,
39
- '@sentry/nextjs' ,
40
- '@sentry/remix' ,
41
- '@sentry/gatsby' ,
42
- ] ;
18
+ // These packages don't support Node 8 for syntax or dependency reasons.
19
+ const NODE_8_SKIP_TESTS_PACKAGES = [ '@sentry/gatsby' , '@sentry/serverless' , '@sentry/nextjs' , '@sentry/remix' ] ;
43
20
44
21
// We have to downgrade some of our dependencies in order to run tests in Node 8 and 10.
45
22
const NODE_8_LEGACY_DEPENDENCIES = [
@@ -48,12 +25,14 @@ const NODE_8_LEGACY_DEPENDENCIES = [
48
25
49
26
50
27
28
+
51
29
] ;
52
30
53
- const NODE_10_SKIP_TESTS_PACKAGES = [ '@sentry/remix' , '@sentry/replay' ] ;
54
- const NODE_10_LEGACY_DEPENDENCIES = [ '[email protected] ' ] ;
31
+ const NODE_10_SKIP_TESTS_PACKAGES = [ '@sentry/remix' ] ;
32
+ const NODE_10_LEGACY_DEPENDENCIES = [ '[email protected] ' , '[email protected] ' ] ;
55
33
56
34
const NODE_12_SKIP_TESTS_PACKAGES = [ '@sentry/remix' ] ;
35
+ const NODE_12_LEGACY_DEPENDENCIES = [ '[email protected] ' ] ;
57
36
58
37
type JSONValue = string | number | boolean | null | JSONArray | JSONObject ;
59
38
@@ -70,8 +49,8 @@ interface TSConfigJSON extends JSONObject {
70
49
* Run the given shell command, piping the shell process's `stdin`, `stdout`, and `stderr` to that of the current
71
50
* process. Returns contents of `stdout`.
72
51
*/
73
- function run ( cmd : string , options ?: childProcess . ExecSyncOptions ) {
74
- return childProcess . execSync ( cmd , { stdio : 'inherit' , ...options } ) ;
52
+ function run ( cmd : string , options ?: childProcess . ExecSyncOptions ) : void {
53
+ childProcess . execSync ( cmd , { stdio : 'inherit' , ...options } ) ;
75
54
}
76
55
77
56
/**
@@ -135,14 +114,6 @@ function runTests(): void {
135
114
136
115
DEFAULT_SKIP_TESTS_PACKAGES . forEach ( dep => ignores . add ( dep ) ) ;
137
116
138
- if ( process . env . TESTS_SKIP === 'browser' ) {
139
- SKIP_BROWSER_TESTS_PACKAGES . forEach ( dep => ignores . add ( dep ) ) ;
140
- }
141
-
142
- if ( process . env . TESTS_SKIP === 'node' ) {
143
- SKIP_NODE_TESTS_PACKAGES . forEach ( dep => ignores . add ( dep ) ) ;
144
- }
145
-
146
117
switch ( CURRENT_NODE_VERSION ) {
147
118
case '8' :
148
119
NODE_8_SKIP_TESTS_PACKAGES . forEach ( dep => ignores . add ( dep ) ) ;
@@ -157,6 +128,7 @@ function runTests(): void {
157
128
break ;
158
129
case '12' :
159
130
NODE_12_SKIP_TESTS_PACKAGES . forEach ( dep => ignores . add ( dep ) ) ;
131
+ installLegacyDeps ( NODE_12_LEGACY_DEPENDENCIES ) ;
160
132
es6ifyTestTSConfig ( 'utils' ) ;
161
133
break ;
162
134
}
0 commit comments