Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dependencies and fix linting issues. #105

Merged
merged 15 commits into from
Feb 15, 2023
Merged

Conversation

niemyjski
Copy link
Member

@niemyjski niemyjski commented Oct 21, 2021

Update: This pr addresses dependencies, we have a plan to solve this in the next update.

This should resolve all CJS import issues,

I think what was happening is that by default we were saying the main script was index.js (https://github.com/exceptionless/Exceptionless.JavaScript/blob/master/packages/browser/package.json#L27) and that all consumers should use this and tree shake. The problem with this is that we had a dependency on stacktrace-js and import for stacktrace-js so it would always be loaded as a cjs umd module. If you used the bundled version transpiled with esbuild it would have worked.

This pr has a prebuild action to convert the stacktrace-js dependency and it's dependencies to esm local file, the build then references this file instead of the cjs requires and then post build copies this transpiled file to the dist folder (tsc doesn't copy js files or any non ts file by default).

@ejsmith
Copy link
Member

ejsmith commented Oct 21, 2021

Interesting. Hope it works.

Copy link
Member

@ejsmith ejsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Looks like you've gotten better at TypeScript since you originally did this, eh? :-)

@@ -16,28 +16,32 @@
},
"scripts": {
"clean": "rimraf packages/*/dist example/*/dist",
"build": "lage build --no-cache --verbose --no-deps",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, got rid of lage.

@niemyjski
Copy link
Member Author

I still need to come up with a solution for: stacktracejs/stacktrace.js#230

@niemyjski niemyjski changed the title Transpile stacktracejs into local esm package and consume it. Upgrade dependencies and fix linting issues. Feb 15, 2023
Copy link
Member Author

@niemyjski niemyjski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all files.

@niemyjski niemyjski merged commit 3114c4b into main Feb 15, 2023
@niemyjski niemyjski deleted the feature/esm-stacktrace branch February 15, 2023 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants