Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Lerna computation caching, given the repo uses v5 of Lerna #1156

Open
juristr opened this issue Aug 16, 2022 · 1 comment
Open

Enable Lerna computation caching, given the repo uses v5 of Lerna #1156

juristr opened this issue Aug 16, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@juristr
Copy link

juristr commented Aug 16, 2022

Describe the enhancement

I've seen you upgraded Lerna to the latest version (#1149). This also comes with performance improvements when running tasks (e.g. improved task scheduling + caching). See the docs for more info: https://lerna.js.org/docs/features/cache-tasks

This is done by delegating the task execution to Nx underneath, rather than using the p-queue package.

Code Snippet
What would be required is first to enable Nx by changing the lerna.json as follows:

{
  "packages": [
    "packages/*"
  ],
+ "useNx": true,
  "version": "independent"
}

And then run npx nx init to create a new nx.json where one can specify the cacheable operations for this workspace. Usually build, test, lint etc.

{
  "tasksRunnerOptions": {
    "default": {
      "runner": "nx/tasks-runners/default",
      "options": {
+        "cacheableOperations": ["build", "test"]
      }
    }
  }
}

The Lerna docs have all the details for that :)

Additional information

Happy to help with more info if needed.

@juristr juristr added the enhancement New feature or request label Aug 16, 2022
@Draconic115
Copy link

README.md

93osiaoti3o5iwueproUFT7jir9ejeha ejeienrbai(394838$+#!"84(@-(#9#63!_8@+4)_9=€[¥×¢÷|[¥×`÷iwjdjdiejthaiIsktoe8q Iej Jair UzuJZahU&TUR&Hr^H*284

#1152 #345 #1151 #1138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants