ArdanaLabs / DanaSwapUI

Other
3 stars 3 forks source link

refactor: bump to nodejs 18 #89

Closed yusdacra closed 2 years ago

yusdacra commented 2 years ago

This bumps the nodejs version to 18 so that fs.cpSync is available. It builds, but I have not tested if the applications actually work as expected.

toastal commented 2 years ago

Stability: 1 - Experimental -- https://nodejs.org/api/fs.html#fscpsyncsrc-dest-options

Stability: 1 - Experimental. The feature is not subject to semantic versioning rules. Non-backward compatible changes or removal may occur in any future release. Use of the feature is not recommended in production environments. -- https://nodejs.org/api/documentation.html#stability-index

What do we need cpSync for?

Personally I'd prefer to stick to LTS because it's more stable/supported--that said 18_x is labeled as "Upcoming LTS" and should be LTS within 2 months.

yusdacra commented 2 years ago

It seems to be used in dashboard build for copying files, so I think we could replace it safely with just our own implementation of a recursive copy or I guess just add a dependency to some library that does it. However I'm not very knowledgable about those so someone else would need to do it. The two instances it complains are a plugin called esbuild-copy-static-files and in our own source code under frontend-dashboard/plugin/process-css.js, so those will need to be replaced. If that's done then this PR is unnecessary.

toastal commented 2 years ago

@yusdacra okay

@elite0226 How were you developing this locally? Were you not using version 16 as versioned with nix develop?

elite0226 commented 2 years ago

In Orbis landing page, this problem was solved by Matthew. The node version is the same. v16.13.1 There was no problem locally.

yusdacra commented 2 years ago

This is not needed anymore, see #91