pmndrs / gltfjsx

🎮 Turns GLTFs into JSX components
https://gltf.pmnd.rs
MIT License
4.7k stars 309 forks source link

chore(deps): Update to Yarn v4, Node.js v18, and fix a broken dependency #261

Closed donmccurdy closed 2 months ago

donmccurdy commented 4 months ago

Changes in preparation for the update to glTF Transform v4. glTF Transform v4 requires a newer version of Sharp for texture compression, which in turn uses WebAssembly to support Deno environments and has some important changes to its installation process:

https://sharp.pixelplumbing.com/install#cross-platform

In general things should 'just work' for most users, but support for npm <10, yarn <3, and node.js <18 has been dropped. I've omitted the update to glTF Transform from this PR, and included only the infrastructural changes.

donmccurdy commented 4 months ago

Based on https://sharp.pixelplumbing.com/install it sounds like Yarn v1 is still supported, but on maintenance mode. So hopefully that part won't be an issue for users, but I think it's worth going ahead and updating the Yarn version used in this repo.

drcmda commented 2 months ago

@donmccurdy i updated all dependencies and published, im using the yarn 1 fallback atm. im kind of scared updating to a later yarn due to work projects. is there a way to fix the cli or let it use yarn-latest without forcing the project to use a specific tool?

donmccurdy commented 2 months ago

Sharp hasn't forced a specific tool here — it allows anything except Yarn v1, or the mentioned workaround for Yarn v1. But yeah, probably a lot of people still using Yarn v1. It'd also be OK to upgrade everything except Sharp, and pin that at v0.32 indefinitely. I've been gradually switching my own projects to Yarn v4, which has been fine as long as I use nodeLinker: node-modules.

donmccurdy commented 2 months ago

@drcmda OK, let's merge https://github.com/pmndrs/gltfjsx/pull/253 as a starting point then, to un-break package.json. I'll look into whether we can upgrade to glTF Transform v4 here without upgrading from Yarn v1.

donmccurdy commented 2 months ago

I see you merged https://github.com/pmndrs/gltfjsx/commit/21033c664c8aef7347da863a8bdf83bbc8e4adf7 already, thanks! Closing this PR.