File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -3,4 +3,3 @@ export const DEFAULT_BUILD_TIMEOUT_SECONDS = 60 * 5;
3
3
export const DEFAULT_TEST_TIMEOUT_SECONDS = 60 * 2 ;
4
4
export const VERDACCIO_VERSION = '5.22.1' ;
5
5
export const PUBLISH_PACKAGES_DOCKER_IMAGE_NAME = 'publish-packages' ;
6
- export const TMP_DIR = 'tmp' ;
Original file line number Diff line number Diff line change 1
1
/* eslint-disable no-console */
2
2
3
- import { uuid4 } from '@sentry/utils' ;
4
3
import * as fs from 'fs-extra' ;
4
+ import * as os from 'os' ;
5
5
import * as path from 'path' ;
6
6
7
7
import { buildApp } from './buildApp' ;
8
- import { TMP_DIR } from './constants' ;
9
8
import { testApp } from './testApp' ;
10
9
import type { Env , RecipeInstance , RecipeTestResult } from './types' ;
11
10
11
+ let tmpDirCount = 0 ;
12
+
12
13
// This should never throw, we always return a result here
13
14
export async function buildAndTestApp (
14
15
recipeInstance : RecipeInstance ,
@@ -17,7 +18,7 @@ export async function buildAndTestApp(
17
18
const { recipe, port } = recipeInstance ;
18
19
const recipeDirname = path . dirname ( recipe . path ) ;
19
20
20
- const targetDir = path . join ( TMP_DIR , `${ recipe . testApplicationName } -${ uuid4 ( ) } ` ) ;
21
+ const targetDir = path . join ( os . tmpdir ( ) , `${ recipe . testApplicationName } -${ tmpDirCount ++ } ` ) ;
21
22
22
23
await fs . copy ( recipeDirname , targetDir ) ;
23
24
Original file line number Diff line number Diff line change 20
20
"clean" : " rimraf tmp test-applications/**/node_modules test-applications/**/dist"
21
21
},
22
22
"devDependencies" : {
23
- "@sentry/utils" : " 7.43.0" ,
24
23
"@types/glob" : " 8.0.0" ,
25
24
"@types/node" : " ^14.6.4" ,
26
25
"dotenv" : " 16.0.3" ,
You can’t perform that action at this time.
0 commit comments