Skip to content

Commit e9854f8

Browse files
committed
pr feedback
1 parent 4351881 commit e9854f8

File tree

5 files changed

+16
-33
lines changed

5 files changed

+16
-33
lines changed

example/nextjs/lib/exceptionless-server.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
import { ExceptionlessClient, KnownEventDataKeys, toError } from "@exceptionless/core";
1+
import { Exceptionless, KnownEventDataKeys, toError } from "@exceptionless/node";
22

3-
export { KnownEventDataKeys, toError };
4-
5-
export const Exceptionless = new ExceptionlessClient();
3+
export { Exceptionless, KnownEventDataKeys, toError };
64

75
let startupPromise;
86

97
export async function startup() {
10-
startupPromise ??= (async () => {
11-
await Exceptionless.startup((config) => {
8+
startupPromise ??= Exceptionless.startup((config) => {
129
if (process.env.EXCEPTIONLESS_API_KEY ?? process.env.NEXT_PUBLIC_EXCEPTIONLESS_API_KEY) {
1310
config.apiKey = process.env.EXCEPTIONLESS_API_KEY ?? process.env.NEXT_PUBLIC_EXCEPTIONLESS_API_KEY;
1411
}
@@ -53,9 +50,9 @@ export async function startup() {
5350
return Promise.resolve();
5451
}
5552
});
53+
});
5654

57-
return { Exceptionless, KnownEventDataKeys, toError };
58-
})();
55+
await startupPromise;
5956

60-
return startupPromise;
57+
return { Exceptionless, KnownEventDataKeys, toError };
6158
}

packages/browser/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,12 @@
2424
},
2525
"license": "Apache-2.0",
2626
"type": "module",
27-
"main": "dist/index.bundle.js",
27+
"main": "dist/index.js",
2828
"types": "dist/index.d.ts",
2929
"unpkg": "dist/index.bundle.min.js",
3030
"jsdelivr": "dist/index.bundle.min.js",
3131
"exports": {
32-
".": {
33-
"types": "./dist/index.d.ts",
34-
"source": "./src/index.ts",
35-
"default": "./dist/index.bundle.js"
36-
},
32+
".": "./dist/index.js",
3733
"./package.json": "./package.json"
3834
},
3935
"scripts": {

packages/core/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,12 @@
2424
},
2525
"license": "Apache-2.0",
2626
"type": "module",
27-
"main": "dist/index.bundle.js",
27+
"main": "dist/index.js",
2828
"types": "dist/index.d.ts",
2929
"unpkg": "dist/index.bundle.min.js",
3030
"jsdelivr": "dist/index.bundle.min.js",
3131
"exports": {
32-
".": {
33-
"types": "./dist/index.d.ts",
34-
"source": "./src/index.ts",
35-
"default": "./dist/index.bundle.js"
36-
},
32+
".": "./dist/index.js",
3733
"./package.json": "./package.json"
3834
},
3935
"scripts": {

packages/node/package.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,12 @@
2424
},
2525
"license": "Apache-2.0",
2626
"type": "module",
27-
"main": "dist/index.bundle.js",
27+
"main": "dist/index.js",
2828
"types": "dist/index.d.ts",
29+
"unpkg": "dist/index.bundle.min.js",
30+
"jsdelivr": "dist/index.bundle.min.js",
2931
"exports": {
30-
".": {
31-
"types": "./dist/index.d.ts",
32-
"source": "./src/index.ts",
33-
"default": "./dist/index.bundle.js"
34-
},
32+
".": "./dist/index.js",
3533
"./package.json": "./package.json"
3634
},
3735
"engines": {

packages/react/package.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,12 @@
2424
},
2525
"license": "Apache-2.0",
2626
"type": "module",
27-
"main": "dist/index.bundle.js",
27+
"main": "dist/index.js",
2828
"types": "dist/index.d.ts",
2929
"unpkg": "dist/index.bundle.min.js",
3030
"jsdelivr": "dist/index.bundle.min.js",
3131
"exports": {
32-
".": {
33-
"types": "./dist/index.d.ts",
34-
"source": "./src/index.ts",
35-
"default": "./dist/index.bundle.js"
36-
},
32+
".": "./dist/index.js",
3733
"./package.json": "./package.json"
3834
},
3935
"scripts": {

0 commit comments

Comments
 (0)