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

Types revamp #423

Merged
merged 18 commits into from
Nov 21, 2018
Merged

Types revamp #423

merged 18 commits into from
Nov 21, 2018

Conversation

bengourley
Copy link
Contributor

@bengourley bengourley commented Nov 20, 2018

The changes in this PR mean that TypeScript users only have to install @bugsnag/js – nothing extra – to get the JS and the types.

This is achieved by a script which copies the @bugsnag/core types into each of @bugsnag/browser and @bugsnag/node, with an update to the import paths for the .d.ts files in those modules. This happens at build time.

This PR also fixes the type def for the client.use() method.

@@ -30,14 +30,11 @@
"node",
"types.d.ts"
],
"scripts": {
"postversion": "npm run build"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was on the wrong package, it should have been on node.

"build:dist": "../../bin/bundle src/notifier.js --node --exclude=iserror,stack-generator,error-stack-parser,request,pump,byline --standalone=bugsnag | ../../bin/extract-source-map dist/bugsnag.js",
"test": "bundle exec maze-runner"
"test": "bundle exec maze-runner",
"postversion": "npm run build"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The node assets were not built when each version was created. This was the cause.

@bengourley bengourley requested a review from a team November 20, 2018 17:16
Copy link
Contributor

@kattrali kattrali left a comment

Choose a reason for hiding this comment

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

Seems fine, I'm sure you'll sort out what's going on with the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants