Skip to content

Commit

Permalink
Use default export for module definition
Browse files Browse the repository at this point in the history
  • Loading branch information
eriwen committed Jun 6, 2022
1 parent a1b044b commit 46ad177
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion dist/stacktrace-gps-with-polyfills.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/stacktrace-gps-with-polyfills.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/stacktrace-gps.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
if (typeof define === 'function' && define.amd) {
define('stacktrace-gps', ['source-map', 'stackframe'], factory);
} else if (typeof exports === 'object') {
module.exports = factory(require('source-map/lib/source-map-consumer'), require('stackframe'));
module.exports.default = factory(require('source-map/lib/source-map-consumer'), require('stackframe'));
} else {
root.StackTraceGPS = factory(root.SourceMap || root.sourceMap, root.StackFrame);
}
Expand Down
2 changes: 1 addition & 1 deletion dist/stacktrace-gps.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/stacktrace-gps.min.js.map

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"source-map": "0.5.6",
"stackframe": "^1.3.0"
"stackframe": "^1.3.2"
},
"devDependencies": {
"es6-promise": "^3.3.1",
Expand Down Expand Up @@ -50,7 +50,7 @@
"url": "https://github.com/stacktracejs/stacktrace-gps/issues"
},
"main": "./stacktrace-gps.js",
"types": "./stacktrace-gps.d.ts",
"typings": "./stacktrace-gps.d.ts",
"files": [
"LICENSE",
"README.md",
Expand Down
6 changes: 2 additions & 4 deletions stacktrace-gps.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SourceMapConsumer } from "source-map";
import StackFrame = require("stackframe");
import StackFrame from "stackframe";

declare namespace StackTraceGPS {
/**
Expand Down Expand Up @@ -57,6 +57,4 @@ declare class StackTraceGPS {
getMappedLocation(stackframe: StackFrame): Promise<StackFrame>;
}

export = StackTraceGPS;

export as namespace StackTraceGPS; // global for non-module UMD users
export default StackTraceGPS;
2 changes: 1 addition & 1 deletion stacktrace-gps.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
if (typeof define === 'function' && define.amd) {
define('stacktrace-gps', ['source-map', 'stackframe'], factory);
} else if (typeof exports === 'object') {
module.exports = factory(require('source-map/lib/source-map-consumer'), require('stackframe'));
module.exports.default = factory(require('source-map/lib/source-map-consumer'), require('stackframe'));
} else {
root.StackTraceGPS = factory(root.SourceMap || root.sourceMap, root.StackFrame);
}
Expand Down

0 comments on commit 46ad177

Please sign in to comment.