@@ -3,25 +3,9 @@ import * as fs from 'fs';
33
44const CURRENT_NODE_VERSION = process . version . replace ( 'v' , '' ) . split ( '.' ) [ 0 ] ;
55
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 = [
117 '@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' ,
259 '@sentry/browser' ,
2610 '@sentry/vue' ,
2711 '@sentry/react' ,
@@ -31,15 +15,8 @@ const SKIP_BROWSER_TESTS_PACKAGES = [
3115 '@sentry/wasm' ,
3216] ;
3317
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' ] ;
4320
4421// We have to downgrade some of our dependencies in order to run tests in Node 8 and 10.
4522const NODE_8_LEGACY_DEPENDENCIES = [
@@ -48,12 +25,14 @@ const NODE_8_LEGACY_DEPENDENCIES = [
48254926502728+ 5129] ;
5230
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] ' ] ; 5533
5634const NODE_12_SKIP_TESTS_PACKAGES = [ '@sentry/remix' ] ;
35+ const NODE_12_LEGACY_DEPENDENCIES = [ '[email protected] ' ] ; 5736
5837type JSONValue = string | number | boolean | null | JSONArray | JSONObject ;
5938
@@ -70,8 +49,8 @@ interface TSConfigJSON extends JSONObject {
7049 * Run the given shell command, piping the shell process's `stdin`, `stdout`, and `stderr` to that of the current
7150 * process. Returns contents of `stdout`.
7251 */
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 } ) ;
7554}
7655
7756/**
@@ -135,14 +114,6 @@ function runTests(): void {
135114
136115 DEFAULT_SKIP_TESTS_PACKAGES . forEach ( dep => ignores . add ( dep ) ) ;
137116
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-
146117 switch ( CURRENT_NODE_VERSION ) {
147118 case '8' :
148119 NODE_8_SKIP_TESTS_PACKAGES . forEach ( dep => ignores . add ( dep ) ) ;
@@ -157,6 +128,7 @@ function runTests(): void {
157128 break ;
158129 case '12' :
159130 NODE_12_SKIP_TESTS_PACKAGES . forEach ( dep => ignores . add ( dep ) ) ;
131+ installLegacyDeps ( NODE_12_LEGACY_DEPENDENCIES ) ;
160132 es6ifyTestTSConfig ( 'utils' ) ;
161133 break ;
162134 }
0 commit comments