Skip to content

Commit 8fb23c6

Browse files
committed
Resolved some workspace build issues
1 parent 608a2b6 commit 8fb23c6

File tree

12 files changed

+3727
-2145
lines changed

12 files changed

+3727
-2145
lines changed

package-lock.json

Lines changed: 3622 additions & 2047 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/angularjs/src/angular.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
// Update once ts issue is fixed: https://github.com/Microsoft/TypeScript/issues/2192
2-
// import * as exceptionless from '../../dist/exceptionless'
1+
import angular from 'angular';
2+
import 'angular-mocks';
3+
import { ExceptionlessClient } from '@exceptionless/core/ExceptionlessClient';
34
// eslint-disable-next-line no-var
4-
declare var exceptionless;
55

66
angular.module('exceptionless', [])
7-
.constant('$ExceptionlessClient', exceptionless.ExceptionlessClient.default)
7+
.constant('$ExceptionlessClient', ExceptionlessClient.default)
88
.factory('exceptionlessHttpInterceptor', ['$location', '$q', '$ExceptionlessClient', ($location, $q, $ExceptionlessClient) => {
99
return {
1010
responseError: function responseError(response) {

packages/angularjs/tsconfig.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"baseUrl": ".",
5-
"outDir": "dist"
4+
"rootDir": ".",
5+
"outDir": "dist",
6+
"esModuleInterop": true
67
},
78
"include": [
89
"src/**/*.ts"
9-
]
10+
],
11+
"types": ["angular", "angular-mock"]
1012
}

packages/browser/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"extends": "../../tsconfig.json",
3+
34
"compilerOptions": {
4-
"baseUrl": ".",
5+
"rootDir": ".",
56
"outDir": "dist"
67
},
78
"include": [

packages/core/test/plugins/default/DuplicateCheckerPlugin-spec.ts

Lines changed: 47 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,44 @@
11
import { expect } from 'chai';
22
import { beforeEach, describe, it } from 'mocha';
3-
import { ExceptionlessClient } from 'src/ExceptionlessClient';
4-
import { EventPluginContext } from 'src/plugins/EventPluginContext';
5-
import { DuplicateCheckerPlugin } from 'src/plugins/default/DuplicateCheckerPlugin';
6-
import { IInnerError } from "src/models/IInnerError";
7-
import { IStackFrame } from "src/models/IStackFrame";
3+
import { ExceptionlessClient } from '../../../src/ExceptionlessClient';
4+
import { EventPluginContext } from '../../../src/plugins/EventPluginContext';
5+
import { DuplicateCheckerPlugin } from '../../../src/plugins/default/DuplicateCheckerPlugin';
6+
import { IInnerError } from "../../../src/models/IInnerError";
7+
import { IStackFrame } from "../../../src/models/IStackFrame";
8+
9+
const Exception1StackTrace = [
10+
{
11+
file_name: "index.js",
12+
line_number: 0,
13+
column: 50,
14+
is_signature_target: true,
15+
name: "createException",
16+
},
17+
{
18+
file_name: "index.js",
19+
line_number: 5,
20+
column: 25,
21+
is_signature_target: false,
22+
name: "throwError",
23+
}
24+
];
25+
26+
const Exception2StackTrace = [
27+
{
28+
file_name: "index.js",
29+
line_number: 0,
30+
column: 50,
31+
is_signature_target: true,
32+
name: "createException2",
33+
},
34+
{
35+
file_name: "index.js",
36+
line_number: 5,
37+
column: 25,
38+
is_signature_target: false,
39+
name: "throwError2",
40+
}
41+
];
842

943
describe('DuplicateCheckerPlugin', () => {
1044
let now: number = 0;
@@ -34,10 +68,9 @@ describe('DuplicateCheckerPlugin', () => {
3468
}
3569

3670
it('should ignore duplicate within window', (done) => {
37-
const exception = createException();
38-
run(exception);
71+
run(Exception1StackTrace);
3972

40-
const contextOfSecondRun = run(exception);
73+
const contextOfSecondRun = run(Exception1StackTrace);
4174
expect(contextOfSecondRun.cancelled).to.be.true;
4275
setTimeout(() => {
4376
expect(contextOfSecondRun.event.count).to.equal(1);
@@ -47,51 +80,23 @@ describe('DuplicateCheckerPlugin', () => {
4780
});
4881

4982
it('should ignore error without stack', () => {
50-
const exception = new ReferenceError('This is a test');
51-
delete exception.stack;
52-
53-
run(exception);
54-
const contextOfSecondRun = run(exception);
83+
run();
84+
const contextOfSecondRun = run();
5585
expect(contextOfSecondRun.cancelled).to.be.true;
5686
});
5787

5888
it('shouldn\'t ignore different stack within window', () => {
59-
const exception1 = createException();
60-
run(exception1);
61-
const exception2 = createException2();
62-
const contextOfSecondRun = run(exception2);
89+
run(Exception1StackTrace);
90+
const contextOfSecondRun = run(Exception2StackTrace);
6391

6492
expect(contextOfSecondRun.cancelled).not.to.be.true;
6593
});
6694

6795
it('shouldn\'t ignore duplicate after window', () => {
68-
const exception = createException();
69-
run(exception);
96+
run(Exception1StackTrace);
7097

7198
now = 3000;
72-
const contextOfSecondRun = run(exception);
99+
const contextOfSecondRun = run(Exception1StackTrace);
73100
expect(contextOfSecondRun.cancelled).not.to.be.true;
74101
});
75102
});
76-
77-
function createException() {
78-
function throwError() {
79-
throw new ReferenceError('This is a test');
80-
}
81-
try {
82-
throwError();
83-
} catch (e) {
84-
return e;
85-
}
86-
}
87-
88-
function createException2() {
89-
function throwError2() {
90-
throw new ReferenceError('This is a test');
91-
}
92-
try {
93-
throwError2();
94-
} catch (e) {
95-
return e;
96-
}
97-
}

packages/core/test/plugins/default/EventExclusionPlugin-spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { expect } from 'chai';
22
import { beforeEach, describe, it } from 'mocha';
3-
import { Configuration } from 'src/configuration/Configuration';
4-
import { ExceptionlessClient } from 'src/ExceptionlessClient';
5-
import { IEvent } from 'src/models/IEvent';
6-
import { EventPluginContext } from 'src/plugins/EventPluginContext';
7-
import { EventExclusionPlugin } from 'src/plugins/default/EventExclusionPlugin';
8-
import { IInnerError } from "src/models/IInnerError";
3+
import { Configuration } from '../../../src/configuration/Configuration';
4+
import { ExceptionlessClient } from '../../../src/ExceptionlessClient';
5+
import { IEvent } from '../../../src/models/IEvent';
6+
import { EventPluginContext } from '../../../src/plugins/EventPluginContext';
7+
import { EventExclusionPlugin } from '../../../src/plugins/default/EventExclusionPlugin';
8+
import { IInnerError } from "../../../src/models/IInnerError";
99

1010
beforeEach(() => {
1111
Configuration.defaults.updateSettingsWhenIdleInterval = -1;

packages/core/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"baseUrl": ".",
4+
"rootDir": ".",
55
"outDir": "dist"
66
},
77
"include": [

packages/node-submit-sync/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"baseUrl": ".",
4+
"rootDir": ".",
55
"outDir": "dist"
66
},
77
"include": [

packages/node/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"baseUrl": ".",
4+
"rootDir": ".",
55
"outDir": "dist"
66
},
77
"include": [

packages/universal/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "../../tsconfig.json",
33
"compilerOptions": {
4-
"baseUrl": ".",
4+
"rootDir": ".",
55
"outDir": "dist"
66
},
77
"include": [

0 commit comments

Comments
 (0)