Upgrade lerna to version 6.5.1#2196
Conversation
b2df1c7 to
768d515
Compare
|
Will details about lerna's usage in https://markbind-master.netlify.app/devguide/projectmanagement be affected? If so the docs should be updated. |
Yes. I will update it :) Edit: There is no need to update it as it is still working |
e944307 to
f1f4700
Compare
|
@yucheng11122017 So, my PR would require node 16 update. For your reference |
tlylt
left a comment
There was a problem hiding this comment.
Thanks @EltonGohJH, looks good mostly. Have you tested (perhaps with a test repo) if the publishing flow is still working?
Will double check locally and get back.
|
@EltonGohJH I'm getting the following error when cloning and running |
@tlylt Edit: |
Our current version of lerna (version 4) is incompatible with Node 19 due to an outdated dependency called node-gyp. To ensure that we can support all versions of Node, we need to upgrade to the latest version of lerna (version 6). In addition to Node 19 compatibility, upgrading to lerna 6 will allow us to take advantage of new features like caching. During the upgrade process, I also noticed some formatting issues caused by js-beautify v1.14.7 when using custom tag (specifically custom tag with dash eg. site-nav). To fix this, I fixed the version of js-beautify to be v1.14.3 in package.json. To achieve these improvements, I made the following changes: * Upgraded lerna 4 to lerna 6.5.1 * Fixed js-beautify version to v1.14.3 * Set up npm workspaces and remove deprecated lerna bootsrap command * Cached test results and updated test scripts This fixes the following issues: * MarkBind#1984: Explore using Turborepo to improve build system * MarkBind#2162: Node v19.6.0 incompatibility on Windows 10 These changes will enable users to run our application on Node 19 and improve performance with caching.
f1f4700 to
6d9bd04
Compare
|
@tlylt Publishing is working after I recreated a new package lock file. |
tlylt
left a comment
There was a problem hiding this comment.
LGTM @EltonGohJH , remember to update the description and try merging this, with squash-commit strategy.
|
@EltonGohJH Thanks for the commit message! Do remember to wrap the commit message at 72 characters :) |


What is the purpose of this pull request?
Resolves #1984 and fixes #2162
Overview of changes:
Anything you'd like to highlight/discuss:
The main issue that I faced would be the failure to realise the latest version of js-beautify has issue with custom tag with dash.
So for instance
<site-nav>would not indent correctly but in v1.14.3 which is the version we are using now it works perfectly fine. So, for now I fixed the version of js-beautify to v1.14.3 in package.json.There is some issue with @types/node 17.0.22 on node 16 so I updated it.
A stretch goal for me would be to fix it and make a pr to js-beautify and then make a pr again on markbind to update js-beautify.
Testing instructions:
Can test the cached performance of test and updatetest by running those script.
I personally tested it and the speed of npm run test at least doubled.
Without caching, it takes around 50s. And after caching it takes around 20s. The caching would be significantly improve dev experience when debugging and running testcases.
Right now, it runs a lot faster locally but in pipeline performance gain is negligible due to cpu bottleneck.
@raysonkoh
In conclusion, I believe that it is worthwhile to keep using Lerna. Lerna simplifies versioning and publishing to npm. Furthermore, the performance improvements for running test cases are definitely welcomed.
Proposed commit message: (wrap lines at 72 characters)
Upgrade lerna to version 6.5.1
Our current version of lerna (version 4) is incompatible with
Node 19 due to an outdated dependency called node-gyp.
To ensure that we can support all versions of Node,
we need to upgrade to the latest version of lerna (version 6).
In addition to Node 19 compatibility,
upgrading to lerna 6 will allow us to take advantage of
new features like caching and concurrency.
During the upgrade process,
caused by js-beautify v1.14.7 when using custom tag
(specifically custom tag with dash eg. site-nav). To fix this,
I fixed the version of js-beautify to be v1.14.3 in package.json.
with @types/node 17.0.22 so I updated it to 18.15.0.
To achieve these improvements, I made the following changes:
and remove deprecated lerna bootsrap command
This fixes the following issues:
#1984: Explore using Turborepo to improve build system#2162: Node v19.6.0 incompatibility on Windows 10These changes will enable users to
run our application on Node 19
and improve performance with caching and concurrency.
Checklist: ☑️