Skip to content

Replace unmaintained useragent dependency with useragent-ng#65

Closed
johnwatson484 wants to merge 2 commits intohapijs:masterfrom
johnwatson484:master
Closed

Replace unmaintained useragent dependency with useragent-ng#65
johnwatson484 wants to merge 2 commits intohapijs:masterfrom
johnwatson484:master

Conversation

@johnwatson484
Copy link
Contributor

useragent is no longer actively maintained and has several outstanding vulnerabilities within itself and an outdated version of tmp.

This PR replaces useragent with maintained fork useragent-ng.

it('exposes all methods and classes as named imports', () => {

expect(Object.keys(Scooter)).to.equal([
expect(Object.keys(Scooter)).to.contain([
Copy link
Contributor Author

@johnwatson484 johnwatson484 Dec 21, 2025

Choose a reason for hiding this comment

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

Node 24 will include module.exports as named export whilst earlier versions will not.

Have changed test to preserve minimum expectations but avoid failure between versions.

@kanongil
Copy link

It seems that the useragent-ng package doesn't support Windows. I expect they broke it in schmod/useragent-ng@c35ff00.

@johnwatson484
Copy link
Contributor Author

It seems that the useragent-ng package doesn't support Windows. I expect they broke it in schmod/useragent-ng@c35ff00.

So they have. I've raised a in issue to see if it's intentionally not supporting Windows or if it's just an oversight.

schmod/useragent-ng#8

If they're not willing to support Windows, I'll look at other options. Whether that's another dependency or just parsing what's needed for Scooter myself.

@johnwatson484
Copy link
Contributor Author

I've drafted PR #67 as an alternative to patch the vulnerability using a more popular library, however comes with the cost of requiring an adapter function.

I do not wish to become a pest so I'll hold back on any further work to allow time to consider the direction you wish to take scooter, if any of the options I've proposed.

@johnwatson484 johnwatson484 changed the title Replace unmaintained useragent dependency Replace unmaintained useragent dependency with useragent-ng Dec 22, 2025
@Marsup
Copy link
Contributor

Marsup commented Mar 15, 2026

I think it's safe to say we can close this one now.

@Marsup Marsup closed this Mar 15, 2026
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.

3 participants