Skip to content

Conversation

@silverwind
Copy link
Contributor

@mskelton
Copy link
Owner

This breaks tests, please investigate

@silverwind
Copy link
Contributor Author

silverwind commented Sep 18, 2025

Object.hasOwn was added in 38a559e and it's part of the es2022 feature set while tsconfig.json is set to es2020, so typescript rightfully complains.

I'm not sure how this could have passed CI before, but I will replace it with Object.prototype.hasOwnProperty.

@silverwind silverwind changed the title Update globals dependency Update globals dependency, fix hasOwn issue Sep 18, 2025
@mskelton
Copy link
Owner

Let's keep hasOwn and update tsconfig

@silverwind silverwind changed the title Update globals dependency, fix hasOwn issue Update globals dependency, raise typescript target to es2022 Sep 19, 2025
@silverwind
Copy link
Contributor Author

Ok done.

I think it might also be a good idea to raise the minimum node version to 18 or 20 with this as I'm pretty sure Node.js 16 does not support es2022.

@silverwind
Copy link
Contributor Author

As per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwn#browser_compatibility, Node.js 16.9.0 or higher has Object.hasOwn, so I raised the minium version to that.

@mskelton mskelton merged commit 3ecf3ab into mskelton:main Sep 19, 2025
3 checks passed
@silverwind silverwind deleted the update-globals branch September 22, 2025 06:55
@github-actions
Copy link

🎉 This PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants