Skip to content

Commit 09f27da

Browse files
committed
Revert to see if it fixes the tests?
1 parent 0bcf63b commit 09f27da

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/node/src/integrations/contextlines.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@ import { Event, EventProcessor, Integration } from '@sentry/types';
33
import { addContextToFrame } from '@sentry/utils';
44
import { readFile } from 'fs';
55
import { LRUMap } from 'lru_map';
6-
import { promisify } from 'util';
76

87
import { NodeClient } from '../client';
98

109
const FILE_CONTENT_CACHE = new LRUMap<string, string | null>(100);
1110
const DEFAULT_LINES_OF_CONTEXT = 7;
1211

1312
function readTextFileAsync(path: string): Promise<string> {
14-
return promisify(readFile)(path, { encoding: 'utf8' });
13+
return new Promise((resolve, reject) => {
14+
readFile(path, 'utf8', (err, data) => {
15+
if (err) reject(err);
16+
else resolve(data);
17+
});
18+
});
1519
}
1620

1721
/**

0 commit comments

Comments
 (0)