SvenWerlen / moulinette-core

FoundryVTT module which provides a set of tools for DMs for managing assets.
https://www.patreon.com/moulinette
MIT License
40 stars 10 forks source link

[BUG] Deprecation warnings for global function call in FoundryVTT v12 #78

Open morepurplemorebetter opened 1 month ago

morepurplemorebetter commented 1 month ago

Description

I'm getting a couple of warning messages in my console from this module on load:

Error: You are accessing globalThis.duplicate which must now be accessed via foundry.utils.duplicate
Deprecated since Version 12
Backwards-compatible support will be removed in Version 14
[...]
getBoardData https://[address]/modules/moulinette-core/dist/core.min.js:1
[...]
Error: You are accessing globalThis.mergeObject which must now be accessed via foundry.utils.mergeObject
Deprecated since Version 12
Backwards-compatible support will be removed in Version 14
[...]
get defaultOptions https://[address]/modules/moulinette-core/dist/core.min.js:1
[...]

As far as I can tell, accessing these through foundry.utils is also supported in FoundryVTT v10 & v11. Thus, changing this won't affect the other versions this module works with.

Versions

Moulinette-core: v12.2.0 FoundryVTT: v12.331

SvenWerlen commented 1 week ago

Thanks for reporting it. I'm working a new modules which are optimized for v12+. I fixed those issues but will still consider fixing them on current versions.