Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

s.getParser was broken because of import * as bowser from 'bowser'; #101

Merged
merged 1 commit into from
Feb 23, 2020
Merged

s.getParser was broken because of import * as bowser from 'bowser'; #101

merged 1 commit into from
Feb 23, 2020

Conversation

dagda1
Copy link

@dagda1 dagda1 commented Feb 22, 2020

I had the dreaded error:

s.getParser is not a function

On investigation, it was because bowser was coming in as a * import and esModuleInterop is set to true in tsconfig.json which negates the need to use the import * import.

So my PR changes it to:

import bower from 'bowser'`

This will fix the problem.

@dagda1
Copy link
Author

dagda1 commented Feb 22, 2020

This is breaking on node 6. Should you really be supporting node 6?

@EvanHahn
Copy link
Member

EvanHahn commented Feb 22, 2020 via email

@dagda1
Copy link
Author

dagda1 commented Feb 22, 2020

@EvanHahn rebased and all good. Cheers!

@dagda1
Copy link
Author

dagda1 commented Feb 22, 2020

@EvanHahn do you want me to bump the version?

Copy link
Member

@EvanHahn EvanHahn left a comment

Choose a reason for hiding this comment

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

Looks great! I'll update bowser and release a new version of this module soon.

@EvanHahn EvanHahn merged commit 1b78e48 into helmetjs:master Feb 23, 2020
@EvanHahn
Copy link
Member

This should be released in helmet-csp@2.9.5. I'll add it to "mainline" Helmet in the next two days once I've confirmed everything works.

@EvanHahn
Copy link
Member

Also, feel free to add yourself to the contributors list.

@dagda1 dagda1 deleted the fix-bowser-import branch February 23, 2020 08:00
@EvanHahn
Copy link
Member

This has been released in helmet@3.21.3. Thanks again!

@dagda1
Copy link
Author

dagda1 commented Feb 26, 2020

@EvanHahn if there is anything else i can do and especially of a typescript nature then let me know

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

Successfully merging this pull request may close these issues.

None yet

2 participants