Skip to content

Commit 679265c

Browse files
committed
Convert shell script to TS.
1 parent 340ca49 commit 679265c

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

packages/node-integration-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"private": true,
99
"scripts": {
1010
"clean": "rimraf -g **/node_modules",
11-
"prisma:init": "(cd suites/tracing/prisma-orm && ./setup.sh)",
11+
"prisma:init": "(cd suites/tracing/prisma-orm && ts-node ./setup.ts)",
1212
"lint": "run-s lint:prettier lint:eslint",
1313
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
1414
"lint:prettier": "prettier --check \"{suites,utils}/**/*.ts\"",

packages/node-integration-tests/suites/tracing/prisma-orm/setup.sh

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { parseSemver } from '@sentry/utils';
2+
import { execSync } from 'child_process';
3+
4+
const NODE_VERSION = parseSemver(process.versions.node);
5+
6+
if (NODE_VERSION.major && NODE_VERSION.major < 12) {
7+
// eslint-disable-next-line no-console
8+
console.warn(`Skipping Prisma tests on Node: ${NODE_VERSION.major}`);
9+
process.exit(0);
10+
}
11+
12+
try {
13+
execSync('yarn && yarn setup');
14+
} catch (_) {
15+
process.exit(1);
16+
}

0 commit comments

Comments
 (0)