Skip to content

Commit e8d5ca3

Browse files
committed
revert js worker changes
1 parent 125fb5e commit e8d5ca3

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

workers/javascript/src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ export default class JavascriptEventWorker extends EventWorker {
233233
*/
234234
lines = this.readSourceLines(consumer, originalLocation);
235235

236-
const _originalContent = consumer.sourceContentFor(originalLocation.source);
236+
const originalContent = consumer.sourceContentFor(originalLocation.source);
237237

238-
// functionContext = this.getFunctionContext(originalContent, originalLocation.line) ?? originalLocation.name;
238+
functionContext = this.getFunctionContext(originalContent, originalLocation.line) ?? originalLocation.name;
239239
}
240240

241241
return Object.assign(stackFrame, {
@@ -254,7 +254,7 @@ export default class JavascriptEventWorker extends EventWorker {
254254
* @param line - number of the line from the stack trace
255255
* @returns {string | null} - string of the function context or null if it could not be parsed
256256
*/
257-
private _getFunctionContext(sourceCode: string, line: number): string | null {
257+
private getFunctionContext(sourceCode: string, line: number): string | null {
258258
let functionName: string | null = null;
259259
let className: string | null = null;
260260
let isAsync = false;
@@ -284,7 +284,7 @@ export default class JavascriptEventWorker extends EventWorker {
284284
ClassDeclaration(path) {
285285
if (path.node.loc && path.node.loc.start.line <= line && path.node.loc.end.line >= line) {
286286
console.log(`class declaration: loc: ${path.node.loc}, line: ${line}, node.start.line: ${path.node.loc.start.line}, node.end.line: ${path.node.loc.end.line}`);
287-
287+
288288
className = path.node.id.name || null;
289289
}
290290
},
@@ -297,7 +297,7 @@ export default class JavascriptEventWorker extends EventWorker {
297297
ClassMethod(path) {
298298
if (path.node.loc && path.node.loc.start.line <= line && path.node.loc.end.line >= line) {
299299
console.log(`class declaration: loc: ${path.node.loc}, line: ${line}, node.start.line: ${path.node.loc.start.line}, node.end.line: ${path.node.loc.end.line}`);
300-
300+
301301
// Handle different key types
302302
if (path.node.key.type === 'Identifier') {
303303
functionName = path.node.key.name;
@@ -313,7 +313,7 @@ export default class JavascriptEventWorker extends EventWorker {
313313
FunctionDeclaration(path) {
314314
if (path.node.loc && path.node.loc.start.line <= line && path.node.loc.end.line >= line) {
315315
console.log(`function declaration: loc: ${path.node.loc}, line: ${line}, node.start.line: ${path.node.loc.start.line}, node.end.line: ${path.node.loc.end.line}`);
316-
316+
317317
functionName = path.node.id.name || null;
318318
isAsync = path.node.async;
319319
}

workers/release/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ export default class ReleaseWorker extends Worker {
162162
/**
163163
* Iterate all maps of the new release and save only new
164164
*/
165-
let savedFiles = await Promise.all(files.map(async (map: SourceMapDataExtended) => {
165+
const savedFiles = await Promise.all(files.map(async (map: SourceMapDataExtended) => {
166166
/**
167167
* Skip already saved maps
168168
*/
@@ -194,7 +194,7 @@ export default class ReleaseWorker extends Worker {
194194
* Filter undefined files and then prepare files that would be saved to releases table
195195
* we do not need their content since it would be stored in gridFS
196196
*/
197-
let savedFilesWithoutContent: Omit<SourceMapDataExtended, 'content'>[] = savedFiles.filter(file => {
197+
const savedFilesWithoutContent: Omit<SourceMapDataExtended, 'content'>[] = savedFiles.filter(file => {
198198
return file !== undefined;
199199
}).map(({ content, ...rest }) => {
200200
return rest;

0 commit comments

Comments
 (0)