Skip to content

Commit 7c51fc0

Browse files
committed
fix types
1 parent 4928989 commit 7c51fc0

File tree

5 files changed

+17
-6
lines changed

5 files changed

+17
-6
lines changed

.eslintrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
module.exports = {
22
root: true,
33
extends: [ 'codex/ts' ],
4+
ignorePatterns: [
5+
'dist/',
6+
'node_modules/',
7+
'package.json',
8+
'tsconfig.json',
9+
],
410
env: {
511
browser: true,
612
},

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@hawk.so/javascript",
3-
"version": "3.2.0",
3+
"type": "commonjs",
4+
"version": "3.2.0-rc.2",
45
"description": "JavaScript errors tracking for Hawk.so",
56
"files": [
67
"dist"

src/catcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Socket from './modules/socket';
22
import Sanitizer from './modules/sanitizer';
33
import log from './utils/log';
44
import StackParser from './modules/stackParser';
5-
import type { CatcherMessage, HawkInitialSettings } from '@/types';
5+
import type { CatcherMessage, HawkInitialSettings } from './types';
66
import { VueIntegration } from './integrations/vue';
77
import { id } from './utils/id';
88
import type {

src/integrations/vue.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,15 @@ export class VueIntegration {
239239
* @param component - where error was occurred
240240
*/
241241
private printError(err: Error, info: string, component: string | null): void {
242+
const source = this.getRuntimeErrorSourceByCode(info);
243+
242244
if (component === null) {
243-
console.error(`${info}`, err);
245+
console.error(`${source}`, err);
244246

245247
return;
246248
}
247249

248-
console.error(`${component} @ ${info}`, err);
250+
console.error(`${component} @ ${source}`, err);
249251
}
250252
}
251253

tsconfig.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
"declaration": true,
88
"outDir": "dist",
99
"rootDir": "src",
10-
"moduleResolution": "Bundler",
10+
"module": "NodeNext",
11+
"moduleResolution": "nodenext",
1112
"lib": ["dom", "es2017", "es2018"],
1213
"baseUrl": ".",
1314
"paths": {
1415
"@/types": ["src/types"]
15-
}
16+
},
17+
"allowSyntheticDefaultImports": true
1618
},
1719
"include": [
1820
"src/**/*",

0 commit comments

Comments
 (0)