Backward compatibility for pre ES2021#8
Backward compatibility for pre ES2021#8manuelguzmandao wants to merge 3 commits intoso-ric:masterfrom
Conversation
The objective is to make this module compatible with old code using pre ES2021. For example, winston3.3.3 depending on @dabh/diagnostics@^2 which pulls this module. (winstonjs/winston#2586)
|
Appreciate the effort @manuelguzmandao Node 14 (14.21.3) works with the patch mentioned in winstonjs/winston#2586 (comment) That said, change diff looks large, haven't take a look at it yet, but are there formatting changes? |
|
@IamLizu I just added to the rollup a step to transpile the file |
|
I am generally +1 on this, but will take a look at this later tonight or tomorrow morning. |
|
Any updates? 👀 |
|
Any updates? Will this fix work for Node 12 as well? |
|
Any updates? When will this fix be merged? |
|
+1 |
|
+1. got same problem with nodejs14. |
|
+1 |
|
I had this same problem with NodeJS 14 and figured out why. The current version of @so-ric/colorspace uses a dependency called colors@5.0.2, which is compatible with >=NodeJS 18. So, the transpiled version of @so-ric/colorspace incorporates a "||=" operator in the code, which makes it unworkable for NodeJS <15. I had problems with Winston@>3.3.x (which uses the dependency). The solution was to use winston@3.0.0, which is compatible with NodeJS 14. My suggestion to the author of @so-ric/colorspace is to add the "engines": {"node": ">=15"} parameter to package.json or use colors@4.x.x. |
Same here. I came to this repo to try to find the nodejs version requirements in order to resolve the runtime errors and couldn't find anything. Just adding a "requires nodejs 18 or you'll get this runtime error" line in the README would be a huge help. Considering the whole purpose of the @so-ric/colorspace package (over the base colorspace package) is to remediate security vulnerabilities, it makes more sense to require developers to update their apps to use a recent node framework versions rather than patching this package to allow devs to continue building apps on EOL versions of node. |
The objective is to make this module compatible with old code using pre ES2021. For example, winston3.3.3 depending on @dabh/diagnostics@^2 which pulls this module. (winstonjs/winston#2586)