Skip to content

Use @nativewrappers/fivem instead of @nativewrappers/client#25

Merged
antond15 merged 1 commit intoCommunityOx:mainfrom
Laica-Lunasys:main
Jun 30, 2025
Merged

Use @nativewrappers/fivem instead of @nativewrappers/client#25
antond15 merged 1 commit intoCommunityOx:mainfrom
Laica-Lunasys:main

Conversation

@Laica-Lunasys
Copy link

This PR switches from using @nativewrappers/client to @nativewrappers/fivem .

The "client" package has not been updated in about 3 years and appears to be no longer maintained.
https://www.npmjs.com/package/@nativewrappers/client

Instead, I propose using @nativewrappers/fivem, which has been under development until relatively recently.
https://www.npmjs.com/package/@nativewrappers/fivem

@unitysync
Copy link

As I recall these are not exactly the same class, and the one in @nativewrappers/fivem has a huge comment at the top that says "DO NOT USE" and that the type is not guaranteed to exist.

https://github.com/nativewrappers/nativewrappers/blob/5b06cd84a36d880edf8a2ff64318a6466626239e/src/common/utils/Vector.ts#L650-L651

I don't have the time to test this, but I doubt changing the nativewrappers package is worth any potential breaking changes with it.

@Laica-Lunasys
Copy link
Author

Laica-Lunasys commented Jun 19, 2025

@unitysync

Sorry, I missed that.
It seems this comment is not referring to the Vector3 (or Vector2, Vector4) itself, but rather explaining the public type = ... part below it.

nativewrappers/nativewrappers@64de520

Also, it appears that the implementation of common/Vector3 is already being used in other projects (such as ox_core and ox_inventory_v3):
https://github.com/CommunityOx/ox_core/blob/6eaeb23421684560d75f098477f93b30f0d4a717/client/death.ts#L2
https://github.com/CommunityOx/ox_inventory_v3/blob/aeb1f0c687ec51f35e5920663c99b0ec1d94b196/src/common/grid.ts#L1

In my own project, I’m also using the common/Vector3 implementation, and I haven't encountered any issues so far.
Even if something were to come up, I believe choosing a library that is actively maintained increases the chances of receiving timely fixes.

@unitysync
Copy link

It seems this comment is not referring to the Vector3 (or Vector2, Vector4) itself, but rather explaining the public type = ... part below it.

Good catch, that ones on me for not reading it properly. If you have been using this without issues then LGTM 👍.

Copy link
Member

@antond15 antond15 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@antond15 antond15 merged commit 753d3eb into CommunityOx:main Jun 30, 2025
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